Skip to main content
Published: July 25 2011, 7:55:00 AMUpdated: November 28 2020, 9:57:26 PM


 How to call ResolutionCaseManagementService - getUserCases API from VB.NET framework using SOAP request

  1. Add a web reference to the Finding API definition file ResolutionCaseManagementService.wsdl from


  1. Create a class that derives from ResolutionCaseManagementService class. For example, “CustomRCMService.vb”. Override the GetWebRequest method and set the HTTP request headers such as GLOBAL-ID, MESSAGE-PROTOCOL, SECURITY-TOKEN, OPERATION-NAME, SERVICE-NAME and SERVICE-VERSION.
  2. Create an object for the required request type. For example,
       Dim request As New GetEBPCaseDetailRequest()
  3. Provide value for the required properties.
  4. Create an object to the required response type. For example,
       Dim response As GetEBPCaseDetailResponse = service.getEBPCaseDetail(request)
  5. Explore the response object for response data.    


The following is the code sample for getEBPCaseDetailAPI call using VB.NET


Code in the Program.vb file


Module Module1

    Sub Main()
            ' Creating an object to the ResolutionCaseManagementService class
            Dim service As New CustomRCMService()
            service.Url = ""

            ' Creating request object for GetEBPCaseDetailRequest Call
            Dim request As New GetEBPCaseDetailRequest()
            request.caseId = New CaseIdType()
   = "1234567890"
            request.caseId.type = New CaseType()
            request.caseId.type = CaseType.EBP_INR

            Dim response As GetEBPCaseDetailResponse = service.getEBPCaseDetail(request)
            If response.ack = AckValue.Success Then
                Console.WriteLine("** Success **")
                Console.WriteLine("ItemID: " + response.caseSummary.item.itemId)
                Console.WriteLine("Title: " + response.caseSummary.item.itemTitle)
                Console.WriteLine("CaseID: " +
                Console.WriteLine("CaseAmount: " + Convert.ToString(response.caseSummary.caseAmount.Value))
                Dim errors As ErrorData() = response.errorMessage
                For Each [error] As ErrorData In errors
                    Console.WriteLine("Severity: " + [error].severity)
                    Console.WriteLine("ErrorID: " + [error].errorId)
                    Console.WriteLine("Message: " + [error].message)
            End If
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

End Module



Code in the CustomRCMService.vb file

Imports System.Configuration
Imports System.Net

Public Class CustomRCMService
    Inherits ResolutionCaseManagementService
    Protected Overrides Function GetWebRequest(ByVal uri As Uri) As WebRequest
            Dim request As HttpWebRequest = DirectCast(MyBase.GetWebRequest(uri), HttpWebRequest)
            request.Headers.Add("X-EBAY-SOA-SERVICE-NAME", "ResolutionCaseManagementServiceV1")
            request.Headers.Add("X-EBAY-SOA-OPERATION-NAME", "getEBPCaseDetail")
            request.Headers.Add("X-EBAY-SOA-SECURITY-TOKEN", "YOUR_TOKEN_HERE")
            request.Headers.Add("X-EBAY-SOA-MESSAGE-PROTOCOL", "SOAP12")
            request.Headers.Add("X-EBAY-SOA-GLOBAL-ID", "EBAY-US")
            request.Headers.Add("X-EBAY-SOA-SERVICE-VERSION", "1.0.0")
            Return request
        Catch ex As Exception
            Throw ex
        End Try
    End Function
End Class


How well did this answer your question?
Answers others found helpful