views:

172

answers:

2

THIRD EDIT: I now believe that this problem is due to a SOAP version mismatch (1.1 request, 1.2 response) masquerading as a namespace problem. Is it illegal to mix versions, or just bad style? Am I completely out of luck if I can't change my SOAP version or the service's?

SECOND EDIT: Clarified error message, and tried to reduce "tl;dr"-ness.

EDIT: [Link deleted, not related]

Using soapUI, I'm sending a request that starts with:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ...

and getting a response that starts with:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" ...

I know the service is getting the info, because processes down the line are working. However, my soapUI teststep fails. It has two active assertions: "SOAP Response" and "Not SOAP Fault." The failure marker is next to "SOAP Response," with the following message:

line -1: Element Envelope@http://www.w3.org/2003/05/soap-envelope is not a valid Envelope@http://schemas.xmlsoap.org/soap/envelope/ document or a valid substitution.

I have tried mixing and matching the namespace prefixes and schema URLs. Changing prefixes seems to have no effect; changing URLs causes a VersionMismatch error. I have also tried to use a substitution group, but that doesn't seem to be legal.

A: 

Both namespaces are entirely valid (you can even navigate to each one to see the schema definition). It sounds as though the issue is with your Soap UI test utility and treating the response with the namespace from the request.

A service describes the request and response payload, and namespaces help to define that definition. While it seems bad form to mix/match these definitions between the two, it is still valid.

Even though the schemas get mixed between request and response, those are just helpers in interpreting request and response values.

jro
A: 

Okay, the edited question does seem to have an answer: "It depends."

W3C: Version Transition From SOAP/1.1 to SOAP Version 1.2

Lord Torgamus