Closed carlpett closed 8 months ago
For reference, this is a sample wsdl from the system I integrate with.
And this request doesn't work:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<!-- Header with token etc here -->
<soap:Body>
<Query xmlns="http://api.dcp.ericsson.net/UsageDataDownload">
<!-- ... -->
</Query>
</soap:Body>
</soap:Envelope>
While this does:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<!-- Header with token etc here -->
<soap:Body>
<tns:Query tns:usag="http://api.dcp.ericsson.net/UsageDataDownload">
<!-- ... -->
</usag:Query>
</soap:Body>
</soap:Envelope>
FYI, there's some overlap in this code with #218, which I wrote. From your description, we might be running into the same problem — it might be worth combining approaches.
I'm no longer working on this, closing
I'm working with a system which differentiates between
<foo xmlns="something">
and<ns:foo xmlns:ns="something">
(which I believe are equivalent?). This patch sets up the namespace alias on the body such that it works for my usecase, by wrapping the request object.Reviewer note: I'm not sure this is generally correct! It currently breaks the tests, but as far as I can tell it is mainly because the generated output is different. I'm unsure if it breaks other systems, eg when there shouldn't be a namespace at all, if that is something which could happen?
cc @c4milo