Create a Web Service Provider to begin the process of generating a WSDL file that identifies the server hosting the Web Service, lists the operations that can be executed, and provides XML Schemas so a consumer knows how to form their request message and understand the response message.
Once created, you further define this object to establish resources required to make a REST or SOAP Service available for consumers.
Creating a Web Service Provider
- Select File | New | Web Service Provider from the main menu bar.
- Select a Web Service Consumer type - choices are SOAP/WSDL or REST using the radio buttons. Click Next to proceed.
Note: Select Synchronous if you plan to use an output Schema to send a response to consumers of your service. While an input Schema is needed to receive the request from a consumer, an output schema (i.e. response) is optional. When synchronous, the output Schema is required.
- Select Source folder, Package, and Name.
Note: Since the name you select here will also be the name of the service to be provided, it is good practice to include descriptive naming (while following recommended naming conventions).
- Click Finish. An editor appears.
Defining a Web Service Provider (REST)
Defining this object establishes the required objects when providing a REST Service to be made available for consumers.
- Under Settings, the Service Name is populated with the actual name you provided when the Web Service Provider object was first created.
- The Business Process is also pre-populated.
Clarify automatically creates a corresponding package containing a Business Process, which is preconfigured with the Web Service Provider object just defined in this task. The Business Process contains two tasks: SendRestReply, which sends the response message to a consumer, and SetExitStatus, which sets the Business Process’s Exit Status to true. All task parameters are pre-populated. Additional configuration is required.Note: Any additional tasks will need to be added and defined to the Business Process. For example, some additional tasks might include determining the requested purchase order number (using GetProperty), gathering the data, and generating an e-mail (SendEmail).
- To configure HTTP Basic Authentication Validation for this Web Service Provider, select Basic from the Authorization Type drop-down.
Basic Authentication must be enabled through Access Control. Once the object has been configured (and deployed), basic authentication must be enabled through the Access Control View in the Admin Console. To do so, create or edit a user profile so that it contains the Authorize Web Services Provider Connections security permission. Only users with a specific Access Control permission (Add/Modify/Delete Users, Roles, and LDAP Profiles) can do this.Note: For added security, do not assign the Web Services permission to the existing admin or superuser roles. - Under the Default Response HTTP Headers section, include any additional Header information required as part of the consumer request.
HTTP header fields are components of the message header of requests and responses used in HTTP. They define additional information about the request to and response from the Service provider. This additional information may be sent with the status codes. This may include required authentication info, such as user name and password, or just additional information about the requester. They can be used to override common headers, or create custom ones. Examples of common header fields include cookie, ETag, Location, HTTP referer, DNT, and X-Forwarded-For.
Defining a Web Service Provider (SOAP/WSDL)
Defining this object establishes the resources required when providing a service to be made available for consumers using the SOAP protocol.
- Under the Service section, the object name (that you created) automatically appears in the Name field. This indicates the Service to be made available. Names should be descriptive.
- In the External Address field, enter the external server address that consumers will use to obtain your service. This information is typically the domain of your IT department.
- As in the step above, the information to be entered in the External Port field can be provided by your IT department, or someone responsible for your company's server management policies.
- To configure HTTP Basic Authentication Validation for this Web Service Provider, select Basic from the Authorization Type drop-down.
Note:
SSL must be enabled when using Basic Authentication. To enable, select the SSL checkbox.
Basic Authentication must be enabled through Access Control. Once the object has been configured (and deployed), basic authentication must be enabled through the Access Control View in the Admin Console. To do so, create or edit a user profile so that it contains the Authorize Web Services Provider Connections security permission. Only users with a specific Access Control permission (Add/Modify/Delete Users, Roles, and LDAP Profiles) can do this.
Note: For added security, do not assign the Web Services permission to the existing admin or superuser roles. - Use the Operation section to create, define, and use multiple operations from within a single Provider object.
- To create: Click the button to add an operation.
- Provide a name for the operation. When defining the operation name, it should follow a descriptive, verb-noun pattern. For example: lookupOrders or lookupOrdersByID
If planning to use an output Schema to send a response to consumers of your service, then select the Is Synchronous checkbox. While an input Schema is needed to receive the request from a consumer, an output schema (i.e. response) is optional. When synchronous, the output Schema will be required.
- The source folder, Package Name, and Business Process name are generated for you in the next screen; however one recommendation is to add a package name to the existing package location designated for the Business Process associated with your new operation.
The example above shows that “Lookup” has been appended to the existing package. The example below shows how this package has been created; and it contains the LookupOrdersById Business Process.
- For each operation created, the corresponding Properties view displays the following:
Comments
0 comments
Please sign in to leave a comment.