Monday, February 21, 2011

Embedded mule ESB Java web services deployment and configuration to Tomcat server

Tomcat setup:

  1. Install Tomcat server (e.g. version 6.0 - requires Java 1.6 installed)

Deployment or upgrade of web services

  1. Place the war file (WebApplicaton_War_File_Name.war) file in Tomcat_Home\webapps 
  2. Start / Restart Tomcat

After starting tomcat web archive gets unpacked

Service url configuration

Service url (webserviceUrl) can be configured by making changes in mule-config.xml
(Tomcat_Home\webapps\WebApplicaton_War_File_Name\WEB-INF\classes\mule-config.xml)
by changing endpoint address value
 
-After configuration changes restart Tomcat server.

Testing if correctly deployed

Ensure that application runs correctly by navigating to:http://webserviceUrl?wsdl
e.g.http://localhost:8080/MyWebService?wsdl
WSDL sescription should be correctly displayed (NOTE: Chrome sometimes does not display wsdl file content- try in FireFox or IE)

Troubleshooting

In case of any problems log files can be found here:
Tomcat_Home\logs
Using war file greatly simplifies applications distribution, instead of many files there is only one file required, place it in correct place, start server, done. Simply great.

No comments: