aspose file tools*
The moose likes Web Services and the fly likes Using WSDL2Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using WSDL2Java" Watch "Using WSDL2Java" New topic
Author

Using WSDL2Java

Anup Bansal
Ranch Hand

Joined: Sep 12, 2006
Posts: 69
Hi All,

I am facing the following error when trying to generate stubs using WSDL4Java.
I am using Axis 1.4 and the IDE is WSAD 5.1.
I have also included the QName class in the class path.
Can anyone please help me with this?

java.lang.NoSuchMethodError: javax.xml.namespace.QName: method getPrefix()Ljava/lang/String; not found
at org.apache.axis.wsdl.symbolTable.BackslashUtil.getQNameWithDifferentLocal(BackslashUtil.java:62)
at org.apache.axis.wsdl.symbolTable.BackslashUtil.getQNameWithBackslashlessLocal(BackslashUtil.java:39)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populateServices(SymbolTable.java:3078)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:745)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:513)


Regards,
Anup
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
You are probably using a wrong version of Qname class , in which the required method is not present.you can open class in a decompiler and verify whether that is having the required method or not.


Rahul Bhattacharjee
LinkedIn - Blog
Anup Bansal
Ranch Hand

Joined: Sep 12, 2006
Posts: 69
Hi Rahul,

Thanks for the response!
I had checked the QName class. The required method is present.
Is there some problem with the WSDL2Java class?

Regards,
Anup
John Bauer
Greenhorn

Joined: Oct 14, 2006
Posts: 3
make sure you have all the appropriate jar files in your classpath

i wasnt sure which jar files it needed from the axis/lib directory so i just included all of them, and it works fine
Anup Bansal
Ranch Hand

Joined: Sep 12, 2006
Posts: 69
Hi All,

Thanks a lot for all your suggestions. I am not facing the problem anymore.
The main cause of the problem was that I was using a different version of the QName class. After inclusion of the axis-jaxrpc-1.4.jar in the classpath, the problem was resolved.

Thanks & regards,
Anup
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Using WSDL2Java