Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using WSDL2Java

 
Anup Bansal
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anup Bansal
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic