aspose file tools*
The moose likes JBoss/WildFly and the fly likes How to use wstools in ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to use wstools in ant" Watch "How to use wstools in ant" New topic
Author

How to use wstools in ant

Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
Anyone know of a good reference or have a good example of how to use wstools to generate jax-rpc client/server and mapping files in ant

Basically I want to use wstools to generate my jax-rpc artifacts instead of wscompile.

Thanks!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

I used the exec task and ran the batch/script file. To see an example, get the source code for JBoss in Action and look at jbia-src/ch09/build.xml, search for 'wsconsume'.


JBoss In Action
Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
wsconsume is for jax-ws I think not jax-rpc. I need to stick with jax-rpc for now.

I am almost there using the ant task but I am getting an error with no explanation.
When I run the following ant task:


All I get is an error saying:
Error running jbossws:

My jbossws-config.xml looks like this:



Please Help!
Thanks again.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Try running ant with the -v option, that should provide more information.

Also, have you tried running wstool from the command line using the exact same parameters?
Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
Yeah that shows my actual error.

I am getting the following exception:


I changed my config file to wsdl-java as follows to generate the java code from the wsdl, maybe my mapping tag is not correct. any ideas?


I don't get any errors if I remove the mapping tag but of course I do not get a mapping file. Why am I getting that exception when I try and generate the mapping file? Also does wstools generate client stubs like wscompile? My guess is that it does but again I cannot find a comprehensive example using wstools.

Please Help
Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
The problem seems to be my WSDL and how I define my fault.

Is this the proper way to define a fault? Here is my wsdl:


I am getting a NullPointerException in the jboss code on the last line of this code (line #7):



Looks like xt variable is null. Anyone have the slightest idea why, is my fault defined correctly in my wsdl?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use wstools in ant