20

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?

user1685095
  • 5,787
  • 9
  • 51
  • 100
  • 5
    From the [SOAP 1.2 specification](http://www.w3.org/TR/soap12-part1/) (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](http://www.ietf.org/rfc/rfc3902.txt). – Lukas Graf Oct 20 '14 at 12:15
  • 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? – user1685095 Oct 20 '14 at 12:35
  • 1
    Note that SOAP 1.1 requires `text/xml` as Content-Type. – m7913d May 17 '22 at 09:18

1 Answers1

39

Content-Type: application/soap+xml

AndreyP
  • 2,510
  • 1
  • 29
  • 17
  • 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. – Ahmad Nadeem Dec 01 '19 at 12:24
  • But isn't Axis 2 long outdated? Like from the stone age? – gsl Jun 22 '20 at 10:58