vendredi 21 septembre 2018

Why Web Service Doesn't Fail When I Defined Different Content-Type

I'm sending a Soap request (xml) through HTTP protocol (POST), in the HTTP header, I'm defined a "Content-type" with value of "application/json;charset=utf-8" althoug my content is xml. why the service doesn't fail? This is because I send special characters in the xml and I still define a different encoding and the service responds correctly. So why doesn't fail?

I am doing the tests from SOAPUI and this the HTTP header that I send:

POST http://domain:7800/service/v1 HTTP/1.1
Accept-Encoding: gzip,deflate
SOAPAction: "http://domain:7800/service/v1/operation"
Content-Type: application/json;charset=UTF-8
Content-Length: 1018
Host: domain:7800
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)




Aucun commentaire:

Enregistrer un commentaire