Difference between revisions of "Web Services Integration"
imported>Aeric |
imported>Aeric |
||
Line 100: | Line 100: | ||
#*: If the service has a version identifier, it is displayed following the service name | #*: If the service has a version identifier, it is displayed following the service name | ||
#*: For example: <tt>Some Service [Version 2]</tt> | #*: For example: <tt>Some Service [Version 2]</tt> | ||
#* '''Input Mapping -''' For each field that goes ''to'' the service, choose one of the following, and then choose the WSDL field that the value goes into: | #* '''Input Mapping -''' For each field that goes ''to'' the service, choose one of the following, and then choose the WSDL field that the value goes into, from the list of ''friendly names'' defined in the Web Service configuration: | ||
#:* '''Use Object Field -''' Select a field from the current record | #:* '''Use Object Field -''' Select a field from the current record | ||
#:* '''Use Fixed Value -''' Define a fixed value | #:* '''Use Fixed Value -''' Define a fixed value | ||
Line 111: | Line 111: | ||
#:*:* Click '''[Insert]''' to insert the result into the mapping field | #:*:* Click '''[Insert]''' to insert the result into the mapping field | ||
#* '''Output Mapping -''' For each field that comes ''from'' the service, choose one of the following, and then choose the record field to store the value in: | #* '''Output Mapping -''' For each field that comes ''from'' the service, choose one of the following, and then choose the record field to store the value in: | ||
#:* '''Use WSDL Field -''' Select a WSDL output field | #:* '''Use WSDL Field -''' Select a WSDL output field from the list of ''friendly names'' defined in the Web Service configuration. | ||
#:* '''Use Expression -''' Create an expression based on WSDL fields. When the dialog opens: | #:* '''Use Expression -''' Create an expression based on WSDL fields. When the dialog opens: | ||
#:*:* Click '''Field''' to select a WSDL field | #:*:* Click '''Field''' to select a WSDL field | ||
Line 119: | Line 119: | ||
#:*:* Click '''[Insert]''' to insert the result into the mapping field | #:*:* Click '''[Insert]''' to insert the result into the mapping field | ||
# Click '''[Save]'''<br>When the process reaches this step, the Web Service is automatically invoked, and the specified data interchange occurs. | # Click '''[Save]'''<br>When the process reaches this step, the Web Service is automatically invoked, and the specified data interchange occurs. | ||
<noinclude> | |||
[[Category:Application Design]] | |||
</noinclude> |
Revision as of 23:13, 12 September 2013
About Web Service Integration
Web Services whose connections are specified using the Web Service Description Language (WSDL) can be integrated into the platform without programming, by performing a few configuration steps.
In addition, the interface defined by the WSDL can be simplified by the IT admin, so it more closely matches the application, by:
- Ignoring fields that are not needed
- Hardcoding data for fields whose values are fixed
- Creating more application-friendly names for the remaining fields defined in the WSDL
Those steps are covered below, under Configuring a Web Service.
Once done, an application designer can add a step in a Process Model to utilize the Web Service. The designer then uses the application-friendly names to:
- Map current record fields to and from WSDL input and output fields
- Specify fixed values or expressions for WSDL input fields
- Define expressions that operate on WSDL output fields and store the results in the record
The mechanisms are discussed further below, under Working with a Web Service.
Managing Web Service Configurations
Creating a Web Service
Start by uploading the WSDL file:
- Download the WSDL file for the service the application will connect to.
(Web Services managed by the WebMethods integration server are recommended.) - Go to > Developer Resources > Web Services
- Click [New Web Services Invocation]
- Click [Select WSDL]
- Browse to the folder that contains the WSDL file, and upload it.
You can now configure a service:
- In the form that opens, specify:
- Basic Parameters:
- Title - Give the service a title. (Displays in the Name column of the Services list.)
- Operation - Choose one of the operations defined in the WSDL file
- Version - Optional. Enter text to identify the service version
- Service Parameters:
- URL - Optional. Use this field to point to a destination other than one defined in the WSDL file
- Username -' Username required to use the service, when required
- Password - Password required to use the service, when required
- TTL - Time to Live. Optional. The amount of time the platform will wait before abandoning a service request, in milliseconds.
- Click [Next]
You can now begin to simplify the service for designers.
Start by mapping input fields (fields going to the service) defined for the WSDL file.
- For each input field, choose one of:
- Ask for Mapping -
- Friendly Name - Give the WSDL field a name the application designer will recognize
- Ignore -
- Hardcode - Provided a hardcoded value for the field. (The application will never even see it.)
- Username - Supply the Username value defined in the initial configuration step ($username).
- Password - Supply the Password value defined in the initial configuration step ($password).
- Click [Next]
Then map output fields (fields coming from the service):
- For each output field, choose one of:
- Ask for Mapping - Ask the designer to supply the name of a record field to store the value into.
- Friendly Name - Give the WSDL field a name the application designer will recognize
- Ignore - Ignore this value
- Click [Save]
The Web Service is now ready for use by an application designer.
Viewing and Modifying a Configuration
- Go to > Developer Resources > Web Services
- Click the Service name
- Click [Details]
- Follow the steps described in the previous section to view the configuration and make changes.
Adding a New Version
- Go to > Developer Resources > Web Services
- Click the Service name
- Click [Add New Version]
- Follow the steps described earlier to add another version of the service.
(Be sure to provide a value in the Version field.)
Testing a Service
- Go to > Developer Resources > Web Services
- Click the Service name
- Click [Test Service]
- Provide input values.
- Click [Execute]
- Output values are displayed
Working with a Web Service
Once a Web Service has been configured, you can add it as a step in a Process Model:
- Go to > Objects > {object} > Process Models
- Select an existing process model, or create a new one
- From the palette, drag the element to Execute Web Service into the model
- Fill in the parameters for this process step:
- Name - Give the step a name
- Web Service - Select one of the Web Services configured for the application
- If the service has a version identifier, it is displayed following the service name
- For example: Some Service [Version 2]
- Input Mapping - For each field that goes to the service, choose one of the following, and then choose the WSDL field that the value goes into, from the list of friendly names defined in the Web Service configuration:
- Use Object Field - Select a field from the current record
- Use Fixed Value - Define a fixed value
- Use Expression -
- Use Expression - Create an expression based on record fields. When the dialog opens:
- Click Field to select a field in the record, or in a record referenced by a Lookup
- Click the dropdown to select an operator
- Click Function to select a Function
- Click in the text area to enter a value
- Click [Insert] to insert the result into the mapping field
- Output Mapping - For each field that comes from the service, choose one of the following, and then choose the record field to store the value in:
- Use WSDL Field - Select a WSDL output field from the list of friendly names defined in the Web Service configuration.
- Use Expression - Create an expression based on WSDL fields. When the dialog opens:
- Click Field to select a WSDL field
- Click the dropdown to select an operator
- Click Function to select a Function
- Click in the text area to enter a value
- Click [Insert] to insert the result into the mapping field
- Click [Save]
When the process reaches this step, the Web Service is automatically invoked, and the specified data interchange occurs.