Pessoal,
Estou com problema ao tentar gerar um xsd e um wsdl no eclipse.
Está dando os seguintes erros:
Referenced file contains errors (file:/D:/x/eclipse/plugins/org.wsdl4j_1.4.0.v200606181221/xsd/soapenc.xsd). For more information, right click on the message and select “Show Details…”
The part ‘searchRequest’ has an invalid value ‘user’ defined for its element. Element declarations must refer to valid values defined in a schema.
The part ‘searchResponse’ has an invalid value ‘list’ defined for its element. Element declarations must refer to valid values defined in a schema.
esse é o xsd:
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.x.com.br/y/xsd" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.x.com.br/y/xsd">
<complexType name="Links">
<sequence>
<element name="Link" type="tns:Link" maxOccurs="unbounded"></element>
</sequence>
</complexType>
<complexType name="Link">
<attribute name="url" type="string"></attribute>
</complexType>
<complexType name="User">
<sequence>
<element name="name" type="string"></element>
</sequence>
</complexType>
<element name="user" type="tns:User"></element>
<element name="list" type="tns:Links"></element>
</schema>
e esse o wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name="y"
targetNamespace="http://www.x.com.br/wsdl/y/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://www.x.com.br/wsdl/y/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:y="http://www.x.com.br/xsd/y">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import
namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import
namespace="http://www.x.com.br/y/xsd"
schemaLocation="y.xsd">
</xsd:import>
</xsd:schema>
</wsdl:types>
<wsdl:message name="searchRequest">
<wsdl:part name="searchRequest" element="tns:user"></wsdl:part>
</wsdl:message>
<wsdl:message name="searchResponse">
<wsdl:part name="searchResponse" element="tns:list">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="search">
<wsdl:operation name="search">
<wsdl:input message="tns:searchRequest" name="searchRequest"></wsdl:input>
<wsdl:output message="tns:searchResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="search" type="tns:search">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="search">
<soap:operation soapAction="http://www.example.org/y/search"/>
<wsdl:input name="searchRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="y">
<wsdl:port name="y" binding="tns:search">
<soap:address location="http://www.x.com.br/y/wsdl"></soap:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>