Invoking a SOAP Service Running Locally
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 that is running in the cloud, see Invoking a SOAP Service Running in the Cloud.
This procedure assumes that you have created a SOAP service application and a SOAP client application in TIBCO Business Studio™.
In order to consume a SOAP service that is running locally in the TIBCO Business Studio, follow these steps:
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.
- Start the service.
- After the service is in a running state, obtain the endpoint for the service by running lendpoints from the Console. 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.
- 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 your domain name. Change the Default Port to the HTTP Connector port that is configured in the SOAP service.
- Save your changes.
- Run the service and client application.