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.
(1) API protocol: Choose option "Is a SOAP-WS request".
(2) URL: Enter value "https://localhost:443/dw/Request/addition_web_service". That is our local web service.
(3) Content type: Use value "application/soap+xml" (is the default value).
(4) Request WSDL: Click on this button. Another dialogue appears.
(5) WSDL URL: The URL entered in (2) automatically appears here with the suffix "?wsdl".
(6) Request WSDL: Now click here to request the WSDL file of the web service via the URL (5).
(7) Port type/method: Here you get a list of all available methods of the web service (in our case only one).
(8) Apply: If you click here, a suitable file data structure will be entered in the data field.
(9) Data: 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) Test: 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.
(11) Create structure: 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) Adjust HTTP headers: Some web services require additional values that are expected in the HTTP header, such as eBay (application ID, etc.). These can be set here.