jQuery in Action, 2nd edition
The moose likes Web Services and the fly likes wsdl2java axis question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "wsdl2java axis question" Watch "wsdl2java axis question" New topic
Author

wsdl2java axis question

Nikhil Reddy
Greenhorn

Joined: Aug 09, 2007
Posts: 7
I am using axis wsdl2java task to generate client stubs. But for some reason, when classes are generated, the packages have / instead of .
Can anyone advise why it is generating slashes instead of . Proabably because wsdl file is not designed properly.
David Brossard
Ranch Hand

Joined: Jun 03, 2004
Posts: 107
What do you mean by
when classes are generated, the packages have / instead of .
?

How do you call wsdl2java?

With Axis 1.x, with an Ant script this is the way to call it:

<axis-wsdl2java output="path/to/out/folder" testcase="false"
url="path/to/your/wsdlfile.wsdl">
<mapping namespace="${namespace}" package="${package}" />
</axis-wsdl2java>


This will generate the client stub only.

You can find more info here: http://ws.apache.org/axis/java/ant/axis-wsdl2java.html

the mapping element associates a given namespace to a package. An example of a namespace is urn:my.company.com and an example of a package is com.company.my.


No matter what they say in Ohio, we're still first in flight!
Chelis Flores
Greenhorn

Joined: Aug 15, 2006
Posts: 16
I think you must to use -p here.some.package (here.some.package is you package)
FOr example:
java org.apache.axis.wsdl.WSDL2Java -p mx.com.some.package.here http://localhost/axis/SomeWebService.jws?wsdl
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsdl2java axis question
 
Similar Threads
Code generation tools
call web service from java interface possible?
Which one first
Empty target namespace with axis1.2
java code to connect Siebel webservice