• 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

incorrect content-type for SOAP version

 
Greenhorn
Posts: 3
Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to use the large merchant services API provided by Ebay to upload files onto ebay.

They have provided with a sample.jar file of the same. It seems to be working fine when we execute the .jar file on the command prompt, but when i am trying to integrate its source in my web app its giving me this error. Also i tried to create a web service client using netbeans and tried to use it, but still it gave me the same error. I also changed the SOAP version from 1.1 to 1.2 but that too doesn't seem to work. The following is the complete stack trace.


Nov 11, 2011 2:59:41 PM com.sun.xml.internal.messaging.saaj.soap.MessageImpl init
SEVERE: SAAJ0533: Cannot create message: incorrect content-type for SOAP version. Got text/xml; charset=UTF-8, but expected application/soap+xml
Nov 11, 2011 2:59:41 PM com.sun.xml.internal.messaging.saaj.soap.MessageImpl init
SEVERE: SAAJ0535: Unable to internalize message
Exception in thread "main" javax.xml.ws.WebServiceException: Couldn't create SOAP message due to exception: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
at com.sun.xml.internal.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:83)
at com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder.toSOAPMessage(SOAPXMLDecoder.java:102)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:440)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:260)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:139)
at com.sun.xml.internal.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:86)
at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:174)
at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:108)
at $Proxy28.createUploadJob(Unknown Source)
at com.SwiftConnectV1.fileprocess.LMS.BulkDataExchangeActions.createUploadJob(BulkDataExchangeActions.java:138)
at com.SwiftConnectV1.fileprocess.LMS.LMSClientJobs.createUploadJob(LMSClientJobs.java:154)
at com.SwiftConnectV1.fileprocess.LMS.LMSSample.main(LMSSample.java:74)
Caused by: Couldn't create SOAP message due to exception: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
at com.sun.xml.internal.ws.util.SOAPUtil.createMessage(SOAPUtil.java:154)
at com.sun.xml.internal.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:78)
... 11 more
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:475)
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:278)
at com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl.<init>(Message1_2Impl.java:61)
at com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPMessageFactory1_2Impl.createMessage(SOAPMessageFactory1_2Impl.java:62)
at com.sun.xml.internal.ws.util.SOAPUtil.createMessage(SOAPUtil.java:152)
... 12 more
Caused by: com.sun.xml.internal.messaging.saaj.soap.SOAPVersionMismatchException: Cannot create message: incorrect content-type for SOAP version. Got: text/xml; charset=UTF-8 Expected: application/soap+xml
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:356)
... 16 more
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
So what exactly does "integrate its source in my web app" mean?
Are you trying to create SOAP requests yourself, using SAAJ?
Best wishes!
 
amitynwa jadhav
Greenhorn
Posts: 3
Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ivan,
Well what i have with me is a Large merchant services API which consists of a .Jar which is just a sample and .java files which has the complete functionality in them.
Now i am trying to use these source files in my application, i am not trying to create SOAP requests using SAAJ, when i run the .jar from the command prompt its working fine, but when i try to get same through these source files from my application i am getting this error.
They have also given a WSDL, i have used it to create a web service client in my netbeans(creating a different sample project just to get this to work) but by using the methods generated by the stubs i am still getting the same error.

Thanks.
 
amitynwa jadhav
Greenhorn
Posts: 3
Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got it to work, upgraded to Java 7 and it worked.
 
reply
    Bookmark Topic Watch Topic
  • New Topic