What content type should be in http header of soap 1.2 message?
Asked Answered
G

1

24

I have a problem where my xml-da client that is using zsi 2.2.2 library generating messages that look like soap 1.2 messages because I can see this line.

xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"

But I also can see text/xml as a content type in header. I can't find any notion of what header should be like in soap 1.2, but I suppose that it should be application/soap-xml.

So what it actually should be?

Gnni answered 20/10, 2014 at 12:7 Comment(3)
From the SOAP 1.2 specification (section 1.3): "The media type "application/soap+xml" SHOULD be used for XML 1.0 serializations of the SOAP message infoset". See also RFC 3902.Hu
There is a lot of soap specifications out there. I just felt lost in all of them. Are you sure that soap 1.2 message should always have a header with content type application/soap+xml?Gnni
Note that SOAP 1.1 requires text/xml as Content-Type.Lemaceon
Y
46

Content-Type: application/soap+xml

Yelp answered 29/12, 2016 at 16:7 Comment(2)
I was testing an axis2(with rampart) web service from SoapUI, adding Content-Type: application/soap+xml header didn't work for me, but when I used only Content-Type: application/soap it worked.Gamester
But isn't Axis 2 long outdated? Like from the stone age?Roundel

© 2022 - 2024 — McMap. All rights reserved.