Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tSOAP usage => SAAJ0537: Invalid Content-Type.

Hello
Im'm trying to use the tSOAP component and I've got an error.
Here is the message I want to send :
"<SOAP-ENV:Envelope xmlns 0683p000009M9p6.pngOAP-ENV=\" http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"urn:sympasoap\" xmlns:xsd=\" http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\" http://www.w3.org/2001/XMLSchema-instance\" xmlns 0683p000009M9p6.pngOAP-ENC=\" http://schemas.xmlsoap.org/soap/encoding/\" SOAP-ENV:encodingStyle=\" http://schemas.xmlsoap.org/soap/encoding/\">
<soapenv:Header/>
<SOAP-ENV:Body>
<ns1:login>
<email xsi:type=\"xsd:string\">prout@insa.fr</email>
<password xsi:type=\"xsd:string\">prout</password>
</ns1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>"
And I've got this error, It seems to be a problem whith this message but I'm not sure :
connecting to socket on port 4054
connected
24 mai 2013 09:26:28 com.sun.xml.internal.messaging.saaj.soap.MessageImpl identifyContentType
GRAVE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
Exception in component tSOAP_1
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:148)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:110)
at ldapmx.testsoap_0_1.testSOAP.tSOAP_1Process(testSOAP.java:481)
at ldapmx.testsoap_0_1.testSOAP.runJobInTOS(testSOAP.java:791)
at ldapmx.testsoap_0_1.testSOAP.main(testSOAP.java:659)
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:602)
at com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:86)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:328)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:144)
... 4 more
CAUSE:
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:602)
at com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:86)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:328)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:144)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:110)
at ldapmx.testsoap_0_1.testSOAP.tSOAP_1Process(testSOAP.java:481)
at ldapmx.testsoap_0_1.testSOAP.runJobInTOS(testSOAP.java:791)
at ldapmx.testsoap_0_1.testSOAP.main(testSOAP.java:659)
CAUSE:
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?
at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:602)
at com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:86)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:328)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:144)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:110)
at ldapmx.testsoap_0_1.testSOAP.tSOAP_1Process(testSOAP.java:481)
at ldapmx.testsoap_0_1.testSOAP.runJobInTOS(testSOAP.java:791)
at ldapmx.testsoap_0_1.testSOAP.main(testSOAP.java:659)
disconnected

Thanks for your help
Eric, desperate 0683p000009MPcz.png
Labels (5)
4 Replies
Anonymous
Not applicable
Author

Hi
Can you show us the request/response definition? such as:
POST /webservices/weather.asmx HTTP/1.1
Host: www.deeptraining.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: " http://litwinconsulting.com/webservices/GetWeather"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWeather xmlns="http://litwinconsulting.com/webservices/">
<City>string</City>
</GetWeather>
</soap:Body>
</soap:Envelope>
Have you tried to test it with SOAPUI?
Shong
Anonymous
Not applicable
Author

Hi
How to know the "request/response definition".
Do you mean the configuration for the component ?
We have :
End point : "http://listes/sympa/wsdl"
Soap action : ""authenticateAndRun"
Soap version 1.1
What is SOAPUI ?
thx for your help
Anonymous
Not applicable
Author

Hi
Open the url of End point in browser, you will see a list of operations , click the operation you want to call to read the SOAP request/response definition. For example:
http://www.deeptraining.com/webservices/weather.asmx?op=GetWeather
What is SOAPUI ?

see what is SOAPUI?
Shong
Anonymous
Not applicable
Author

the serveur is :
http://listes.insa-toulouse.fr/sympa/wsdl
I think you can connect it from your computer.
I have always the wsdl, and I can't get your information.
Our soap documentation product is http://www.sympa.org/manual/soap
And it works fine with a PHP script 0683p000009MPcz.png