BridgeGate Server

Using the Web Service Adapter to Connect to External Web Services

155 views September 12, 2016 August 1, 2018 admin 0

Overview

Use this guide to create and configure a Workflow that will make a call an external web service. GetData and SendData items will used to initiate calls to external web services, not to receive calls. A tutorial has been provided that demonstrates much of this functionality, and can be found within the BridgeGate documentation found in the workbench. This guide is written with the assumption that the user has a general knowledge of Web Services terminology and operations.

Discovery

Prior to beginning, the following information should be gathered:

Service Endpoint URL: This is the URL of the “service endpoint” (the actual deployed, functioning location of the service implementation, for example, http://www.webservicex.net/ConvertWeight.asmx).

Target Namespace: This is the target namespace of the XML elements that will be sent as the response upon invoking the web service. This attribute is not required for all services, but may be required for the particular web service being implemented.

Request Element: This is the name of the top-level request element that a client will send inside the SOAP request’s body. It is typically the same as the name of the web service operation to be performed. This attribute is required.

SOAP Action: This is the URL that a client will send in the “SOAP Action” header. This attribute is not required for all services, but may be required for the particular web service being implemented.

Username and Password: The user name and password to be sent as part of HTTP basic authentication. These attributes are not required for all services, but may be required for the particular web service being accessed. If additional forms of authentication are required, such as WS-Security, please contact BridgeGate support.

Timeout: This is the number of seconds the call to a web service will wait before the call times out. If empty, the default used is 30 seconds.

In Values: This is a list of parameters required by the web service. When utilizing a WSDL the In Values will be pre-populated.

Out Values: This is a list of return values that will be sent back in the SOAP response. When utilizing a WSDL the Out Values will be pre-populated.

 

Creating the Workflow Items

The following assumes that the workflow is already created.

Create a Get Data Item

  • Right click inside the “Workflow Items” area and create a new “Get Data” item (See Figure A).
  • Connection Type: select “Web Service
  • Populate fields as noted in the Configuring Workflow Items section below.

Creating as a Send Data Item:

  • Right click under the “Workflow Items” and create a new “Send Data” item (See figure B).
  • Connection Type: select “Web Service
  • Populate fields as noted in the Configuring Workflow Items section below.

Configuring the Workflow Items

 Use WSDL: If using a WSDL point to its location (for example, C:\temp\ConvertWeight.asmx,  http://www.webservicex.net/ConvertWeight.asmx?WSDL) and then select Refresh.

 Binding: This is the Binding as drawn from the WSDL. This field is only available when utilizing a WSDL.

Operation: This is the Operation as drawn from the WSDL. This field is only available when utilizing a WSDL.

 Service Endpoint URL: This field is required.

 Target Namespace: This field is not mandatory for all web service calls.

 Request Element: Should be populated with the top-level request element that a client will send inside the SOAP request’s body. This field is required.

 Use SOAP Request Body as Result: If this box is checked, the entire contents of the SOAP Request Body (XML) will be available to later steps of the workflow as the result of the Get Data item. Otherwise, select the Use as Result option on one of the IN parameters to produce a data file for the Get Data item. This option is only available on Web Service Get Data items.

 Use SOAP Response Body as Result: If this box is checked, the entire contents of the SOAP Body (XML) will be written to a file as the synchronous response result of this Send Data item. Otherwise, select the Use as Result option on one of the OUT parameters to produce a synchronous response file for the Send Data item. This option is only available on Web Service Send Data items.

 Send Synchronous Response: If this box is checked, the connection to the sender of the web services request will be left open for later workflow steps to send data to.  Otherwise, the connection is severed. This option is only available on Web Service Get Data items.

 Maintain HTTP Session: This maintains the session cookie generated until the end of the workflow.

 Receive Synchronous Response: If this box is checked, the connection to the receiver of the web services request will be left open for later workflow Get Data items.  Otherwise, the connection is severed. This option is only available on Web Service Send Data items.

Send Source as SOAP Body: When checked, BridgeGate™ will send the Send Data item’s source (which must be valid XML) as the literal SOAP Body to the web service. This effectively ignores the Target Namespace , Request Element Name , and In Values (tab) settings.

The In Values tab allows definition of the parameters to send to the remote web service. All attributes for the selected IN value are the same as the In Values tab for Plug-ins. Note the following:

The context menu on the In Values tree has the following two items:

  • Add In Value – Prompts for the name of the In Value and then adds it to the tree.
  • Delete Selected In Value – Deletes the selected In Value.

The Out Values tab allows definition of the parameters returned when the ‘invoked web service’ is processed. Note the following:

The context menu on the Out Values tree has the following two items:

  • Add Out Value – Prompts for the name of the Out Value and then adds it to the tree.
  • Delete Selected Out Value – Deletes the selected Out Value.
  • Use as Result – Selecting this will write the textual content of the selected Out Value to a file as the result of the Get Data item. This option is ignored (at process time) when Use SOAP Body as Result is selected on the Operation tab.
  • Add to Workflow Session – Selecting this allows naming a session variable where the returned value of this parameter will be stored for use by later workflow items.

Figures

ws_config1Fig. Aws_config2

Fig. B

Acronym Definitions

HTTP – Hypertext Transfer Protocol

SOAP – Simple Object Access Protocol

WSDL – Web Services Description Language

XML – Extensible Markup Language

Was this helpful?