加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xml – 如何在soap UI中转义&符号(&)

发布时间:2020-12-16 07:46:23 所属栏目:百科 来源:网络整理
导读:我正在使用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 lt;requestgt; lt;re
我正在使用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>
         &lt;request&gt;

         &lt;request-attributes&gt;
            &lt;message&gt;"this &amp; and that"&lt;/message&gt;                
         &lt;/request-attributes&gt;             
         &lt;/request&gt;             
         </wsg:contract>
      </wsg:abc>
   </soapenv:Body>
</soapenv:Envelope>

并且响应是:无效的请求.你能不能说明如何逃避&?
谢谢

您可以将有效负载包装在<![CDATA []]>内.而不用担心逃避:
<![CDATA[<request>
    <request-attributes>
        <message>"this & and that"</message>
    </request-attributes> 
</request>]]>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读