Ok I understand that there are two different schemas and its meaning. But when I use WSDLToJava with these WSDL it's not working. For example an error is that "Device" class can not be found. Do I need import the first schema from the second?
I have changed Device[] instead Vector<Device> and it works better. WSDLToJava generates code for all classes in WSDL"Parameter", "Device"... But I have fixed my WSDL using only one schema. I mean I have copied the content first schema in the second and I have added "tns:" in all "type" references. For example type="tns:networkComponent" Un saludo. Santiago Miguel Aranda Rojas Telvent Interactiva Extension: 35999 Simon Laws <[email protected]> Simon Laws 07/05/2009 16:38 Por favor, responda a user Para: [email protected] cc: Asunto: Re: Wrong generated WSDL On Thu, May 7, 2009 at 3:08 PM, <[email protected]> wrote: > > Hi > > I am developing a SCA application using tuscany. I want to publish one > component like a web service. I have one method "getDeviceList" that returns > a vector of devices (Vector<Device>). But wsdl it is wrong because I check > this with the WSDL editor plugin installed in Eclipse Ganymedes. Because of > this wrong wsdl I can not use WSDLToJava to obtain Java code for a client > application. Anybody can check my WSDL? I don`t know enough of WSDL format. > I hope Tuscany can fix these problems. > > You can see Device class in the photo. > > > Thanks > > Un saludo. > Santiago Miguel Aranda Rojas > Telvent Interactiva > Extension: 35999 Hi Santiago Was the service interface defined using a vanilla set of Java classes? You will note in the generated WSDL that two schema are present in the types section. The first describes all of the types and maps to your Java classes. The second describes the message wrapper types required are we run with doc/lit/wrapped style messages by default. The message wrappers reference the types described in the first schema. for example, <xs:element minOccurs="0" name="return" nillable="true" type="vector"/> Where "vector" is a type described in the first schema. In order to create the association between the schema an import is included in the second schema, <xs:import/> The types, by default, are not described in a namespace. Note also that the import specifies no namespace or location.It is up to the XML parser to locate the types in this situation. You are right though that this causes a validation failure on Eclipse. Not sure that that is a valid validation failure. To try and work round this for now we could look to see if it's possible to force the types into a namespace. I'll have to do some research on this as not sure how this would work when using a collection. Raymond is our expert in this area and may have thoughts. Regards Simon
