Invoking a SOAP Service in the Cloud
You can invoke a SOAP service from a SOAP client such as SoapUI or by creating a reference process in TIBCO Business Studio and using the SOAP reference to invoke the service. In either case, you need a concrete WSDL that contains the correct URL for the endpoint of the service running in TIBCO Cloud Integration.
To invoke a SOAP service running locally, see Invoking a SOAP Service Running Locally.
This procedure assumes that you have created a SOAP service application and a SOAP client application in TIBCO Business Studio.
In the SOAP Service Application
- From the Project Explorer, open the abstract WSDL in the Service Descriptors folder of your SOAP service project using the Text Editor. Right-click on the .wsdl file in Service Descriptors and select . The .wsdl file opens in the right pane.
- Add the following only if you want to access the concrete WSDL in the local environment using a browser or SOAP client (SOAP service is running locally):
- The import WSDL schema location path, location="../Schemas/ProcessSchema.xsd". For example, <wsdl:import namespace="http://www.example.org/schema/1456722914701" location="../Schemas/ProcessSchema.xsd"/> where Process is the name of your service process.
- In the WSDL definitions, add the target namespace attribute. For example, if your target namespace is xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/", add it to the end of the WSDL definitions as follows: <wsdl:definitions xmlns:extns="http://www.example.org/schema/1456310280631" xmlns:tns="http://www.example.org/wsdl/1456310280587" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Process" targetNamespace="http://www.example.org/wsdl/1456310280587" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
- Save the changes.
- Push the service application to the cloud. See the topic, Pushing an Application to the Cloud for details on doing so.
- After the service is in a running state on the cloud, obtain the endpoint for the service. See the topic, Application Types and Endpoints for details on obtaining the endpoint of an application. Copy the endpoint of the running service and keep it handy. You will need to configure the WSDL file in the SOAP client process with this endpoint.
- Expand the Module Descriptors folder in the service project and double-click Components to open its properties page in the right pane.
- Expand the ComponentProcess and double-click the service name to open its properties.
- Click the Bindings tab.
- Click the Generate Concrete WSDL link.
- Click File System next to Location and navigate to a location on your local machine to save the WSDL file.
In the SOAP Client Application
Create a SOAP Reference
- Open the WSDL file of the client process and replace only the hostname and port of the "location=" value to reflect the hostname and port where the service is running. You can copy this information from the endpoint of the service running in the cloud. Do not delete the endpoint URL. For example,
if your original location was set to <soap:address location="http://localhost:8080/SOAPServiceBinding/service/"/> in the WSDL,after the edit it will look similar to the following:
In USA: <soap:address location="https://integration.cloud.tibcoapps.com/1u3ldn3j9o9o1bwvv4fjgnt4wse0wis6rh0vtz585pt9q9if5r/Service/SOAPServiceBinding/service/"/>
In Europe: <soap:address location="https://eu.integration.cloud.tibcoapps.com/1u3ldn3j9o9o1bwvv4fjgnt4wse0wis6rh0vtz585pt9q9if5r/Service/SOAPServiceBinding/service/"/>
- In the File Explorer view, navigate to the location where you saved the WSDL and drag and drop the WSDL file into the Service Descriptors folder of your client project.
- Create a SOAP reference in TIBCO Business Studio by dragging the concrete WSDL file from the Service Descriptors folder of your client project and dropping it on the right boundary of the Process Editor.
- Open the Bindings page of your SOAP reference by clicking on the reference in the Process Editor.
- Select Binding Reference - External from the Reference Type drop-down menu.
- Configure the client process flow as needed.
Do the following in your client application:
- Click on the reference to open its properties page and select Binding Reference - External from the Reference Type drop down menu and save your changes.
- Click the of the client process, expand the ComponentProcess and click the service.
- In the Bindings tab, click the Add Binding button and select SOAP Binding.
- Create an HTTP Client shared resource by clicking the button next to the HTTP Client Name under Transport Configuration.
- Under the client process, fully expand the Resources folder and double-click the newly created HTTPClientResource.
- Under HTTP Client section, edit the Default Host to point to the domain name from the URL of the cloud hosted service application, for example integration.cloud.tibcoapps.com in the case of TIBCO Cloud Integration. Change the Default Port to 443.
- Select the Default Confidentiality check box in the Security section.
- Save your changes.
- Run the client application.