SOAP-UI - 如何在参数中传递 xml [英] SOAP-UI - How to pass xml inside parameter
本文介绍了SOAP-UI - 如何在参数中传递 xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 SOAP-UI 中,我向这样的 Web 服务发出请求:
In SOAP-UI I am making a request to a web service like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xxx="http://xxx.call/">
<soapenv:Header/>
<soapenv:Body>
<cotf:call_XXX>
<!--Optional:-->
<arg0>
<!--Optional:-->
<parameter1>some text</parameter1>
<!--Optional:-->
<parameter2>XML string</parameter1>
</arg0>
</cotf:call_XXX>
</soapenv:Body>
</soapenv:Envelope>
我想知道的是如何在参数 2 上传递 XML 字符串,因为如果我直接放置 XML 字符串,它将假定 XML 字符串节点作为请求参数....
What I would like to know is how I can pass an XML string on parameter 2 since if I put the XML string directly it assumes the XML string nodes as request parameters....
谢谢
推荐答案
要么编码所需的 XML 实体,要么使用 CDATA.
Either encode the needed XML entities or use CDATA.
<arg0>
<!--Optional:-->
<parameter1><test>like this</test></parameter1>
<!--Optional:-->
<parameter2><![CDATA[<test>or like this</test>]]></parameter2>
</arg0>
这篇关于SOAP-UI - 如何在参数中传递 xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文