Below is the SOAP request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:comp="http://URL/paymentreceipt"> <soapenv:Body> <comp:createPaymentReceipt> <comp:createPaymentReceiptRequest> <comp:RecompPaymentReceipt> ... </comp:RecompPaymentReceipt> </comp:createPaymentReceiptRequest> </comp:createPaymentReceipt> </soapenv:Body> </soapenv:Envelope>
Trying to add a validation to verify the root element of the message using SOAP validation Policy. I am trying to verify the root element as createPaymentReceipt as per below policy code.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <MessageValidation async="false" continueOnError="false" enabled="true" name="SOAP-Message-Validation-1"> <DisplayName>SOAP Message Validation-1</DisplayName> <Properties/> <Element namespace="http://URL/paymentreceipt">createPaymentReceipt</Element> <SOAPMessage/> <Source>request</Source> </MessageValidation>
If i pass the root element as createPaymentReceiptabcd, its failing to raise an fault.
Any help here, what is the wrong i am doing?