Web Services

Configure the message flow nodes that are converted from the IBM App Connect Professional Web Services activities.

About this task

You converted your orchestration into a message flow. See Table 1, for information on which nodes are used for each of the activities.

Steps are split into sections and are intentionally brief to get you started quickly on configuring the nodes in your message flow. See linked topics in the table for more comprehensive information on configuring the nodes.

Table 1. IBM App Connect Professional Web Services activities and the corresponding IBM App Connect Enterprise message flow nodes
IBM App Connect Professional activity IBM App Connect Enterprise node
Provide Service activity

SOAPInput node

Invoke Service activity

SOAPRequest node

Send Reply activity

SOAPReply node

Send Reply with Fault activity

SOAPReply node and

Compute node

Note: If the data that is output from SOAPInput and SOAPReply nodes is in any format other than XML, you must use a Compute node to transform the data, for example, from JSON to XML.
SET OutputRoot.XMLNSC.ns4:Body = InputRoot.JSON.Data;
The SOAPRequest node requires some input to work. Use the Compute node to provide the input. Even if no input is required, you must provide an empty string, for example:
SET OutputRoot.XMLNSC.ns4:Body = '';

Selecting a WSDL file

Procedure

  1. Select a SOAP node in the message flow. The Operation mode section opens in Properties, in the Basic tab.
  2. Click Browse to select the WSDL file. In the WSDL Selection window, click Import/Create New.
  3. Select the WSDL file from your local file system.

    Image of the interface for selecting the WSDL file.

  4. Select the binding or definition. Click Finish.
  5. In the WSDL Selection pop up, click the selected WSDL file, then click OK.
    The port type, service port, and other property fields are completed based on the WSDL file data. You can change them as required.

SOAPInput node - Provide Service activity

Procedure

  1. To use the WSDL file from the Provide Service activity, select the SOAPInput node in the message flow.
  2. Upload the WSDL file. See Selecting a WSDL file for how to choose the file.
  3. In the HTTP Transport tab, provide the location of the web service that accepts the inbound messages.
    If you don't have a WSDL file, complete the following steps:
  4. Select the Operate in gateway mode option in Operation mode.
  5. In the HTTP Transport tab, provide the path suffix for the URL on which the SOAPInput node accepts inbound messages.
  6. In the Security tab, provide the security policy name.
    For more information on creating a security profile, see Authenticating incoming requests by using credentials stored in the vault.

SOAPRequest node - Invoke Service, Local, and HTTP activities

Procedure

  1. To use the WSDL file from the Invoke Service activity, select the SOAPRequest node in the message flow.
  2. Select the Operation mode as Specify WSDL interface to expose and upload the WSDL file. See Selecting a WSDL file for how to choose the file.
    If you don't have a WSDL file, complete the following steps:
  3. Select the Operate in gateway mode option in Operation mode.
  4. In HTTP Transport tab, provide the location of the HTTP path that you’ve configured in a different message flow in the Web Service URL field.
  5. Select the compression format in the Use compression field.
  6. In the Security tab, provide the security policy name.
    For more information on creating a security profile, see Authenticating incoming requests by using credentials stored in the vault.

SOAPRequest node - Remote activity

Procedure

  1. Provide the WSDL file for the web service you want to invoke. See Selecting a WSDL file for how to choose the file.
  2. In HTTP Transport tab, provide the location of the web service that you want to invoke from this node, in the Web service URL field.

Compute node with the SOAPReply - Send reply with fault activity

Procedure

  1. Connect the error terminal of the node where there is a possibility of getting an error to Compute node.
  2. Add a Compute node to your flow and connect it to a node where you might expect to catch an error. For example, see Figure 1
    Figure 1. Adding a Compute node in your message flow when you want to catch an error.
    Image of a message flow with a SOAP Input, HTTP Request, Compute and Soap Reply nodes. The Compute node is highlighted.
  3. In the Compute node, you can set the StatusCode to the one that is returned by the node or you can set your own status code. For example:
    SET OutputRoot.XMLNSC.ns:Body.ns:StausCode = InputLocalEnvironment.WrittenDestination.HTTP.StatusCode;
    or
    SET OutputRoot.XMLNSC.ns:Body.ns:StausCode = 400;
    You can create the status code for an error in the same way.
  4. Connect the out connection of the Compute node to the SOAPReply node so that when an error is encountered, the error code and the error message are returned.

Handling the Provide Service activity and Does Not Require a Reply option

Procedure

  1. Configure a message flow with an empty response.
    Behavior in IBM App Connect Professional
    • In the Web Services Provide Service activity in IBM App Connect Professional, if the Requires a Reply checkbox is not selected, the response behavior is automatically configured as false.
    • When Requires a Reply is set to false, a Send Response activity does not need to be included and the orchestration automatically generates an empty message on execution.
    Behavior in IBM® App Connect Enterprise
    • In IBM App Connect Enterprise, a SOAPReply node is mandatory for responding to incoming SOAP requests.
  2. To implement an empty response without explicitly setting one, use the following nodes:
    • FlowOrder node: Ensures that the standard reply is sent back first.
    • Compute node: Adds the standard response to be sent by the SOAPReply node.
    • SOAPReply: Sends the response back to the client.
    Compute node code:
    CREATE COMPUTE MODULE getctryisocode_ComputeNode_4_
    CREATE FUNCTION Main() RETURNS BOOLEAN
    BEGIN
    SET OutputRoot.JSON.Data.Message =' ';
    RETURN TRUE;
    END;
    END MODULE;
    For an example of the message flow with the FlowOrder node, see Figure 2.
    Figure 2. Message flow example for implementing an empty response.
    Image of a message flow with a SOAP Input, Flow order, Compute, Log message and Soap Reply nodes.