 |
JAX-WS 2.0 Samples on Tomcat 5.5.x
Posted by arungupta on March 17, 2006 at 09:10 AM | Comments (13)
Starting today's nightly, the JAX-WS samples can be easily run on Tomcat 5.5.x. This blog tells you how to install a JAX-WS
nightly build on Tomcat
container and run the samples using that.
Installing JAX-WS 2.0 on Tomcat
- Download
JAXWS_SI.jar from the nightly
build and install it on your machine by giving the following command:
java -jar JAXWS_SI.jar
This will install JAX-WS binaries, samples, documentation and other files in
jaxws-ri directory (JAXWS_HOME) in your current
directory.
- Download and save this
script (
jaxwsontomcat.xml) in JAXWS_HOME directory.
- Please make sure CATALINA_HOME environment variable points to the
directory where Tomcat is installed. Go to JAXWS_HOME directory and
invoke:
ant -f jaxwsontomcat.xml install
Running the Samples
To develop and deploy the samples on Tomcat, you need to give the following
command:
ant server -Dtomcat=true
To develop and deploy the samples on Application server, you need to give the
following command:
ant server
If you are familiar with the samples framework, then this is the same command
as before.
To invoke the deployed WAR file, follow the instructions from the
samples
documentation. All of your samples can now be deployed on Tomcat container, in addition to Sun's Application Server.
JAX-WS is available in Glassfish.
Hope you find this useful.
Technorati: JAX-WS
Tomcat
jwsdp glassfish
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
hi!
i try to follow your procedure in order to deploy fromjava sample without success.
no errors appear in catalina.out
in addition, i can't generate client because wsdl is not automatically generated on server side.
can you give me more details please
Posted by: faduval on April 10, 2006 at 10:04 AM
-
Can you post the Tomcat server logs ?
Posted by: arungupta on April 10, 2006 at 10:09 AM
-
Hi Arun! I downloaded the last JAXWS_SI.jar (04-10-2006 modified by bbisset) from the nightly build and installed it, but when i tried to deploy the samples on Tomcat the build failed. Maybe the file build.xml is different...Can you help me?
Posted by: marcelomalcher on April 10, 2006 at 03:29 PM
-
Hey man, forget what I said! I was confusing something here but now i did it and all worked well...there are so many things installed...by the way, your instructions were just what i need!
Posted by: marcelomalcher on April 10, 2006 at 03:55 PM
-
Hi! I worked on the samples of the last JAXWS trying to get from my web service an object of a class that i called DeviceContext that i created. One of the attributes of my class is a ArrayList. I'm getting problems on my client when I try to get this class from the web service.
It is like:
DeviceContext ctx = port.getDeviceContext(macAddress);
Some problem with the xml type I guess (wsimport warns me about this).
When I deleted this attribute from my class, it all went fine.
So, I can't have an attribute of ArrayList and use it in my web service?
Sorry my english!
Posted by: marcelomalcher on April 10, 2006 at 10:18 PM
-
it seems the deployement is ok. tomcat logs are empty.
but the wsdl is not generated on tomcat server. any idea?
when i deployed on sun application server 9 beta the wsdl is automatically generated
Posted by: faduval on April 11, 2006 at 04:17 AM
-
Hi Arun,
Please assist as I am totally confused about writting a web service in Java.
1.) Firstly I am confused about installing JAX-WS, do I need to install WSDP for this or can just install JAX-WS alone.
2.) Can I deploy a web service developed using JAX-WS on Websphere, weblogic and Tomcat, I read in your Blog you can on Tomcat 5.5.x just wanted to check that this is not the Tomcat supplied by Sun.
3. I am confused about two ways of developing web services JAX-RPC and JAX-WS, which one is the latest one please clear my confusion.
4. Finally please give some directions about writting Application
Server independent web service, meaning a web service which can be deployed on any Java enabled application.
Thank and regards,
Ravi
Posted by: ravi_singh on November 12, 2006 at 08:38 AM
-
I have succefully tested a sample jax-ws with Sun application server.However inspite of following all the neccessary steps to set up tomcat web container to deploy a jax-ws,the wsdl is not getting generated.Please help me out.
Refer to the following stack trace as produced by the server log file:
Jul 4, 2007 11:40:33 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchMethodError: javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
java.lang.NoSuchMethodError: javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
at com.sun.xml.ws.api.SOAPVersion.(SOAPVersion.java:141)
at com.sun.xml.ws.api.SOAPVersion.(SOAPVersion.java:68)
at com.sun.xml.ws.api.BindingID.(BindingID.java:305)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:205)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:131)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:90)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1190)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1305)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Unknown Source)
Jul 4, 2007 11:40:33 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Posted by: mandrita_ca on July 04, 2007 at 03:31 AM
-
A recent build of JAX-WS is available at:
https://jax-ws.dev.java.net/2.1.2m1/
And the instructions to run the samples with the build on Tomcat are available at:
https://jax-ws.dev.java.net/nonav/2.1.2m1/docs/samples.html
Have you tried them ? If not, please either post a comment or a question to users@jax-ws.dev.java.net.
Posted by: arungupta on July 04, 2007 at 02:55 PM
-
I am trying to consume a .Net web service method from a client running under a tomcat container. When the code hits the Service creation it just dies. no errors. nothing. What is interesting is that the same code will work perfectly when i run it as a stand alone java app. Any ideas? Is there a problem with the Service class and trying to create a Service from a client running in a Tomcat container?
Posted by: andysmith1004 on August 28, 2007 at 11:49 AM
-
Just a note that will be helpful - to develop and deploy the samples, you need to run the ant command from the directory in which the sample is located, so ant finds the correct xml files.
Posted by: somaiah on March 04, 2008 at 02:01 AM
-
Hi Arun, I followed the steps given by you to run the sample applications. I tried these steps with jaxws2.0 & 2.1. I am using tomcat 5.5. I can build the server. The war gets created and deployed on tomcat. But no wsdl is created. There are no errors when I start tomcat. I cannot build the client because there is no wsdl. Is the wsdl supposed to be packaged in the war? Why is it not being created? Please help.
Posted by: mahesh207 on April 17, 2008 at 09:35 AM
-
I downloaded a fresh version of tomcat5.5 (as I had a lot of applications & chnages in the old tomcat) & I ran the server & client of the samples. It all ran fine. I can get to the wsdl from the browser (for example: http://localhost:8080/jaxws-fromjava/addnumbers?wsdl). but there is no wsdl in the entire tomcat directory? How is this working? Any clue?
Posted by: mahesh207 on April 17, 2008 at 10:05 AM
|