wood burning stoves 2.0*
The moose likes Websphere and the fly likes Webservice over WAS: Help with ClassCastException... incompatible with javax.xml.bind.JAXBElement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Webservice over WAS: Help with ClassCastException... incompatible with javax.xml.bind.JAXBElement" Watch "Webservice over WAS: Help with ClassCastException... incompatible with javax.xml.bind.JAXBElement" New topic
Author

Webservice over WAS: Help with ClassCastException... incompatible with javax.xml.bind.JAXBElement

Marcelo Tataje
Ranch Hand

Joined: Jan 31, 2011
Posts: 64

I've finally deployed my WebService based on my WSDL, but I have a problem when I try to consume the WebService. I've just implemented "Create" method that receives an XML file as parameter and copies it to another directory. When I execute the client, at first, it seems to copy the file successfully in the folder, but when I execute it for the second time I'm getting this:

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: java.lang.ClassCastException: org.w3._2009._02.ws_tra.Create incompatible with javax.xml.bind.JAXBElement
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:190)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:123)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:120)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:90)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:119)
at $Proxy27.create(Unknown Source)
at org.busdox.transport.start.client.AccessPointClient.send(AccessPointClient.java:176)
at org.busdox.transport.start.client.AccessPointClient.send(AccessPointClient.java:78)
at com.alfa1lab.sample.impl.transport.client.Main.testService(Main.java:139)
at com.alfa1lab.sample.impl.transport.client.Main.SendMessageToAccessPoint(Main.java:79)
at com.alfa1lab.sample.impl.transport.client.Main.main(Main.java:62)

I'm using RAD, WebSphere Application Server 7 and Web Features Pack 2.

Don't know the cause of why I'm getting that error

Thanks in advance. I'll be really grateful if somebody could help me please
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webservice over WAS: Help with ClassCastException... incompatible with javax.xml.bind.JAXBElement