Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web service with jax-ws

 
Jigar Naik
Ranch Hand
Posts: 761
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to create web service using jax-ws and following the instructions as shown in the following article by sun.

Creating Simple Web Service Using JAX-WS _ Sun.com

i'm using tomcat 5.0 as container

I have created a service implementation class as shown in the code bellow



now what the article says is as follows

he @WebService annotation declares the class as a web service. The name property in the @WebService annotation lets you define the web service name (the wdsl ortType attribute in WDSL 1.1). The serviceName property lets you define the WDSL service name. These properties are optional; if undefined, sensible default values will be derived from the class name.

The @WebMethod annotation is used to indicate which methods are to be exposed by this web service. Again, this annotation takes optional parameters that can be used to customize the WDSL values, though the default values are often quite sufficient. Note again that, apart from the annotations, this class is a perfectly normal Java class.

The annotations are processed by the JDK annotation processing tool, or Apt. Although Apt can be used as a command-line tool, in general you should integrate it into your build process. To do this using Ant, you need to declare the Apt task, as follows. The class is provided in the jaxws-tools.jar file:


you can find it in the link.

However i'm not able to understand what is apt and what the following xml content shows and where does it should go.



Till now i have written in one implementation class as shown in the code block.

created 1 cmd file as follows



But it is giving me the following error.



what might be the cause of this error ???

If more clarification needed please do let me know.

Thanks.

I tried to run the cmd file after removing
wsgen.bat -cp %CLASSPATH% india.StockQuoteImpl LINE

the class is getting complied fine.
[ February 07, 2008: Message edited by: Jigar Naik ]
 
Jigar Naik
Ranch Hand
Posts: 761
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yippy.. i got the solution.

wsgen command was generating the web method(.java files) but it wasn't able to compile the generated java files.

i needed to set the classpath for one of the jar file of jaxb which is being used in generated java files. and it for compiled.

xxx
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic