我正在使用soap UI(来自smartbear)以xml格式发送soap请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsg="http://wsg.hpos.om.hp.com/"> <soapenv:Header/> <soapenv:Body> <wsg:abc> <wsg:contract> <request> <request-attributes> <message>"this & and that"</message> </request-attributes> </request> </wsg:contract> </wsg:abc> </soapenv:Body> </soapenv:Envelope>
并且响应是:无效的请求.你能不能说明如何逃避&?
谢谢
您可以将有效负载包装在<![CDATA []]>内.而不用担心逃避:
<![CDATA[<request> <request-attributes> <message>"this & and that"</message> </request-attributes> </request>]]>