Forum Discussion

mkoron's avatar
mkoron
New Contributor
14 years ago

soapUI mock service - escape "&&" in request

Hi!
I'm working on mock service and cannot find the resolution for this issue.
Service is called with random data and sometimes "&" appears in the input string. Mock considers it as an entity (not ended with ";") and returns SOAP Fault:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>Server</soap:Value>
</soap:Code>
<soap:Reason>
<!--1 or more repetitions:-->
<soap:Text xml:lang="en">org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA</soap:Text> </soap:Reason>
</soap:Fault>
</soap:Body>
</soap:Envelope>


Is there any way to bypass it?
I have tried to use OnRequest script to filter the ampersand / translate it into entity, but failed.
It seems that the validation is made before the script is run.

Thanks,
Michal
No RepliesBe the first to reply