uCosminexus Service Platform, Reception and Adapter Definition Guide

[Contents][Glossary][Index][Back][Next]

3.3.1 Defining SOAP adapters

This subsection describes how to define SOAP adapters. You can define SOAP adapters in the service adapter settings screen.

Organization of this subsection
(1) Service component message format
(2) Data transformation
(3) Specifying the basic authentication
(4) Displaying the service adapter settings screen
(5) Operations to be performed in the service adapter settings screen
(6) Setting a client definition file

(1) Service component message format

For Web service, the message format definition file created from WSDL will be the message format definition file of a service component. Therefore, you need not set the service component message format along with the request and response messages.

For details on how to create a service component message format, see 4.3.2 Creating a Service Component Message (for Web Services) in the manual Service Platform Basic Development Guide.

(2) Data transformation

If the message format of the service requester and the message format of the service component invoked by the service adapter are different, data transformation is required.

When performing data transformation for a request message, specify a message entered from the service requester in the standard message using the service adapter settings screen, and then define data transformation in the data transformation definition screen. When performing data transformation for a response message, specify the standard message in the message returned from the service component, and then define data transformation in the data transformation definition screen.

For details on data transformation, see 6. Defining Data Transformation in the manual Service Platform Basic Development Guide.

Note
Note
Select the following elements in the root element of a message format to define data transformation in SOAP adapters:
  • For document/literal
    Request message: Element indicating element attribute of <wsdl:message><wsdl:part> that is referenced by <wsdl:operation><wsdl:input>
    Response message: Element indicating element attribute of <wsdl:message><wsdl:part> that is referenced by <wsdl:operation><wsdl:output>
  • For rpc/literal
    Request message: Element with the name same as "Operation name"
    Response message: Element with the name same as "Operation name + "Response"".

(3) Specifying the basic authentication

When the target service component is on a Web server that requires user authentication, you must set up the basic authentication (a user name and a password).

(4) Displaying the service adapter settings screen

Display the service adapter settings screen to define a service adapter. The service adapter settings screen is displayed, when you select and double-click the applicable service adapter from the service definition list in the tree view.

(5) Operations to be performed in the service adapter settings screen

The procedure for defining SOAP adapters is as follows:

  1. Display the service adapter settings screen.
    For details on how to display the service adapter settings screen, see 3.3.1(4) Displaying the service adapter settings screen.
  2. In Service component control information, edit Service name, Service ID, Address, and Maximum instances, as necessary.
  3. From the drop-down list of Operation of the service component control information, select the operation to be edited.
  4. Check the contents displayed in the operation information.
  5. Check the Convert a system exception into a fault message check box of the service component control information, if necessary.
  6. Perform steps from 7 to 25 for request messages.
  7. Perform the following operations:
    When you define SOAP header information in a request message
    Perform steps from 8 to 14, and then proceed to step 15.
    When you do not define SOAP header information in a request message
    Proceed to step 15.
  8. Click the [Header] tab of request message.
  9. Select the root element of the header information from the drop-down list of [Root element].
    Name space of the root element selected in [Name space] is displayed. Name of the message format file used as header information in [Message format] is displayed. Add the root element of header information, if necessary.
  10. Perform the following operations:
    When you add the root element of header information
    Follow the steps from 11 to 13, and then proceed to step 14.
    When you do not add the root element of header information
    Proceed to step 14.
  11. Click the [Add] button of [Root element].
    The [Select message format file] dialog box is displayed.
  12. Select the message format used as the header information, and then click the [Open] button.
    The [Add header information] dialog box is displayed.
  13. Select the root element of the header information to be added from the drop-down list of [Root element], and then click the [OK] button.
    The added root element is added in [Root element] of the [Header] tab of request message. The root element is to be added at the end of the drop-down list.
  14. Click the [Display] button of message format.
    The message format to be used as the header information is displayed. Check the message format, if necessary.
  15. Click the [Body] tab of a request message.
  16. Check the [Use] check-box of a standard message.
  17. Specify [Format ID] of a standard message.
  18. Click the [Browse] button of a standard message and specify a standard message format in [Message format].
    Note that when specifying a message format that references an external XML schema, you must specify a file that corresponds to the root schema. The external XML schema file referenced by the root schema is automatically taken.
    For details on the style of the message format that can be specified, see 2.6.5 Scoping of XML schema in the manual Service Platform Basic Development Guide.
  19. Click the [Display] button of a standard message.
    The standard message format is displayed. Check the specified standard message format, if necessary.
  20. Specify [Format ID] of service component message.
  21. Click the [Display] button of service component message.
    The service component message format is displayed. Check the service component message format, if necessary.
  22. Perform the following operations:
    When you select the [Use] check box of a standard message
    Perform steps from 23 to 25, and then proceed to step 26.
    When you do not select the [Use] check box of a standard message
    Proceed to step 26.
  23. Enter the name of data transformation definition file.
  24. Click the [Edit] button.
    The data transformation definition screen is displayed.
    Note that when defining the message format initially, the [Select root element] dialog box is displayed.
    Also, if you change the message format, a dialog box for confirming whether to reflect the change of message format is displayed. For details on the procedure to be followed in case of changed message format, see 6.3.2 Procedure for defining changed message formats in the manual Service Platform Basic Development Guide.
  25. Map the standard message and the contents of the service component message.
  26. Similarly perform steps from 7. to 25. for the response message as well.
  27. Click the Service adapter definition (details) tab.
  28. Depending on whether the service component is on a Web server that requires user authentication, perform either of the following operations:
    When user authentication is required
    Perform steps from 29. to 31.
    When user authentication is not required
    Rest of the steps are not required.
  29. Select the [Use] check box for the basic authentication.
  30. In the user name and password columns, enter a user name and password required for the basic authentication.
  31. In the Password (Re-enter) column, enter the same password as that entered in the password column.

(6) Setting a client definition file

A client definition file controls the actions on the client (service requester) side. Set a client definition file using either of the methods, if necessary:

Setting of the client definition file is optional. When you do not set the client definition file, the contents of the template file are used as are.

(a) Setup procedure (When editing a template file)

The setup procedure to be followed when editing a template file is as follows:

  1. Click the [Edit] button in [Client definition file] of the service adapter settings screen (details).
    The editor used for editing a client definition file is started.
  2. Edit the client definition file using the editor.
  3. From Eclipse menu, select [File] - [Save] and save the definition contents.
(b) Setup procedure (Create a file and overwrite the template file)

The setup procedure to be followed when you create a file and overwrite the template file:

  1. Create a client definition file using a text editor and save it as "c4webcl.properties".
    Enter "c4webcl.properties" in lower case.
  2. Click the [Browse] button in [Client definition file] of the service adapter settings screen (details), and specify the client definition file that is created.
(c) Setting contents

Setting contents of the client definition file differ depending on whether you use SOAP1.1 mode or SOAP1.1/1.2 combination mode. The respective setting contents are described here.