Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 16 SOAP Palette : Retrieve Resources

Retrieve Resources
Activity
The Retrieve Resources activity generates a WSDL file containing a concrete service description of any process definition that has a SOAP Event Source process starter. This allows clients to access the WSDL for a web service that is implemented by a TIBCO ActiveMatrix BusinessWorks process definition. The client can then use the WSDL file to invoke the web service.
The Retrieve Resources activity can also be used to retrieve any other resources, including XSDs and WSIL.
Using Retrieve Resources
This activity is normally used in conjunction with an HTTP Receiver process starter and a Send HTTP Response activity. The HTTP Receiver process starter can receive an HTTP request and pass it along to the Retrieve Resources activity. When a request is made to retrieve a WSDL file for a process definition that has a SOAP Event Source process starter, Retrieve Resources creates a WSDL file dynamically. This file contains the concrete service definition of the specified BusinessWorks process definition. The WSDL file or other requested resources are then placed into the output for this activity.
You can then pass the output of the Retrieve Resources activity to the Send HTTP Response activity to send the response back to the requestor.
Figure 26 illustrates a process definition using the Retrieve Resources activity.
Figure 26 Process definition using the Retrieve Resources activity
When sending the HTTP response, set the Headers/Content-Type item on the Input tab to the appropriate type for the type of resource retrieved. Use "text/xml" when this activity is used to retrieve a WSDL file. See Format of URLs for HTTP Requests for more information on the format of the URL for the HTTP request for retrieving resources.
See the descriptions of the Input and Output tabs for this activity for more information about binding the HTTP request to this activity’s input and binding this activity’s output to an HTTP response.
If you want to test a process definition containing this activity, you must load the process definition containing this activity along with the process definition containing the SOAP Event Source process starter into the test window. For more information about loading multiple process definitions when testing, see TIBCO ActiveMatrix BusinessWorks Process Design.
Format of URLs for HTTP Requests
To use the Retrieve Resources activity, the HTTP request must have one of the following forms:
http://<host>:<port>/<path>/<resourceName>?wsdl
http://<host>:<port>/<path>/<resourceName>
http://<host>:<port>/inspection.wsil
 
<host>
<port>
<path>
Note: Any special characters in the path or resource name (such as &, =, or space) are mangled in the generated WSDL file. It is a good idea to avoid special characters in the folder and resource names.
<resourceName>
Note: Use resourceName.serviceagent to reference a Receive Partner Notification resource
Examples
The following is an HTTP request that retrieves the WSDL file for the process named GetPurchaseOrder stored in the folder Purchasing:
 
http://purch:8877/Purchasing/GetPurchaseOrder?wsdl
The following is an HTTP request that retrieves a WSIL file containing all process definitions with SOAP Event Source process starters:
 
http://purch:8877/inspection.wsil
The following is an HTTP request that retrieves the PurchaseOrder.xsd file:
 
http://purch:8877/Purchasing/Schemas/PurchaseOrder.xsd
The following is an HTTP request that retrieves the WSDL file for the Service resource named BuyerService :
 
http://server:8877/BuyerService.serviceagent?wsdl
Configuration
The Configuration tab has the following fields.
Input
See TIBCO ActiveMatrix BusinessWorks Process Design for more information about mapping and transforming input data.
The input for the activity is the following.
This overrides to the <path> and <resourceName> portion of the incoming HTTP request that is used to retrieve TIBCO ActiveMatrix BusinessWorks resources. See Format of URLs for HTTP Requests for a description of the URL format for HTTP requests.
Note: This value is used when creating the import statements (WSDL descriptions, WSIL, and XSDs).
Note: This value is used when creating the import statements (WSDL descriptions, WSIL, and XSDs).
Output
The output for the activity is the following.
Error Output
The Error Output tab lists the possible exceptions that can be thrown by this activity. See TIBCO ActiveMatrix BusinessWorks Error Codes for more information about error codes and corrective action to take.
Built-in Resource Provider
TIBCO ActiveMatrix BusinessWorks provides an alternative way to retrieve resources using a feature called Built-in Resource Provider.
This feature enables the BusinessWorks engine to listen on a configured port and retrieve resources such as a WSDL file, XSD file, Process file, Image file, and so on. This out-of-the-box solution performs tasks similar to that of the Retrieve Resource activity, but eliminates the need to create a process definition to use the Retrieve Resource activity. Refer to Figure 26, Process definition using the Retrieve Resources activity for details about the process definition.
Since the feature works the same as Retrieve Resource activity, the client side functionalities with respect to Retrieve Resource activity remain the same.
However, the only exception is that this feature does not support Client authentication for SSL.
TIBCO BusinessWorks provides parameters to enable or disable the feature, and override the defaults configuration. You can set these values in the bwengine.xml to be reflected in the TIBCO Administrator after deploying the project.
bw.platform.services.retreiveresources.Enabled
This property specifies whether the Built-in Resource Provider feature is enabled or not. Setting it to true enables the feature. By default it is set to false.
bw.platform.services.retreiveresources.Httpport
This property specifies the port number that is configured to listen for incoming HTTP requests. This property is set to 8010 by default.
bw.platform.services.retreiveresources.isSecure
This property specifies if the incoming requests must use the HTTPS (secure socket layer) protocol. The HTTPS protocol authenticates the server to the client. By default, this property is set to false.
bw.platform.services.retreiveresources.enableLookups
This property, when set to true, enables the HTTP client to look up a Domain Name System and resolve the IP address to a DNS Name.
Setting this property to true adversely affects the throughput. Hence this property can be enabled only when required. By default, this property is set to false.
bw.platform.services.retreiveresources.defaultEncoding
This property specifies the encoding to use for the URL if no charset is specified in the Content Type header of the message. By default, this property is set to ISO-8859-1.
bw.platform.services.retreiveresources.identity
This property specifies the Identity resource that contains the HTTP Server’s digital certificate and private key. This property is available when the bw.platform.services.retreiveresources.isSecure property is set to true.
bw.platform.services.retreiveresources.Hostname
This property specifies the hostname to which the request will be sent. It is useful to identify the exact host in a multi-host configuration to whom the request will be sent.By default, this property is set to localhost.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved