【发布时间】:2008-10-09 12:01:56
【问题描述】:
我有一个在 Delphi 中构建的 Web 服务器,我正在尝试通过 Eclipse 向导创建一个 Web 服务客户端来在 Java 上使用它的 Web 服务(我正在使用 Eclipse IDE)。 Web 服务资源管理器识别 WSDL 文件,但在尝试创建客户端时,向导说存在“意外属性”并且没有创建任何文件。
这是我的 wsdl 文件(我的 Delphi Web Server 发布的那个)。
<?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 实用程序项目会更容易(因为它只创建一个项目而不是两个)。
那么,关于如何让 Eclipse 忽略这些属性,或者 Delphi 不发布它们的任何想法?
【问题讨论】:
标签: java eclipse web-services delphi