Problems with your WSDL include:
  1. No schemaLocation for this import: <import namespace="http://xml.apache.org/xml-soap"/> (you should remove it)
  2. No type definition for apachesoap:Document (you should use xsd:anyType instead, although it would be better if you actually defined the structure of the expected document).
  3. You're missing the "xsd" prefix on the <schema> element in your second schema (targetNamespace="urn:mobility"). Either that or change the default namespace to"http://www.w3.org/2001/XMLSchema".
Anne

On 1/4/06, Nicolas Vahlas <[EMAIL PROTECTED]> wrote:
I am trying to use wsdl2java using the following WSDL file.
I get a very strange behavior on the generation of Faults. In fact, the
"Host" interface produced declares that it throws an array of
"InvalidDataDetailField" which is of course wrong as methods can only
throw "Throwable" classes. Anyway, the thing is that I don't see where
the problem is: am I doing something wrong in my WSDL or is it some kind
of bug in the generation of the Java code.

Can anybody help ?


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:nec"
xmlns:apachesoap="http://xml.apache.org/xml-soap "
xmlns:nec="urn:nec"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:mobility="urn:mobility">

<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="urn:nec"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace=" http://xml.apache.org/xml-soap"/>
<element name="experience" type="apachesoap:Document"/>
</schema>

<schema elementFormDefault="qualified" targetNamespace="urn:mobility"
xmlns="http://europass.cedefop.eu.int/Mobility/V0.1">
<xsd:element name="invalidDataDetail">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="field" minOccurs="1" maxOccurs="unbounded" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="name" type="xsd:string" />
<xsd:element name="value" type="xsd:string" />
<xsd:element name="reason" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</schema>
</wsdl:types>

<wsdl:message name="receiveExperienceRequest">
<wsdl:part element="nec:experience" name="experience"/>
</wsdl:message>

<wsdl:message name="receiveExperienceResponse">
</wsdl:message>

<wsdl:message name="invalidDataFault">
<wsdl:part element="mobility:invalidDataDetail" name="fields" />
</wsdl:message>

<wsdl:portType name="Host">
<wsdl:operation name="receiveExperience" parameterOrder="experience">
<wsdl:input message="nec:receiveExperienceRequest"
name="receiveExperienceRequest"/>
<wsdl:output message="nec:receiveExperienceResponse"
name="receiveExperienceResponse"/>
<wsdl:fault message="nec:invalidDataFault" name="invalidDataFault" />
</wsdl:operation>
</wsdl:portType>

<wsdl:binding name="HostSoapBinding" type="nec:Host">
<wsdlsoap:binding style="document"
transport=" http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="receiveExperience">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="receiveExperienceRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="receiveExperienceResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="invalidDataFault">
<wsdlsoap:fault name="invalidDataFault" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>

<wsdl:service name="HostService">
<wsdl:port binding="nec:HostSoapBinding" name="Host">
<wsdlsoap:address location="https://ydra.instore.gr/nec/services/Host"/ >
</wsdl:port>
</wsdl:service>

</wsdl:definitions>

--
VAHLAS Nicolas
Senior Software Engineer

Quality & Reliability
Διευ.: Κονίτσης 11Β,
       151 25 Μαρούσι
Τηλ.:  210 80 29 409 (270)
Mail:  [EMAIL PROTECTED]




Reply via email to