File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes WS Packaging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "WS Packaging" Watch "WS Packaging" New topic
Author

WS Packaging

graham king
Ranch Hand

Joined: Dec 30, 2004
Posts: 133
I've written a basic WS that uses transfer objects and found that I could only package these objects in the base directory, com.ws. If I put the objects in their own dir, com.ws.model, the client which discovered the WS would put the classes in com.ws and the compilation would fail.

Is it possible to package the transfer objects in their own directory or are they required to be in the base dir?

Is it possible to use classes that are packaged in another jar as the transfer objects for a web service?

Trying so gives ill generated client files. Such as:

becomes:


or, on the server:

becomes this on the client:


I'm a newbie to this paradigm and could use some pointers.

Thanks,
Graham
[ March 22, 2007: Message edited by: graham king ]

write, revise, re-write, revise, again...<br />write, revise, re-write, revise, again...
graham king
Ranch Hand

Joined: Dec 30, 2004
Posts: 133
It looks to be resolved by using the namespaceMappingRegistry entry in the config.xml, i.e.,


along with a model entry in the jaxrpc-ri.xml, i.e.,


Only now I'm not able to deploy the cooked war. I get the following:


Anyone know how to fix this?

Using JBoss4.0.3SP1 running on jre1.4.2_13b.

The jaxrpc-impl.jar file is in the server/lib/endorsed as well as:


Thanks.
[ March 23, 2007: Message edited by: graham king ]
graham king
Ranch Hand

Joined: Dec 30, 2004
Posts: 133
I moved the jaxrpc-impl.jar to the /server/default/lib
and added the others

I also added jars from jaxb:


The deployment is successful, but, the client code still references the base packaging.

Anyone know how I can fix this? Running outta ideas.
graham king
Ranch Hand

Joined: Dec 30, 2004
Posts: 133

If I only had a brain... The Scarecrow, The Wizard of Oz


Didn't add the namespace value to the client config.xml, because, in all my brightness thought that I was creating everything from the wsdl document.

Man.
Karthik Rajendiran
Ranch Hand

Joined: Aug 13, 2004
Posts: 211
Brian, I would like 2 call you a perfect endpoint
asking and answering urself the questions.


SCJP 1.4 SCWCD 1.4 SCDJWS 1.4
Karthik Rajendiran
Ranch Hand

Joined: Aug 13, 2004
Posts: 211
yes man you are rit
did you refer deployment chapter IN RMH book j2ee webservices
<java-wsdl-mapping ...>
<package-mapping>
<package-type>com.jwsbook.jaxrpc</package-type>
<namespaceURI>http://www.Monson-Haefel.com/jwsbook/BookQuote
</namespaceURI>
</package-mapping>
</java-wsdl-mapping>

if you have two differen namespace
one for wsdl and one for complext type inside wsdl types tag,you can present two different package structure
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WS Packaging