aspose file tools*
The moose likes Web Services and the fly likes java.lang.InstantiationException - When try to call a web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "java.lang.InstantiationException - When try to call a web service" Watch "java.lang.InstantiationException - When try to call a web service" New topic
Author

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

cenk kizildag
Greenhorn

Joined: May 18, 2007
Posts: 16
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]
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3855

Can you post the full stack trace?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
cenk kizildag
Greenhorn

Joined: May 18, 2007
Posts: 16
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

Joined: Mar 24, 2008
Posts: 3855

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

Joined: May 18, 2007
Posts: 16
Hi,

I told that TemplateGame is abstract in my first post.

Best Regards
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
How was the WSDL created? Hand-written?
If possible, post the WSDL - thanks!
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
cenk kizildag
Greenhorn

Joined: May 18, 2007
Posts: 16
Here is the WSDL

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.InstantiationException - When try to call a web service