python-zeep icon indicating copy to clipboard operation
python-zeep copied to clipboard

SOAP v1.1 must permit all HTTP 2xx responses

Open moll opened this issue 2 years ago • 0 comments

Hey,

Thanks for maintaining Zeep!

I was going over https://github.com/mvantellingen/python-zeep/blob/c7d916cbac8817ba4be81751ee590c6fe52b3f8a/src/zeep/wsdl/bindings/soap.py#L228 and saw Zeep fails when the server responds with something other than 200 for a successful response (e.g. 201). That change was introduced in https://github.com/mvantellingen/python-zeep/commit/058a6f38fe0ee1ba9a088f5abd94a114c0b7c17e, describing compatibility with SOAP v1.2. It seems to me, unfortunately, to be breaking SOAP v1.1 — that's how I found about it.

According to https://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383529, all 2xx responses are valid for SOAP v1.1:

SOAP HTTP follows the semantics of the HTTP Status codes for communicating status information in HTTP. For example, a 2xx status code indicates that the client's request including the SOAP component was successfully received, understood, and accepted etc.

SOAP v1.2 seems to have limited response code interpretation, but I see no limitation in SOAP v1.1. I believe the check above shouldn't therefore apply in SOAP v1.1 cases.

Thanks

moll avatar Dec 24 '21 10:12 moll