Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

java.lang.InstantiationException - When try to call a web service

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to call a web service but I am getting this error. How can I fix this? Bytheway in the WSDL, TemplateGame is abstract.

Best Regards.

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: javax.xml.bind.UnmarshalException: Unable to create an instance of com.bon.gtw.gameplay.TemplateGame

- with linked exception:

[java.lang.InstantiationException]
 
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the full stack trace?
 
cenk kizildag
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the stack trace:

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: javax.xml.bind.UnmarshalException: Unable to create an instance of com.bon.gtw.gameplay.TemplateGame
- with linked exception:
[java.lang.InstantiationException]
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:189)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
at $Proxy39.playGame(Unknown Source)
at playcoupontest.Main.testPlay4101(Main.java:106)
at playcoupontest.Main.main(Main.java:24)
 
Vijitha Kumara
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any abstract classes used here? You may need to tell more details about the structure of your app etc... (TellTheDetails). Perhaps a similar issue to this?
 
cenk kizildag
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I told that TemplateGame is abstract in my first post.

Best Regards
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
How was the WSDL created? Hand-written?
If possible, post the WSDL - thanks!
Best wishes!
 
cenk kizildag
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the WSDL

 
    Bookmark Topic Watch Topic
  • New Topic