我有一個我想測試的Web服務的WSDL文件。我在Eclipse中使用Web Services Explorer來測試web服務。 webservice定義了一個登錄操作,其中包含一個loginRequest消息。定義如下所示。在Eclipse Web服務資源管理器中測試WSDL
登錄操作
<wsdl:operation name="login" parameterOrder="in0">
<wsdl:input message="impl:loginRequest" name="loginRequest"/>
</wsdl:operation>
loginRequest消息
<wsdl:message name="loginRequest">
<wsdl:part name="in0" type="tns1:CompiereBean"/>
</wsdl:message>
CompiereBean對象
<complexType name="CompiereBean">
<sequence>
<element name="loginDetails" nillable="true" type="impl:ArrayOf_xsd_anyType"/>
<element name="productList" nillable="true" type="impl:ArrayOf_xsd_anyType"/>
<element name="quantityList" nillable="true" type="impl:ArrayOf_xsd_anyType"/>
<element name="tenantDetails" nillable="true" type="impl:ArrayOf_xsd_anyType"/>
</sequence>
</complexType>
ArrayOf_xsd_anyType
<complexType name="ArrayOf_xsd_anyType">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>
</restriction>
</complexContent>
</complexType>
現在,爲了測試web服務,我右鍵點擊WSDL文件 - >網絡服務 - >測試與Web服務瀏覽器。我現在在「操作」窗格中獲取一個表單,其中包含用於指定loginDetails,productList,quantityList和tenantDetails的字段。
所以,我的問題是,因爲loginDetails,productList,quantityList和tenantDetails都是ArrayList對象,如何輸入它們的值?
你的WSDL中「impl:ArrayOf_xsd_anyType」的定義究竟是什麼?我們可以猜測並可能接近它,但如果我們不需要猜測,它會好得多。 – 2010-02-01 12:23:28
我用impl的定義更新了我的問題:ArrayOf_xsd_anyType – Ryan 2010-02-01 12:39:12
我建議您嘗試使用SoapUI(http://www.soapui.org/)測試您的Web服務。它是一個免費的工具,具有非常友好的界面來測試Web服務。從WSDL它會創建一個測試你的服務的請求,你只需要替換「?」與價值... – JuanZe 2010-02-01 12:47:36