Policy for SOAP 1.1 and SOAP 1.2

chiki_sun
Participant III

For SOAP 1.1 Request. the content type should be

Content-Type: text/xml; charset=utf-8

and SOAP 1.2, it should be

Content-Type: application/soap+xml; charset=utf-8

I added a new policy for WSDL and the SOAP version is 1.2, when I generated a payload, I am seeing

<Set> <Headers> <Header name="Content-Type">text/xml; charset=utf-8</Header> </Headers> <Payload contentType="text/xml">

Should the content-type be "application/soap+xml" for SOAP 1.2 request?

0 2 1,257
2 REPLIES 2

yes- i think you will need something like this, [no need explicit content-type header]

<Set>  <Payload contentType="application/soap+xml"></Payload></Set>

chiki_sun
Participant III

I tested the same wsdl (soap 1.2) using the using the apigee cloud and I can see that the payload has proper content type

<Headers> <Header name="Content-Type">application/soap+xml; charset=utf-8</Header> </Headers> <Payload contentType="application/soap+xml">

our private cloud (lower versoon) has this for the same wsdl. This leads me to believe this may be version specific. Apigee cloud is on the latest version and generates a correct soap 1.2 payload. I will follow up with the support.

<Headers> <Header name="Content-Type">text/xml; charset=utf-8</Header> </Headers> <Payload contentType="text/xml">