Calling SOAP web service with profile in Input Agent

Please import the following profile and set it to active. This profile serves us as a local web service: Profile-Profile_as_web_service_dynamic_response.pak.

Calling the web service


Now import the following profile. We use this profile to call the local web service in the Input Agent: Profile-Calling_web_service_with_input_agent.pak

Please open the example profile and navigate to phase 1.


images/download/attachments/159865899/1895-version-4-modificationdate-1718087173408-api-v2.png images/download/attachments/159865899/1896-version-2-modificationdate-1718009401867-api-v2.png


(1) Choose this option.

(2) Enter value "https://localhost:443/dw/Request/addition_web_service". That is our local web service.

(3) Use this value (is the default value).

(4) Click on this button. Another dialogue appears.


images/download/attachments/159865899/1897-version-1-modificationdate-1701313387484-api-v2.png


(5) The URL entered in (2) automatically appears here with the suffix "?wsdl".

(6) Now click here to request the WSDL file of the web service via the URL (5).

(7) Here you get a list of all available methods of the web service (in our case only one).

(8) If you click here, a suitable file data structure will be entered in the data field.


images/download/attachments/159865899/1898-version-2-modificationdate-1701313511433-api-v2.png


(9) Replace the text add_some_value_here (occurs twice) with 1 and 2. These are the two numbers to be added. Note: Of course, you do not always want to add 1 and 2. You are allowed to use placeholders in the request code with the syntax @VARIABLENAME@ . In that case, it makes sense to build another profile that is calling this profile via message. You can fill a variable VARIABLENAME in the calling profile and use it in the called profile with syntax @MSG_CALL_VARIABLENAME@. Remember to define variable MSG_CALL_VARIABLENAME in the called profile (see section Variables with Prefix MSG_CALL_). Simply use your placeholders instead of the fixed values 1 and 2 in your request template.

(10) Now click this button. Another dialogue with the response of the web service appears, in which you will find the text <result>3</result>, i.e. the result of our addition.


images/download/attachments/159865899/818-version-1-modificationdate-1700622890237-api-v2.png

(11) Finally, you can automatically create a source structure suitable for the result data here. Note: In this example, the data was exchanged via SOAP XML. The request is embedded in an envelope (<soap:envelope>....</soap:envelope>) and the actual data is embedded in the body (<soap:body>...</soap:body>). The response is delivered in the same way. The body data is created and parsed just like any other XML file. Note: The response has the encoding UTF-8 (→ Main Settings).

(12) Some servers require the HTTP header SOAPAction. During the XML generation, the value behind SOAPAction: in comment (12) is read and used as value for this (automatically generated) HTTP header.

(13) Some web services require additional values that are expected in the HTTP header, such as eBay (application ID, etc.). These can be set here.

Setting HTTP request headers


See (13).