• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 64
Oracle Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic