如何在SOAP消息中写“小于”和“大于”?

时间:2015-08-23 13:35:42

标签: xml soap soapui

我有这个SOAP请求,它运行正常。但是,我想将“EQUALS”更改为“大于”或“小于”,我找不到正确的语法

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap1="http://soap.services.cmdbuild.org">
   <soap:Header/>
   <soap:Body>
      <soap1:getCardList>
         <!--Optional:-->
         <soap1:className>Meter</soap1:className>
         <!--Zero or more repetitions:-->

         <soap1:queryType>
            <!--Optional:-->
            <soap1:filter>
               <!--Optional:-->
               <soap1:name>InstallationDate</soap1:name>
               <!--Optional:-->
               <soap1:operator>EQUALS</soap1:operator> <!--I want to change EQUALS to 'less than'-->
               <!--Zero or more repetitions:-->
               <soap1:value>23/08/2015</soap1:value>
            </soap1:filter>
            <!--Optional:-->
            <soap1:filterOperator>
               <!--Optional:-->
               <soap1:operator></soap1:operator>
               <!--Zero or more repetitions:-->
               <soap1:subquery/>
            </soap1:filterOperator>
         </soap1:queryType>


      </soap1:getCardList>
   </soap:Body>
</soap:Envelope>

请帮忙吗?

2 个答案:

答案 0 :(得分:0)

替换每次出现的&lt; &lt;和&gt;与&gt;

答案 1 :(得分:0)

如果它不喜欢&lt;那么它就不能正确处理XML编码。您可以尝试使用CDATA:

<soap1:operator><![CDATA[>]]></soap1:operator>