Pessoal é o seguinte,
Estou usando o Eclipse 3.3.2, com o WTP e o Axis2 versão 1.4.1. Quero gerar o cliente de um web service rodando no SharePoint. Tenho o WSDL, um arquivo ‘asmx.wsdl’ - gerado pelo .NET.
Já me foi confirmado que o WSDL esta correto, então será problema do Eclipse/Axis2 plugin?
Outro detalha, o serviço possui ‘duas portas’. Não sei ainda se isso interfere…
Pelo assitente de criação do Eclipse “Web Service Client”, obtenho os seguintes erros de validação:
schema_reference.4: Failed to read schema document ‘null’, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. TesteWebService/WebContent/wsdl PortalAccessControlService.wsdl line 5 1224098652522 40146
e
src-resolve: Cannot resolve the name ‘in0’ to a(n) ‘element declaration’ component. TesteWebService/WebContent/wsdl PortalAccessControlService.wsdl line 9 1224098652522 40147
Os problemas estão nas linhas 5 ( “<s:import />” ) e 9 ( “<s:element minOccurs=“0” maxOccurs=“1” ref=“in0” />” ) :
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://wsssoportalhmg.tubarao.com.br/webapp1/portalAccessControlWebService/services/PortalAccessControlService" xmlns:s0="http://session.ejb.portal.atan.cst.com.br" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://wsssoportalhmg.tubarao.com.br/webapp1/portalAccessControlWebService/services/PortalAccessControlService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://session.ejb.portal.atan.cst.com.br">
<s:import />
- <s:element name="portalAuthentication">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="in0" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="portalAuthenticationResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="portalAuthenticationReturn" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
- <s:schema elementFormDefault="qualified">
<s:element name="in0" type="s:string" />
</s:schema>
</wsdl:types>
Está realmente complicado resolver. O engraçado é que o NetBeans (6.1) consegue criar o cliente, o Eclipse não.