我有一个我想测试的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