Description
John Cater opened SWS-232 and commented
With the following schema:
<element name="EchoMessageRequest">
<complexType>
<attribute name="message" type="string"/>
</complexType>
</element>
I attempt to submit the message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.example.com/soap-test/schemas">
soapenv:Header/
soapenv:Body
<sch:EchoMessageRequest message="hello world"/>
</soapenv:Body>
</soapenv:Envelope>
And I get the response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
SOAP-ENV:Header/
SOAP-ENV:Body
SOAP-ENV:Fault
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring xml:lang="en">Validation error</faultstring>
<detail>
<spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">cvc-complex-type.3.2.2: Attribute 'message' is not allowed to appear in element 'sch:EchoMessageRequest'.</spring-ws:ValidationError>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I wrote a small handler that takes XML and attempts to validate it against the same schema the PayloadValidatingInterceptor uses, and it reports no problem.
I am attaching a minimal project which reproduces this issue. I used SOAPui to test but this seems to be independent of the client.
Affects: 1.0.2
Attachments:
- soap-test.zip (8.22 kB)