我有一个用Delphi构建的Web服务器,我试图通过Eclipse向导创建一个Web服务客户端来使用Java上的Web服务(我正在使用Eclipse IDE)。 Web服务资源管理器可以识别WSDL文件,但在尝试创建客户端时,向导提示存在“意外属性”,并且不会创建任何文件。将Delphi Web服务导入到Java
这是我的wsdl文件(我的Delphi Web服务器发布的文件)。
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ITSOAPWebServiceservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
<message name="WebMethod0Request">
<part name="Document" type="xs:string"/>
</message>
<message name="WebMethod0Response">
<part name="return" type="xs:boolean"/>
</message>
<portType name="ITSOAPWebService">
<operation name="WebMethod">
<input message="tns:WebMethod0Request"/>
<output message="tns:WebMethod0Response"/>
</operation>
</portType>
<binding name="ITSOAPWebServicebinding" type="tns:ITSOAPWebService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="WebMethod">
<soap:operation soapAction="urn:TWebServiceIntf1-ITSOAPWebService#WebMethod" style="rpc"/>
<input message="tns:WebMethod0Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TWebServiceIntf1-ITSOAPWebService"/>
</input>
<output message="tns:WebMethod0Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:TWebServiceIntf1-ITSOAPWebService"/>
</output>
</operation>
</binding>
<service name="ITSOAPWebServiceservice">
<port name="ITSOAPWebServicePort" binding="tns:ITSOAPWebServicebinding">
<soap:address location="http://localhost:1024/soap/ITSOAPWebService"/>
</port>
</service>
</definitions>
现在,Eclipse中说, “消息” 属性在两个:
definicions.binding.operation.input
definitions.binding.operation.output
是意想不到的。我知道这是多余的,因为这些已经定义在
definitions.portType.operation.input
definitions.portType.operation.output
但我仍然无法导入网络服务。
我的Java应用程序将在JBoss 4.2服务器上运行,但我认为将该客户端创建为Java Utility Project会更容易(因为它只创建一个项目而不是两个)。
那么,有关如何让Eclipse忽略这些属性或Delphi不发布它们的想法?