Consumir WSDL webservice em .NET
Pessoal, estou tentando consumir um webservice feito em .NET e ao adicionar a referência ao meu projeto, ocorre um conflito na geração do XML dentro do Netbeans:
Property “Any” is alread defined. Use jaxb:property to resolve this conflict.
Localizei Any no código e o XML foi gerado assim:
<?xml version="1.0" encoding="utf-8"?><wsdl:definitions xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/” xmlns:tm=“http://microsoft.com/wsdl/mime/textMatching/” xmlns:soapenc=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:mime=“http://schemas.xmlsoap.org/wsdl/mime/” xmlns:tns=“http://tempuri.org/” xmlns:s=“http://www.w3.org/2001/XMLSchema” xmlns:soap12=“http://schemas.xmlsoap.org/wsdl/soap12/” xmlns:http=“http://schemas.xmlsoap.org/wsdl/http/” targetNamespace=“http://tempuri.org/” xmlns:wsdl=“http://schemas.xmlsoap.org/wsdl/”>
wsdl:types
<s:schema elementFormDefault=“qualified” targetNamespace=“http://tempuri.org/”>
<s:element name=“listarUsuarioResponse”>
<s:complexType>
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“1” name=“listarUsuarioResult”>
<s:complexType>
<s:sequence>
<s:any minOccurs=“0” maxOccurs=“unbounded” namespace=“http://www.w3.org/2001/XMLSchema” processContents=“lax” />
<s:any minOccurs=“1” namespace=“urn:schemas-microsoft-com:xml-diffgram-v1” processContents=“lax” />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name=“consultarUsuarioResponse”>
<s:complexType>
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“1” name=“consultarUsuarioResult”>
<s:complexType>
<s:sequence>
<s:any minOccurs=“0” maxOccurs=“unbounded” namespace=“http://www.w3.org/2001/XMLSchema” processContents=“lax” />
<s:any minOccurs=“1” namespace=“urn:schemas-microsoft-com:xml-diffgram-v1” processContents=“lax” />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
… e assim vai.
Procurei na internet por soluções para este problema e li que devo converter o esquema do arquivo para outro tipo de padrão. Alguém pode me dar uma luz nisso?
