Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge SOAP Web Services : Building Clients for OpenEdge SOAP Web services : Mapping ABL procedures to SOAP messages : Client method call to SOAP request/response message pair
 
Client method call to SOAP request/response message pair
This is a sample VB.NET method call to the FindCustomerByNum( ) method defined in the client interface, where the OrderInfo AppObject instance on which the method is called is named webService:

Interface method call generating SOAP messages

Dim CustomerName As String
webService.FindCustomerByNum(3, CustomerName)
Thus, the call passes a value of 3 for the CustomerNumber parameter as input and receives the value returned by the CustomerName output parameter in a variable that happens also to be named CustomerName.
This is the SOAP request message sent out by the client after invoking the FindCustomerByNum( ) method. You can see that the value (3) for the input parameter, CustomerNumber, is passed in the SOAP message body:

SOAP request message for method input parameters

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope namespaces defined here...>
  <soap:Body>
    <FindCustomerByNum xmlns="urn:OrderSvc:OrderInfo">
      <CustomerNumber>3</CustomerNumber>
    </FindCustomerByNum>
  </soap:Body>
</soap:Envelope>
This is the SOAP response message returned by the WSA with the value ("Hoops") for the output parameter, CustomerName:

SOAP response message for method output parameters

<?xml version="1.0" encoding="UTF-8" ?>
<soap:Envelope namespaces defined here...>
  <soap:Body>
    <FindCustomerByNumResponse xmlns="urn:OrderSvc:OrderInfo">
      <CustomerName>Hoops</CustomerName>
    </FindCustomerByNumResponse>
  </soap:Body>
</soap:Envelope>
If an error occurred at any point after the SOAP request message was received by the WSA, a SOAP fault message would be returned instead of the SOAP response message shown in the example. For information on SOAP fault messages returned for a method, see Handling Web service errors and SOAP faults.