Wes -

You need to prefix the reference to wontFind:

        
<xs:element name="Child2" type="intf:wontFind"/>

Without the namespace prefix, WSDL2Java will assume that the type is
defined in the default namespace
(xmlns="http://schemas.xmlsoap.org/wsdl/";).

--Mike

-----Original Message-----
From: Wes Devauld [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 21, 2003 1:23 PM
To: [EMAIL PROTECTED]
Subject: WSDL2Java unable to find type


I have created a W3C schema (validated in XML Spy) That I have imbedded
into WSDL <types>.  Whenever I run WSDL2Java it says that wontFind is
referenced bu not defined.  Should I be using Attributes with Elements
instead of complexTypes.  Is there some things that can be put into the
schema that can't be used by WSDL2Java.  I get the same result if I use
DOCUMENT or RPC, LITERAL or ENCODED (tried all 4) I can't hand over the
entire schema but the skinny of my WSDL is:




<wsdl:definitions targetNamespace="http://blah";
xmlns:impl="http://lblah"; xmlns:intf="http://blah";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns="http://schemas.xmlsoap.org/wsdl/";>


        <wsdl:types>


                <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified">


                        <xs:complexType name="wontFind">


                                <xs:attribute name="Att1"
use="required">


...


                  </xs:complexType>


                        <xs:element name="ROOT">


                                <xs:complexType>


                                        <xs:choice minOccurs="0"
maxOccurs="unbounded">


                                                <xs:element
name="ChildChoice1">


                                                        <xs:complexType>


        
<xs:sequence>


        
<xs:element name="Child2" type="wontFind"/>


...


                                        </xs:choice>


                                </xs:complexType>


                        </xs:element>


                </xs:schema>


        </wsdl:types>


        <wsdl:message name="connectivityResponse">


                <wsdl:part name="connectivityReturn"
element="impl:ROOT"/>


        </wsdl:message>


        <wsdl:message name="connectivityRequest"/>


        <wsdl:portType name="ConnectivityTest">


                <wsdl:operation name="connectivity">


                        <wsdl:input name="connectivityRequest"
message="impl:connectivityRequest"/>


                        <wsdl:output name="connectivityResponse"
message="impl:connectivityResponse"/>


                </wsdl:operation>


        </wsdl:portType>


        <wsdl:binding name="ConnectivitySoapBinding"
type="impl:ConnectivityTest">


                <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>


                <wsdl:operation name="connectivity">


                        <wsdlsoap:operation soapAction=""/>


                        <wsdl:input name="connectivityRequest">


                                <wsdlsoap:body use="literal"
namespace="http://blah"/>


                        </wsdl:input>


                        <wsdl:output name="connectivityResponse">


                                <wsdlsoap:body use="literal"
namespace="http://blah"/>


                        </wsdl:output>


                </wsdl:operation>


        </wsdl:binding>


        <wsdl:service name="ConnectivityTestService">


                <wsdl:port name="Connectivity"
binding="impl:ConnectivitySoapBinding">


                        <wsdlsoap:address
location="http://localhost:8080/axis/services/Connectivity"/>


                </wsdl:port>


        </wsdl:service>


</wsdl:definitions>







Reply via email to