How to Build a SOAP request using the HTTP Client Connector

Document created by mike_aronson Employee on Nov 14, 2013Last modified by chris_stevens on Aug 11, 2016
Version 2Show Document
  • View in full screen mode
The Web Service SOAP Client Connector does not support all web service specifications. Some web services are built to a different specification that is not supported by the connector.

The web service request may be able to built using the HTTP Client Connector instead. The following are general steps to build a SOAP request using the HTTP Client Connector. Please note that these steps are a general guide and may need to be modified depending on the specification. The request/response profiles shown below are just generic examples, your specific web service provider should provide API documentation that should be following when creating your operation including request/response profiles.

  1. Create the HTTP Client Connector and specify the Connection URL for the web service in the HTTP client connection component per the following guidance: HTTP Client Connector
  2. For most cases, you will leave the authentication type = None
  3. Create an HTTP Client Operation component with the following:
  4. Create the Request XML profile manually to match the web service SOAP API requirements. For example, the request profile will most likely contain elements:
    Envelope
    Header
    Action
    Body
    OperationElementName (for example: LogOn)
    ElementParameter1 (for example: UserName)
    ElementParameter2 (for example: Password)
    Declare and assign namespaces to the elements as required per the API.
  5. Tip: To help with profile generation, if you have access to the WSDL or schemas of the destination web service, use those to import the XML Profile or temporarily use the Web Services SOAP connector.
  6. Create the Response XML profile manually to match the API requirements. For example the response profile may contain elements:
    Envelope
    Header
    Action
    Body
    OperationElementResponse (e.g. LogOnResponse)
    OperationElementResult (e.g. LogOnResult)
    ResultElement1 (e.g. Status)
    ResultElement2 (e.g. StatusMessage)
    Declare and assign namespaces to the elements as required per the API.
  7. Set the Content-Type equal to the content type required per the web service specification. This field can be edited manually. For example:
    application/soap+xml;charset=UTF-8
  8. Set the HTTP Method equal to the method required per the web service specification. For example, set this to POST.
  9. Check the box for Return HTTP Response
  10. Create a new Request Header with the name = “SOAPAction” and the value equal to the web service url including operation – for example:
    http://www.somewebservice.com/DataService/LogOn
    Note that the SOAPAction value must include surrounding quotation marks, for example:
    SOAPAction: "add".
  11. Save the operation.
  12. There are two ways to generate the request:
    1. If there is no payload (e.g. an HTTP GET method) or you need to create a new payload (e.g. when making the call from the Start step), configure the Start/connector step and go to the Parameters tab. Create a new parameter for each input as required by the API. For example UserName can be assigned a static value or a value from a preset property or profile element.
      The Action may need to be set as a parameter with the value equal to the web service URL address including operation
    2. If you want to use the current document data as the payload (typically the case when sending TO the web service), you will not configure any Parameters on the connector step. Doing so will generate a new document instead of the one in your process. If you need to set any of the replacement variables on the HTTP Operation such as the SOAPAction, use a Set Properties step before the connector step and set a Dynamic Document Property whose name matches the HTTP Operation replacement variable name exactly.

 

Save these changes and execute the process with the HTTP client connector in test mode and review the response returned by the web service. Make changes if necessary depending on the response.

3 people found this helpful

Attachments

    Outcomes