This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Web Services and the fly likes Problem using JAXWS-RI sample code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem using JAXWS-RI sample code" Watch "Problem using JAXWS-RI sample code" New topic

Problem using JAXWS-RI sample code

Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Hi All,

I am using JAXWS-RI sample code. In sample "fromjava" when you run the target "ant server",the AddNumbersExceptionBean is generated in the "build" directory.This bean is generated in the fromjava.server.jaxws package.I want to change this package name ? How do I do this ?
Peer Reynders

Joined: Aug 19, 2005
Posts: 2930
Java API for XML Web Services (JAX-WS) wsimport

For the command-line tool it is the -p option.

Java API for XML Web Services (JAX-WS) wsimport Ant task

For the ant task it is the "package" attribute.
Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Thanks Peer.

But my problem is related to the "apt" process which is called by ant.
Here is the code from build.xml which calls apt :

And my Web Service class is :

After calling the apt, the classes are generated . The classes generated are :

Except AddNumbersExceptionBean.class , all others are generated in fromjava.server package while AddNumbersExceptionBean.class is generated in fromjava.server.jaxws package.

In the build.xml , I can't see jaxws package being created.So I think this is done by the apt command. How do I control this ? I want the AddNumbersExceptionBean.class to be generated in some other package or in fromjava.server package itself.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Problem using JAXWS-RI sample code
It's not a secret anymore!