Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Using WSDL2Java

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic