2012-10-17 65 views
0

我使用soapUI來測試我的web服務API,但是一些字段/參數是一個對象而不是標準數據類型,例如,如何通過soapUI將參數作爲對象分配給Web服務API?

<soapenv:Envelope xml> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <api:test> 
     <api:giveMeSomeText>BEEF1234567890</api:giveMeSomeText> 
     <api:giveMeJavaURLObject>??????</api:giveMeJavaURLObject> 
     </api:test> 
    </soapenv:Body> 
</soapenv:Envelope> 

如何分配的參數作爲對象由soapUI的web服務API?我可以使用CDATA字符串來捆綁我的對象,怎麼做?

<![CDATA[??????]]> 

enter image description here

回答

0

您可以使用CDATA,請參閱下面的示例

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sam="http://www.example.org/sample/"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <sam:searchResponse> 
     <sam:searchResponse> 
      <item><id>1234</id><description><![CDATA[<item><width>123</width><height>345</height> 
<length>098</length><isle>A34</isle></item>]]></description><price>123</price> 
      </item> 
     </sam:searchResponse> 
     </sam:searchResponse> 
    </soapenv:Body> 
</soapenv:Envelope> 
相關問題