Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Message Validation fails for multiple namespaces

When validating SOAP message with Message Validation Policy I encounter the problems with message validation when they contain multiple namespaces.

My configuration:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageValidation name="validate-soap-message">
 <DisplayName>Validate SOAP Message</DisplayName>
 <SOAPMessage version="1.1"/>
 <Source>message</Source>
 <ResourceURL>wsdl://example.wsdl</ResourceURL>
</MessageValidation>

Example payload:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:tns="http://URL/tns">
   <soapenv:Header/>
   <soapenv:Body>
      <tns:getIncidentRequest>
         <tns:IncidentID>IM01941995</tns:IncidentID>
      </tns:getIncidentRequest>
   </soapenv:Body>
</soapenv:Envelope>

And received error:

{"Envelope":{"encodingStyle":"http:\/\/schemas.xmlsoap.org\/soap\/encoding\/","Body":{
		"Fault":{
			"faultactor":{},
			"faultcode":"soap:Server",
			"faultstring":"validate-soap-message failed with reason: \"Unexpected Root Element tns:getIncidentRequest [Line 4]\"",
			"detail":{"source":{"errorcode":"steps.messagevalidation.Failed"}}
			}
}}}

Any idea what is the source of the problem?

Solved Solved
0 8 979
1 ACCEPTED SOLUTION

Upgrade to version 4.18.x solved the the problem.

View solution in original post

8 REPLIES 8