从NetBeans中的WSDL使用.Net Web服务时出错 [英] error while consuming a .Net web service from a WSDL in NetBeans
问题描述
我在.Net中定义了一个Web服务,我想用java来使用它。
当我想在NetBeans中从WSDL创建Web服务客户端时,我收到以下错误。
I have a web service defined in .Net and I want to consume it using java. When I want to create a web service client from WSDL in NetBeans I get the following error.
JAXWS无法创建Web服务客户端:wsimport实用程序。
Web service client can not be created by JAXWS:wsimport utility.
[错误]属性任何已经定义。使用< jaxb:property>来解决这个冲突。
[ERROR] Property "Any" is already defined. Use <jaxb:property> to resolve this conflict.
这是我的WSDL文件的一部分:
Here is one part of my WSDL file :
<s:element name="Select_Normal_Response">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Select_Normal_Result">
<s:complexType>
<s:sequence>
<s:any minOccurs="0" maxOccurs="unbounded" namespace="..."/>
<s:any minOccurs="1" namespace="" processContents="lax" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Select_Normal_With_LastIDResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Select_Normal_With_LastIDResult">
<s:complexType>
<s:sequence>
<s:any minOccurs="0" maxOccurs="unbounded" namespace="..."/>
<s:any minOccurs="1" namespace="..." processContents="lax" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
我想因为我有两个s:任何标签,我收到此错误。
如何解决此问题?
I think because I have two s:any tags, I get this error. How can I fix this?
推荐答案
第二个s:any标签具有Microsoft特定的命名空间 urn:schemas-microsoft-com:xml-diffgram-v1这是非标准的。您可以从wsdl中删除标记,然后重试生成Web服务客户端。
The second "s:any" tag has the a Microsoft specific namespace "urn:schemas-microsoft-com:xml-diffgram-v1" which is non-standard. You can remove the tag from wsdl and retry generating the web service client.
这篇关于从NetBeans中的WSDL使用.Net Web服务时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!