In our tutorial Step by Step: Developing SOAP Web Service in TIBCO we created a service and tested it using Tibco designer Tester and SOAP UI. In this post, I will share steps for creating an EAR of a web service and then deploying it in TIBCO Admiistrator.
Creating EAR of a Web Service in Tibco Designer:
Once we have validated our project successfully without any errors in TIBCO Designer, we are good to go for creation of EAR (Enterprise Archive) file for deployment on a TIBCO server using administrator.
To Create EAR in Tibco designer in your deployment folder, follow the steps as shown in the picture below:
It will create EAR as shown below:
Now we need to add our service in EAR. For adding any processes or services in EAR, we first need to add Process Archive in our EAR. This is done by following the below steps:
Now we need to add our Service to process archive. This can be done by going to Process Archive and then using the binocular to add new processes or services as shown below:
When we add service to process archive, all relevant processes (processes which are part of our service) are automatically added.
Our web service also uses many XML Schema files, JDBC and HTTP connections etc. All these dependencies are handled by TIBCO designer itself. In Shared Archive dependencies, these resources get added automatically as shown in below diagram:
Now we are sure that all our required resources (processes, services, schemas, connections) are correctly added in the archive so we can go for building the archive. This can be done using Build Archive button at the bottom:
On successful build, archive will be stored in the path specified in the File Location above.
Deploying EAR in Tibco Administrator:
After successful creation of EAR in Tibco designer, you need to move towards TIBCO Administrator for its deployment. We assume that you have already created a domain using domain utility and your Tibco administrator is all set for deployment of a new EAR.
Go to Tibco Administrator and navigate towards All Applications in the left side menu under Application Management hierarchy. Now choose New Application from the top menu as shown below:
You will be directed to a new page where you will be asked to browse for your EAR file which you want to deploy.
After selecting required EAR, press OK button. You will be directed to configuration page where you can do all necessary configurations for your archive.
Since our EAR consists of a web service so we would like to get WSDL from a deployed service. For this, we need to do some configurations for Process Archive.par in its Advanced Tab.
- Specify IP address in bw.platform.services.retreiveresources.Hostname Value of this configuration field should be IP address of machine where service is deployed.
- Specify Port number in bw.platform.services.retreiveresources.Httpport You can specify any available port in this field.
- Set value of bw.platform.services.retreiveresources.Enabled to true.
Configuration changes to enable as shown below:
After making above configuration changes, we are done with configuration changes as we don’t have any other configurations required for our service. Press Save button after these changes. Now we are all set to deploy our EAR.
Press Deploy button. Service will get deployed and all its configurations will be shown as Synchronized:
Now we need to check the status of service instance. It takes some time for service instance to get started depending on your Server specifications and load. Status of Service Instance of deployed EAR can be checked as shown below:
Getting Concrete WSDL URL from a deployed Service in Tibco Administrator:
Now our EAR is deployed successfully, synchronized correctly and its service instance running fine. We can now get its WSDL from our web browser as well. IP address and Port that we specified for bw.platform.services.retreiveresources.Hostname and bw.platform.services.retreiveresources.Httpport in the configuration are used to get the WSDL URL.
For example, if IP address was set as 10.4.4.44 and Port was set as 8087 in configuration, we can get URL of Concrete WSDL by going to following link on our browser:
We are now done with our EAR deployment. You can give above highlighted WSDL url to any client for consuming this deployed web service.