• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use wstools in ant

 
Bobby Anderson
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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'.
 
Bobby Anderson
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic