axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Melanie Courtot" <>
Subject WSDL2Java and xsd:element
Date Wed, 08 Nov 2006 16:29:44 GMT

I'm trying to get Castor and Axis to work together and to generate the
java classes using wsdl2java. Everything looks fine at the moment, except
for a small thing.
I have a xml schema (the one I used previously to build my Castor
classes), and I want to use it in my wsdl.

To keep things simple at the moment I don't import that schema but just
copy it into my wsdl.
My question is is it possible to use an element (instead of a complexType)
defined in that schema as a return for one of my method.

my schema: (simplified)
<xsd:complexType name="Sbontology">
        <xsd:element name="Term" maxOccurs="unbounded" minOccurs="1">

If I use (transforming element Term into complexType Term)
<xsd:complexType name="Term">

I can then use:
    <wsdl:message name="getTermByIdResponse">
          <wsdl:part name="getTermByIdReturn"  type="tns:Term"/>

(tns being my own namespace

I would like to use my original xsd and import it into the wsdl, but I
can't find information on how to use the element instead of the
complexType in the message.

I tried using
  <wsdl:message name="getTermByIdResponse">
          <wsdl:part name="getTermByIdReturn"  element="tns:Term"/>

with the original schema but I get an error Element
is referenced but not defined.

I've been trying to find info on the web, but I don't know if it is
because I have to use a complexType, or if my syntax is wrong or if it is
a namespace problem. (using "type" works, so I would say the namespace is

Thanks for any help,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message