2013-02-19 64 views
3

我正在使用SoapUI測試webservice請求。如何使用soapUi在枚舉字段中發送多個值

我有一個字符串,充當我的請求中按位進行過濾。 該字段是SoapUI的枚舉。在XSD中我有所有枚舉值。

我需要能夠在字段中發送2個或更多的枚舉值,但SoapUI只接受文本,例如「All」或「testvalue2」。例如,我想發送testvalue和testvalue2。

感謝您幫助

XSD提取物:

<xs:enumeration value="None"> 
      <xs:annotation> 
      <xs:appinfo> 
       <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">0</EnumerationValue> 
      </xs:appinfo> 
      </xs:annotation> 
     </xs:enumeration> 
     <xs:enumeration value="Testvalue"> 
      <xs:annotation> 
      <xs:appinfo> 
       <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</EnumerationValue> 
      </xs:appinfo> 
      </xs:annotation> 
     </xs:enumeration> 
     <xs:enumeration value="Testvalue2"> 
      <xs:annotation> 
      <xs:appinfo> 
       <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">2</EnumerationValue> 
      </xs:appinfo> 
      </xs:annotation> 
     </xs:enumeration> 
     <xs:enumeration value="All"> 
      <xs:annotation> 
      <xs:appinfo> 
       <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">255</EnumerationValue> 
      </xs:appinfo> 
      </xs:annotation> 
     </xs:enumeration> 
+0

它已經一段時間,因爲你問這個問題,你能解決嗎? soapUI沒有限制enum值將被髮送到什麼以及如何發送,重要的是該服務實際上會接受同時發送的多個枚舉值,根據我的經驗,服務一次只能接受一個值。 – 2013-08-28 13:22:34

+0

不,我沒有解決這個問題,我一直在與SoapUi服務檯溝通,但沒有出現。我們會改變我們的實施。 – 2013-08-28 15:35:43

+0

你能分享一下你如何在你的網站上輸入這個值的截圖嗎? – 2013-08-28 16:15:31

回答

2

的解決方案是重複的領域,而不是在字段中輸入的所有價值。

<tem:RequestExtendedInfo> 
    <!--Optional:--> 
    <rxas:ExtendedInfo>testvalue1</rxas:ExtendedInfo> 
    <rxas:ExtendedInfo>testvalue2</rxas:ExtendedInfo> 
    </tem:RequestExtendedInfo> 

感謝阿布舍克Asthana表示爲它的幫助