[XML] Probleme WSDL: the part has an invalid value
Bonjour tout le monde
J'essaye de créer un wsdl mais je n'arrive pas à le faire marcher :?
J'ai utilisé plusieurs tutoriaux dont le très bon tutorial de Mickael Baron
http://mbaron.developpez.com/soa/wsdl/
Mais malgré cela, je n'arrive pas à régler ces problèmes:
1/
Citation:
this part 'GetDataResult has an invalid value ScrappedObject' defined for it's element. Elment declarations must refer to valid values defined in a schema
Même message pour GetDataXpath et GetDataXpathResponse
2/
une autre erreur dans le binding apparait également:
Citation:
The operation specified for the 'WesSoapBinding' binding is not defined for port type 'WesSoap'
Je ne comprends pas cette erreur vu que je les ai bien défini dans portType
Voici le code du wsdl
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Wes" targetNamespace="http://www.fff.com/Interfaces/Wes"
xmlns:tns="http://www.fff.com/Interfaces/Wes"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://www.fff.com/Interfaces/Wes" schemaLocation="scrappingModel.xsd" />
</schema>
</wsdl:types>
<wsdl:message name="getData" />
<wsdl:message name="getDataResponse">
<wsdl:part name="getDataResult" element="ScrappedObject"/>
</wsdl:message>
<wsdl:message name="getDataXpath">
<wsdl:part name="getDataXpathResult" type="string"/>
</wsdl:message>
<wsdl:message name="getDataXpathResponse">
<wsdl:part name="getDataResult" element="ScrappedObject"/>
</wsdl:message>
<wsdl:portType name="WesSoap">
<wsdl:operation name="getData">
<wsdl:input message="tns:getData" />
<wsdl:output message="tns:getDataResponse" />
</wsdl:operation>
<wsdl:operation name="getDataXpath">
<wsdl:input message="tns:getDataXpath" />
<wsdl:output message="tns:getDataXpathResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WesSoapBinding" type="tns:WesSoap">
<wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="getData">
<wsdlsoap:operation soapAction="" />
<wsdl:output name="getDataResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDataXpath">
<wsdlsoap:operation soapAction="" />
<wsdl:output name="getDataXpathResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WesSoapService">
<wsdl:port name="WesSoapPort"
binding="tns:WesSoapBinding">
<wsdlsoap:address
location="http://localhost:9000/myappli/services/wes-1.0" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions> |
et voici le fichier xsd correspondant
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.fff.com/Interfaces/Wes"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
xmlns:tns="http://www.fff.com/Interfaces/Wes"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<!-- common structure for model -->
<element name="ScrappedObject">
<complexType>
<sequence>
<element name="data" type="string" />
</sequence>
</complexType>
</element>
</schema> |
Je vous remercie par avance de votre aide!