[英]Can't creating web service from WSDL (netbeans: There is no service in specified WSDL file.)
I created WSDL file in Altora XMLSpay and I whant created Web service in Netbeans (Web servicies from WSDL...) but always when add .wsdl file Netbeans write that "There is no service in specified WSDL file." 我在Altora XMLSpay中创建了WSDL文件,并希望在Netbeans中创建Web服务(来自WSDL的Web服务...),但是总是在添加.wsdl文件时Netbeans写道“指定的WSDL文件中没有服务”。 Can you help me?
你能帮助我吗? What's wrong with my wsdl documnet?
我的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>
I think your problem in your wsdl 我认为您在wsdl中遇到的问题
GetDbStatusBinding The part of the message 'NewMessageRequest' references a schema type instead of a schema element. GetDbStatusBinding消息“ NewMessageRequest”的一部分引用模式类型而不是模式元素。 The part of the message 'NewMessageResponse' references a schema type instead of a schema element.
消息“ NewMessageResponse”的一部分引用模式类型而不是模式元素。
It helped me but I have another error: 它对我有帮助,但我还有另一个错误:
[ERROR] Schema descriptor { http://www.w3.org/2001/XMLSchema }string in message part "messageReq" is not defined and could not be bound to Java. [错误]消息部分“ messageReq”中的模式描述符{ http://www.w3.org/2001/XMLSchema }字符串未定义,并且无法绑定到Java。 Perhaps the schema descriptor { http://www.w3.org/2001/XMLSchema }string is not defined in the schema imported/included in the WSDL.
WSDL中导入/包含的模式中未定义模式描述符{ http://www.w3.org/2001/XMLSchema }字符串。 You can either add such imports/includes or run wsimport and provide the schema location using -b switch.
您可以添加此类导入/包含,也可以运行wsimport并使用-b开关提供模式位置。 line 8 of file:/C:/.../.../mpo_getdbstatus/src/conf/xml-resources/web-services/NewWebServiceFromWSDL/wsdl/mpo_getdbstatus_wsdl.wsdl
文件的第8行:/ C:/.../.../ mpo_getdbstatus / src / conf / xml-resources / web-services / NewWebServiceFromWSDL / wsdl / mpo_getdbstatus_wsdl.wsdl
C:......\\mpo_getdbstatus\\nbproject\\jaxws-build.xml:31: Error starting wsimport: null 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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.