1

我使用soap ui 3.0.1 工具来获取webservice 输出这是我在soap ui 中的输入格式

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:impl="http://impl.soap.services.allofactor.iris.com">
   <soapenv:Header/>
   <soapenv:Body>
      <impl:getFavoriteCpt soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <sessionId xsi:type="xsd:string">9213707952611411800</sessionId>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
      </impl:getFavoriteCpt>
   </soapenv:Body>
</soapenv:Envelope>

为此,我将输出格式设置为

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns1:getFavoriteCptResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://impl.soap.services.allofactor.iris.com">
         <getFavoriteCptReturn href="#id0"/>
      </ns1:getFavoriteCptResponse>
      <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:FavoriteCptOutput" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://command.iphone.impl.services.allofactor.iris.com">
         <blisError xsi:type="xsd:boolean">false</blisError>
         <error xsi:type="ns3:Error" xsi:nil="true" xmlns:ns3="http://error.commons.allofactor.iris.com"/>
         <favoriteCpts soapenc:arrayType="ns4:FavoriteCpt[11]" xsi:type="soapenc:Array" xmlns:ns4="http://vo2.data.allofactor.iris.com">
            <favoriteCpts href="#id1"/>
            <favoriteCpts href="#id2"/>
            <favoriteCpts href="#id3"/>
            <favoriteCpts href="#id4"/>
            <favoriteCpts href="#id5"/>
            <favoriteCpts href="#id6"/>
            <favoriteCpts href="#id7"/>
            <favoriteCpts href="#id8"/>
            <favoriteCpts href="#id9"/>
            <favoriteCpts href="#id10"/>
            <favoriteCpts href="#id11"/>
         </favoriteCpts>
      </multiRef>
      <multiRef id="id8" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:FavoriteCpt" xmlns:ns5="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3870</iCodeId>
         <iD xsi:type="xsd:int">2</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">99231</sCode>
         <sLongDesc xsi:type="xsd:string">SUBSEQUENT HOSPITAL CARE, PER DAY, FOR EVAL &amp; MGMT, REQUIRES 2 OF: PROBLEM FOCUSED INTERVAL HISTORY; EXAM; MEDICAL DECISION MAKING LOW COMPLEXITY.PATIENT IS STABLE, RECOVERING OR IMPROVING</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Subsequent Hospital  Care L1</sShortDesc>
      </multiRef>
      <multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:FavoriteCpt" xmlns:ns6="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3878</iCodeId>
         <iD xsi:type="xsd:int">10</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">90935</sCode>
         <sLongDesc xsi:type="xsd:string">HEMODIALYSIS PROCEDURE WITH SINGLE PHYSICIAN EVALUATION</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Hemodialysis Hospital</sShortDesc>
      </multiRef>
      <multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns7:FavoriteCpt" xmlns:ns7="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3876</iCodeId>
         <iD xsi:type="xsd:int">8</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">99238</sCode>
         <sLongDesc xsi:type="xsd:string">HOSPITAL DISCHARGE DAY MANAGEMENT; 30 MINUTES OR LESS</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Discharge Hospital</sShortDesc>
      </multiRef>
      <multiRef id="id9" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns8:FavoriteCpt" xmlns:ns8="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3871</iCodeId>
         <iD xsi:type="xsd:int">3</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">99232</sCode>
         <sLongDesc xsi:type="xsd:string">SUBSEQUENT HOSPITAL CARE, PER DAY, FOR EVAL &amp; MGMT, REQUIRES 2 OF: EXPANDED INTERVAL HISTORY; EXAM; DECISION MAKING OF MODERATE COMPLEXITY. PATIENT IN ADEQUATELY RESPONDING TO THERAPY</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Subsequent Hospital  Care L2</sShortDesc>
      </multiRef>
      <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns9:FavoriteCpt" xmlns:ns9="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3879</iCodeId>
         <iD xsi:type="xsd:int">11</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">90945</sCode>
         <sLongDesc xsi:type="xsd:string">DIALYSIS PROCEDURE OTHER THAN HEMODIALYSIS (EG, PERITONEAL DIALYSIS, HEMOFILTRATION, OR OTHER CONTINUOUS RENAL REPLACEMENT THERAPIES), WITH SINGLE PHYSICIAN EVALUATION</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Peritoneal  dialysis Hospital</sShortDesc>
      </multiRef>
      <multiRef id="id11" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns10:FavoriteCpt" xmlns:ns10="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3</iCodeId>
         <iD xsi:type="xsd:int">1</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">0003</sCode>
         <sLongDesc xsi:type="xsd:string">Therapeutic ultrasound of peripheral vascular vessels</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Ther ult peripheral ves</sShortDesc>
      </multiRef>
      <multiRef id="id6" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns11:FavoriteCpt" xmlns:ns11="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3874</iCodeId>
         <iD xsi:type="xsd:int">6</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">99222</sCode>
         <sLongDesc xsi:type="xsd:string">INITIAL HOSPITAL CARE, PER DAY, FOR EVAL &amp; MGMT OF PATIENT, REQUIRES: COMPREHENSIVE HISTORY; EXAM; MEDICAL DECISION MAKING OF MODERATE COMPLEXITY.PROBLEMS REQUIRING ADMISSION OF MODERATE SEVERITY</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Initial Hospital  Care L2</sShortDesc>
      </multiRef>
      <multiRef id="id5" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns12:FavoriteCpt" xmlns:ns12="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3873</iCodeId>
         <iD xsi:type="xsd:int">5</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">99221</sCode>
         <sLongDesc xsi:type="xsd:string">INITIAL HOSPITAL CARE, PER DAY, FOR EVAL &amp; MGMT OF PATIENT REQUIRES: COMPREHENSIVE HISTORY; EXAM; MEDICAL DECISION MAKING OF LOW COMPLEXITY. PROBLEMS REQUIRING ADMISSION OF LOW SEVERITY</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Initial Hospital  Care L1</sShortDesc>
      </multiRef>
      <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns13:FavoriteCpt" xmlns:ns13="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3877</iCodeId>
         <iD xsi:type="xsd:int">9</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">99239</sCode>
         <sLongDesc xsi:type="xsd:string">HOSPITAL DISCHARGE DAY MANAGEMENT; MORE THAN 30 MINUTES</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Discharge Hospital</sShortDesc>
      </multiRef>
      <multiRef id="id10" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns14:FavoriteCpt" xmlns:ns14="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3872</iCodeId>
         <iD xsi:type="xsd:int">4</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">99233</sCode>
         <sLongDesc xsi:type="xsd:string">SUBSEQUENT HOSPITAL CARE, PER DAY, FOR EVAL &amp; MGMT, REQUIRES 2 OF: DETAILED INTERVAL HISTORY; EXAM; DECISION MAKING OF HIGH COMPLEXITY.PATIENT UNSTABLE, SIGNIFICANT COMPLICATION OR NEW PROBLEM</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Subsequent Hospital  Care L3</sShortDesc>
      </multiRef>
      <multiRef id="id7" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns15:FavoriteCpt" xmlns:ns15="http://vo2.data.allofactor.iris.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
         <iClinicId xsi:type="xsd:int">40589</iClinicId>
         <iCodeId xsi:type="xsd:int">3875</iCodeId>
         <iD xsi:type="xsd:int">7</iD>
         <iProviderId xsi:type="xsd:int">0</iProviderId>
         <sCode xsi:type="xsd:string">99223</sCode>
         <sLongDesc xsi:type="xsd:string">INITIAL HOSPITAL CARE, PER DAY, FOR EVAL &amp; MGMT OF PATIENT, REQUIRES: COMPREHENSIVE HISTORY; EXAM; MEDICAL DECISION MAKING OF HIGH COMPLEXITY.PROBLEMS REQUIRING ADMISSION OF HIGH SEVERITY</sLongDesc>
         <sShortDesc xsi:type="xsd:string">Initial Hospital  Care L3</sShortDesc>
      </multiRef>
   </soapenv:Body>
</soapenv:Envelope>

输出格式格式正确,但未按“#ids”顺序显示。我怎样才能按“#ids”的顺序获得输出响应。那就是“#id1”的细节应该先出现,然后是#id2”。这样我就可以避免额外的循环来迭代数据。任何帮助将不胜感激

4

1 回答 1

0

@abhi - 您是否期望 '#ids' 应该在 SOAP 响应中排序..?如果是,那么它可能是产品中的错误,或者您只期望 10 个 id '#id1'、'#id2' ... '#id10' 来响应它已排序或未排序。在第二种情况下,您可以在 SOAP-UI 中对预期的 SOAP 响应进行断言。

于 2013-10-30T06:21:35.300 回答