Calling a SOAP web service from a workflow

To call a SOAP web service, identify the parameters used to call the SOAP web service. Test the exchange of data between RICOH ProcessDirector and the application. Then add a step based on the CallSOAPService step template to the workflow.
To call a SOAP web service from a workflow:
  1. Learn the requirements for communication with the SOAP web service for the application:
    • The values for authenticating with the application
    • The values for requesting data from the SOAP web service
    • The format of the data provided in the response

    Refer to the documentation for the application or consult with the company that hosts the application.

  2. To prepare RICOH ProcessDirector to communicate with the application, do these tasks:
    • If the application requires a security certificate, install the certificate on the RICOH ProcessDirector primary computer.
    • If your environment requires a proxy server to communicate with web services, set up the system to use it.
    • Import WSDL files for all the web services that you plan to call.

      RICOH ProcessDirector creates SOAP request objects from SOAP operations in the WSDL file. You specify a prefix that RICOH ProcessDirector adds to the names of the SOAP operations when it creates the objects. A SOAP request object lets RICOH ProcessDirector determine the SOAP version and other information required to make a correct call to the web service.

    For more information, see the related tasks.

  3. Run a manual test that authenticates with the application and requests a response from the SOAP web service. Verify that the web service returns the response that you want.
    Many browsers have plug-ins, such as Boomerang for Google Chrome, that test web service calls to SOAP clients.
  4. Decide how you want to specify the request:
    • You can enter the payload as the value of the Request payload property.
    • You can store the payload in a text file that the CallSOAPService step can access during job processing.
  5. Click the Workflow tab.
  6. Click the name of the workflow you want to modify.
  7. Optional: Disable the workflow by clicking the switch to the left of the workflow name.
    If you do not disable the workflow while you edit it, jobs that use this workflow continue to move through steps. When you save, the workflow is momentarily disabled then enabled again. Jobs that are processing in the workflow could move into error.
  8. Review the steps that are included in the workflow and the default values that they set.
  9. Add a step based on the CallSOAPService step template to the workflow in the appropriate place.
  10. Set values for the job properties.
    1. Set the Request URL property to the URL of the web service that the step calls.
      The URL can use either the HTTP or HTTPS protocol.
    2. Set the Password property to the password that the step provides to the SOAP web service to authenticate with the application.
      You enter the password as the value of this property. To provide the password to the SOAP web service, specify the Job.WebService.Password property as a symbol in the Request payload or Request URL property: ${Job.WebService.Password}. To determine which property to use, refer to the documentation of the web service.
    3. Set the Request payload type property:
      • To specify the body of the web services request as the value of the Request payload property, select TEXT.
      • To specify the body of the web services request in a text file that the CallSOAPService step can access during job processing, select FILE.
    4. Set the Request payload property:
      • If you set the Request payload type property to TEXT, enter the payload as the value of this property.
      • If you set the Request payload type property to FILE, enter the full directory path, name, and extension of the text file as the value of this property.

        Enter the payload in the text file.

      To send the password in the payload, specify the Job.WebService.Password property as a symbol.

      In this example, order ID is stored as the value of the Custom 3 job property ( Job.Info.Attr3). The payload includes the password as the value of the <Token> element and order ID as the value of the <OrderID> element:

      <Token>${Job.WebService.Password}</Token><OrderID>${Job.Info.Attr3}</OrderID>

      The step resolves the symbols when it calls the SOAP web service.

    5. If your environment requires a proxy server to communicate with web services, set the Use proxy property to the correct proxy server.
    6. Set the Response file property to the full directory path and name of the file that RICOH ProcessDirector uses to store the response from the application.
      Typically this value is ${getFileName(print,xml,write)}.
      After the response is stored in the file, other steps in the workflow can process the response.
    7. Set the SOAP request property to the SOAP request that RICOH ProcessDirector created when you imported the WSDL file.

      For example, you want to use the GetOrdersByDate SOAP request. You prepended PrintShop to the names of the SOAP requests when you imported them. Select PrintShop-GetOrdersByDate.

  11. When you finish, click OK.
  12. Save and enable the workflow.

When you finish setting up your workflows, test the exchange of data between RICOH ProcessDirector and the application.

Example

The MarcomCentral Connect feature includes two supplied workflows with CallSOAPService steps.