Consuming a Web Service (Magic xpi 4.13)
To consume a Web service, follow these steps:
-
Define a Web Services Client resource in the Settings dialog box's Resource section. Alternatively you can define the resource while configuring the Web Service Client step. For more information, click here.
-
Place the Web Services Client component into the main flow area to access the Properties pane.
-
Right-click on the Web Services Client component and select Configuration from the context menu to open the Web Services Configuration dialog box. This dialog box enables you to select and display the SOAP service operations and arguments, and has the following fields:
|
|
Resource Name
|
This read-only field displays the name of the defined Web Service resource that you selected in the Resource Name field's drop-down list in the Properties pane.
|
Operation Name
|
This drop-down list contains the operations listed in the service WSDL. Select the required operation from the drop-down list.
|
Custom Header In
|
This is used to hold the header details to be sent as SOAP request to the external service.
|
Identity
|
Enter the identity of the sender to authorize the access to the Web service. This is applicable when the SOAP service's security level is set to Transport or WS-Security, you can authorize your access to the Web service.
|
Identity Password
|
Enter the password for the Identity of the sender to authorize the access to the Web service.
|
Custom Header Out
|
Click to open the Variable List and assign a variable for populating the Headers returned as part of the SOAP response of the Web service.
|
Fault
|
Click to open the Variable List and assign a variable for populating the fault returned as part of the SOAP response of the web service.
The returned Fault XML then can be parsed using the Fault schema generated for given operation at following location:
Projects\<<ProjectName>>\WebServiceClient\<<ResourceName>>\<<Port/Binding Name>>\<<OperationName>>\FAULT\<<OperationName.xsd>>
|
Operation Out
|
Click to open the Variable List and assign a variable for populating the response body returned as part of the SOAP response of the web service.
The returned result XML then can be parsed using the Response schema generated for given operation at following location:Projects\<<ProjectName>>\WebServiceClient\<<ResourceName>>\<<Port/Binding Name>>\<<OperationName>>\OUT\<<OperationName.xsd>>
|
Attachment Out
|
Click to open the Variable List and assign a variable for populating the received attachment(s) data of the web service.
In case of a new step configuration, for multiple Attachments out, the Attachment Out property will be empty. It will be the user’s responsibility to set appropriate blob variable.
|
If the existing project prior to upgrading to Magic xpi 4.12 contained multiple Out attachments for the configured step, then after migrating the step to Magic xpi 4.12, the Attachment Out parameter will be populated with only the first attachment.
The user will always have to use Attachment Out schema, regardless it was one Attachment Out or multiple Attachments Out. Checker will provide warning in case of multiple attachments, but it will always be the user's responsibility to change the logic to parse the Attachment Out as per the new schema.
|
|
This dialog box also contains the following button:
|
|
Attachments
|
This opens the Attachment Details dialog box. Here, you can assign the operation's attachments, if required.
Click Add to add a new attachment. You can assign In or Out direction for each attachment.
When an attachment of type In is added, an XML element gets added to the Destination pane of Data Mapper of the Web Service Client flow. On the other hand, when an attachment of type Out is added, an XDS Schema file gets generated.
|
After successfully saving the settings the XML Interface will be opened where you can configure the required values for the Web Service invocation.
|
-
Authentication of type Windows/NTLM is not supported while invoking a Web Service.
-
For each operation In, Out and Fault (if provided by WSDL) XSD gets generated.
|
Refactoring Limitations for Web Services Steps Migrated from pre-Magic xpi 4.12 Version
-
The Copy and Export option will not be allowed for steps which are incorrectly migrated. The checker will show errors for such steps.
-
The business process, flow, step or branch will not be allowed to import, if it contains pre-Magic xpi 4.12 version implementation of Web Service Client. Check the logs for more details.
-
Before executing the import or export command the resource should exist in the project, and in case of a migrated project, the resource should be migrated successfully and validated without any errors.
(Since version: 4.12)