我在altora xmlspay中创建了wsdl文件,而我在netbeans中创建了Web服务(Web servicies trom wsdl ...(,但始终在添加.wsdl file netbeans写下"没有服务时在指定的WSDL文件中。"你能帮助我吗?我的WSDL Documnet怎么了?
<?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://new.webservice.namespace" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://new.webservice.namespace">
<wsdl:types>
<xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="NewMessageRequest">
<wsdl:part name="parameter" type="xs:string"/>
</wsdl:message>
<wsdl:message name="NewMessageResponse">
<wsdl:part name="parameter" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="GetDbStatus">
<wsdl:operation name="OpenDB">
<wsdl:input message="tns:NewMessageRequest"/>
<wsdl:output message="tns:NewMessageResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="GetDbStatusBinding" type="tns:GetDbStatus">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="OpenDB">
<soap:operation soapAction="urn:#NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Test_Wsdl">
<wsdl:port name="GetDbstatusPort" binding="tns:GetDbStatusBinding">
<soap:address location="http://localhost:8080/mpo_getdbstatus/GetDbStatus"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
我认为您在WSDL中的问题
getDbStatusBinding消息" newmessagerequest"的一部分引用了模式类型,而不是架构元素。消息" newmessageresponse"的一部分参考模式类型而不是模式元素。
它帮助了我,但我还有另一个错误:
[错误]模式描述符{http://www.w3.org/2001/xmlschema} String在消息部分" Messagereq"中未定义,不能绑定到Java。也许模式描述符{http://www.w3.org/2001/xmlschema} ststring在WSDL中导入/包含的架构中未定义。您可以添加此类导入/包括或运行WSIMPORT,并使用-B开关提供架构位置。 文件:/c:/.../.../mpo_getdbstatus/src/conf/xml-resources/web-services/newwebservicefromwsdl/wsdl/mpo_getdbstatus_wsdl.wsdl.wsdl.wsdl c:............ mpo_getdbstatus nbproject jaxws-build.xml:31:启动错误启动wsimport:null
<wsimport sourcedestdir="${build.generated.dir}/jax-wsCache/service/NewWebServiceFromWSDL" destdir="${build.generated.dir}/jax-wsCache/service/NewWebServiceFromWSDL" wsdl="${basedir}/${conf-dir}xml-resources/web-services/NewWebServiceFromWSDL/wsdl/mpo_getdbstatus_wsdl.wsdl" catalog="catalog.xml" encoding="${source.encoding}" extension="true" verbose="true" fork="false" xnocompile="true" xendorsed="true">
<depends file="${basedir}/${conf-dir}xml-resources/web-services/NewWebServiceFromWSDL/wsdl/mpo_getdbstatus_wsdl.wsdl"/>
<produces dir="${build.generated.dir}/jax-wsCache/service/NewWebServiceFromWSDL"/>
</wsimport>