I added the SOAP raw body under the Body Tab complete with my SF credentials.
I selected the XML option (and I notice that there is no “XML (text/html)” option anymore)
I unchecked the default Content-Type key under the Headers tab ( it was Read-Only and not letting me change the value to “text/html” from the default value of “application/xml”).
Added a new Content-Type key set to “text/html” under the Headers tab. Please see the last entry
Added the SOAPAction key under the Headers tab.
When I sent the Post method , I got a 500 response where the fault string tag indicated that “content-type of the request should be text/xml”
I have listed screen shots
Questions:
1.Why is it returning this error when it seems like everything should be configured correctly?
Does the latest version of Postman still use the “text/html” option for the Body tab ?
Currently only HTML, Text, JSON, JavaScript, and XML are the only selections but I have seen examples with “XML (text/xml)”.
Thanks . See scrapes below. (Note: Credentials have been falsified for security reasons)
On checking the documentation of the mentioned
API
, it seems this API supports content-type as “text/xml”. Can you please try to use “text/xml”
Hope this helps
@pranavdavar
Thanks for your response however; I did do what you said for the content type. (Please see my steps in the question I had submitted on the forum). The problem was that the Content Type under the Headers Tag was set to “application/xml” but it was also Read-Only so that I could not change the value for this content type key.
So I unchecked the Content Type check box and created a new Content Type key having the correct “text/xml” value and I checked its checkbox instead. However authentication still did not work.
Does that make sense? I did look at the link you had sent by the way.
I got the same error message but I also noticed an icon next to the Body Tab’s Content-Type menu that indicates that the “language selected is different from the language inferred from the Content-Type header”, So I am wondering if the newly created Content Type that I created has been overridden by the default Content Type key? I have enclosed a screen scrape. Maybe postman does not acknowledge that new one.
XMLIconError
1231×425 41.4 KB
HI
@pranavdavar
I discovered the problem: In order to stop the Content-Type from automatically displaying the application/xml , we need to:
change the method from Post to Get so that the Content-Type will be removed.
1B) Set the Body Tab to form-data.
In the Headers tab, add the new Content-Type as the key and add text/xml as the value.
Change the method back to Post and verify that the default Content-Type does not overwrite the one you just added in step 2.
3b) Change Body Tab to raw.
Send your request and verify that you get a return code of 200 OK.