You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ro...@surecomp.com on 2011/02/01 15:17:27 UTC
follow on delpoying a war and starting application
I have a war file that is produced by the Oracle version of Eclipse and the created war file works with Websphere and WebLogic.
I have been attempting to deploy this war file in Tomcat 7. After receiving some helpful advice from this mail group I have been able to deploy the application. Thanks for the help folks.
What I ended up doing is the following
1. Download JAS-WS RI and copy jars to tomcat/lib. Searching the internet I found this article (http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/ ) which provided a working example which I could reverse and apply to my system.
2. Modify the web.xml
3. Create the sun-jaxws.xml
The following is a sampling of the original web.xml
<servlet>
<servlet-name>InitServlet</servlet-name>
<servlet-class>com.surecomp.allMATCH.client.InitServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>dataextract.csv</servlet-name>
<servlet-class>com.surecomp.allMATCH.client.InitServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LearnedExceptionServiceServlethttp</servlet-name>
<servlet-class>com.surecomp.allMATCH.client.webservices.LearnedExceptionService</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
First I had to add a listener
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
Each of my web service names end in ServiceServlethttp I had to replace each class name with com.sun.xml.ws.transport.http.servlet.WSServlet
So the same section of web.xml end up looking like this
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>InitServlet</servlet-name>
<servlet-class>com.surecomp.allMATCH.client.InitServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>dataextract.csv</servlet-name>
<servlet-class>com.surecomp.allMATCH.client.InitServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LearnedExceptionServiceServlethttp</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
Then I had to define the end points and this is done by means of sun-jaxws.xml
<endpoints
xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
version="2.0">
<endpoint name="DataExtractServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.DataExtractService" url-pattern="/DataExtractService"/>
<endpoint name="ReportServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.ReportService" url-pattern="/ReportService"/>
<endpoint name="BranchesServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.BranchesService" url-pattern="/BranchesService"/>
<endpoint name="ContactServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.ContactService" url-pattern="/ContactService"/>
<endpoint name="ArchiveServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.ArchiveService" url-pattern="/ArchiveService"/>
<endpoint name="CLSStatusServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.CLSStatusService" url-pattern="/CLSStatusService"/>
<endpoint name="LanguageServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.LanguageService" url-pattern="/LanguageService"/>
<endpoint name="TradeLocksServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.TradeLocksService" url-pattern="/TradeLocksService"/>
<endpoint name="PasswordSettingsServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.PasswordSettingsService" url-pattern="/PasswordSettingsService"/>
<endpoint name="BICServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.BICService" url-pattern="/BICService"/>
<endpoint name="LoginServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.LoginService" url-pattern="/LoginService"/>
<endpoint name="MonitorServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.MonitorService" url-pattern="/MonitorService"/>
<endpoint name="BrokerServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.BrokerService" url-pattern="/BrokerService"/>
<endpoint name="QueueServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.QueueService" url-pattern="/QueueService"/>
<endpoint name="HolidayServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.HolidayService" url-pattern="/HolidayService"/>
<endpoint name="CurrencyServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.CurrencyService" url-pattern="/CurrencyService"/>
<endpoint name="OverviewServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.OverviewService" url-pattern="/OverviewService"/>
<endpoint name="PauseServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.PauseService" url-pattern="/PauseService"/>
<endpoint name="CustomerServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.CustomerService" url-pattern="/CustomerService"/>
<endpoint name="MatchingLogicServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.MatchingLogicService" url-pattern="/MatchingLogicService"/>
<endpoint name="MessageServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.MessageService" url-pattern="/MessageService"/>
<endpoint name="LicenseUsageServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.LicenseUsageService" url-pattern="/LicenseUsageService"/>
<endpoint name="UsersServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.UsersService" url-pattern="/UsersService"/>
<endpoint name="HelpServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.HelpService" url-pattern="/HelpService"/>
<endpoint name="LogServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.LogService" url-pattern="/LogService"/>
<endpoint name="ReasonCodeServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.ReasonCodeService" url-pattern="/ReasonCodeService"/>
<endpoint name="SupportEmailServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.SupportEmailService" url-pattern="/SupportEmailService"/>
<endpoint name="NewPasswordServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.NewPasswordService" url-pattern="/NewPasswordService"/>
<endpoint name="LearnedServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.LearnedService" url-pattern="/LearnedService"/>
<endpoint name="CommentsServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.CommentsService" url-pattern="/CommentsService"/>
<endpoint name="LogoutServiceServlethttp" implementation="com.surecomp.allMATCH.client.webservices.LogoutService" url-pattern="/LogoutService"/>
</endpoints>
For each web service I had to map the servlet name ie. LearnedExceptionServiceServlethttp to the actual class name ie. com.surecomp.allMATCH.client.webservices.LearnedService and indicate the url-pattern for the web service /LogoutService.
The url-pattern is the name used by IE/Firefox to call the web service.
Sincerely,
Robert Jenkin
Surecomp Services, Inc.
2 Hudson Place, 4th Floor
Hoboken, NJ 07030
Skype: robert.jenkin
Office: 201 217 1437 | Direct: 201 716 1219 | Mobile: 908 251 0537
http://www.Surecomp.com
This mail was sent via Mail-SeCure System.
Re: successful deployment of web services on Tomcat 7 [was: follow-up
on delpoying a war and starting application]
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert,
On 2/1/2011 9:17 AM, Robert.Jenkin@surecomp.com wrote:
> I have a war file that is produced by the Oracle version of Eclipse
> and the created war file works with Websphere and WebLogic.
>
> I have been attempting to deploy this war file in Tomcat 7. After
> receiving some helpful advice from this mail group I have been able
> to deploy the application. Thanks for the help folks.
Excellent. Thanks for circling back to report your success and how you
ended up configuring things.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1IlBEACgkQ9CaO5/Lv0PAtjACgrCUJWB0lOf5aHgXj7zjkO79q
NCwAoKqngsXvvu2anj7L+zU3izBQLkj0
=mhHo
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org