Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saaj problems

 
j werner
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am new to SOAP and I am using saaj to send a SOAPMessage. I am using the connection factory:
SOAPMessage reply = connection.call( message, url );

This call yields the following (huge) error stack:
SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message

Nov 18, 2005 2:52:04 PM com.sun.xml.messaging.saaj.soap.MessageImpl <init>

SEVERE: SAAJ0535: Unable to internalize message

com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:127)

at SOAP.SOAPConnectionTest.testCon(SOAPConnectionTest.java:33)

at SOAP.SOAP.btnConvert2Xml_actionPerformed(SOAP.java:143)

at SOAP.Compare_btnCompare_actionAdapter.actionPerformed(SOAP.java:646)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)

at java.awt.Component.processMouseEvent(Component.java:5100)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Caused by: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)

... 26 more

Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:302)

at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:47)

at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:38)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:354)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:150)

... 28 more

Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?

at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:398)

at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:189)

... 32 more


CAUSE:


java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)

at SOAP.SOAPConnectionTest.testCon(SOAPConnectionTest.java:33)

at SOAP.SOAP.btnConvert2Xml_actionPerformed(SOAP.java:143)

at SOAP.Compare_btnCompare_actionAdapter.actionPerformed(SOAP.java:646)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)

at java.awt.Component.processMouseEvent(Component.java:5100)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:302)

at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:47)

at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:38)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:354)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:150)

... 28 more

Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?

at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:398)

at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:189)

... 32 more


CAUSE:


java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:121)

at SOAP.SOAPConnectionTest.testCon(SOAPConnectionTest.java:33)

at SOAP.SOAP.btnConvert2Xml_actionPerformed(SOAP.java:143)

at SOAP.Compare_btnCompare_actionAdapter.actionPerformed(SOAP.java:646)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)

at java.awt.Component.processMouseEvent(Component.java:5100)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:302)

at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:47)

at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:38)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:354)

at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:150)

... 28 more

Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?

at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:398)

at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:189)


Any ideas what could cause this? Is there any logging/tracing I can turn on that could help?

Thanks
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are your client and server using the same version of SOAP? Apparently the differences between SOAP 1.1 and SOAP 1.2 can cause this type of problem. See SAAJ0537: Invalid Content-Type Exception.
In particular:

My WebService client expected SOAP 1.2 messages since I set

The WebService itself, however, seems to send SOAP 1.1 messages. So, I changed the above line of code to:

 
j werner
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I actually did try changing that system property, getting a difference error, basically it didn't like the 1_2. I don't even think that the message is getting to the server so I was thinking it was something wrong with my SOAPMessage or maybe I am missing a jar file or something? I have looked all over the web for info on this...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic