我遇到的问题是,当我尝试使用此wsdl在netbeans中创建Web服务时,netbeans说没有定义服务。我是新手,但据我所知,有一个定义。从WSDL创建Web服务时出现问题
的WSDL是:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://discoveryinsurance.com/DicQuoteSvc/AgencyQuote.wsdl" xmlns:ns="http://discoveryinsurance.com/DicQuoteSvc/schemas/DicAcordQuoteRq.xsd" xmlns:na="http://discoveryinsurance.com/DicQuoteSvc/schemas/DicAcordQuoteRs.xsd" targetNamespace="http://discoveryinsurance.com/DicQuoteSvc/AgencyQuote.wsdl">
<wsdl:import namespace="http://discoveryinsurance.com/DicQuoteSvc/schemas/" location="DicAcordQuoteRq.xsd"/>
<wsdl:import namespace="http://discoveryinsurance.com/DicQuoteSvc/schemas/" location="DicAcordQuoteRs.xsd"/>
<wsdl:types>
<xs:schema targetNamespace="http://discoveryinsurance.com/DicQuoteSvc/schemas/" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="NewMessageRequest">
<wsdl:part name="parameter" element="ns:ACORD"/>
</wsdl:message>
<wsdl:message name="NewMessageResponse">
<wsdl:part name="parameter" element="na:ACORD"/>
</wsdl:message>
<wsdl:portType name="QuotePortType">
<wsdl:operation name="RequestQuote">
<wsdl:input message="tns:NewMessageRequest"/>
<wsdl:output message="tns:NewMessageResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="QuoteBinding" type="tns:QuotePortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="RequestQuote">
<soap:operation soapAction="http://discoveryinsurance.com/DicQuoteSvc/AgencyQuote" style="rpc"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AgencyQuote">
<wsdl:port name="QuotePortType" binding="tns:QuoteBinding">
<soap:address location="http://discoveryinsurance.com/DicQuoteSvc/"/>
</wsdl:port>
</wsdl:service>
XMLSpy的说,WSDL是有效的,但是当我试图从它创建Web服务失败。 任何帮助,将不胜感激,甚至建设性的批评。
编辑
从条命令行,我得到使用的wsimport。
[ERROR]无效的wsdl:操作 “RequestQuote”:其rpc-文字操作,MES 鼠尾草部分必须引用架构类型声明文件的 第16行:/ d:/项目/ DICACORD/QuoteRq2 .wsdl
这是否意味着即使两个xsd被导入,我仍然必须在wsdl中定义类型?
更新2
用于请求 - 架构>。 Schema at pastie
加成
有谁看到什么不对的XSD进口和/或它们是如何被使用?验证WSDL是有效
你工作的是什么框架。Spring使这非常简单。 – Zoidberg 2009-12-17 19:35:38
ALSO,你的XSD在哪里? (模式) – Zoidberg 2009-12-17 19:44:04
模式每个都超过250行。它会允许我发布那些大吗? – ChadNC 2009-12-17 20:18:08