I don't know what your schema looks like, but we've found that to work
effectively with Axis, you should use some variation of the "Venetian blind"
design (see http://www.xfront.com/GlobalVersusLocal.pdf).  

As an example, we used the following design style (don't know that it fits
any particular style strictly):

<xs:schema targetNamespace="uri:mynamespace.com" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
           xmlns:sup="uri:mynamespace.com" 
           elementFormDefault="qualified"
attributeFormDefault="unqualified">
  <xs:complexType name="PartItemType">
        <xs:attribute name="SupplierPartSKU" type="xs:string"
use="required"/>
        <xs:attribute name="PartDescription" type="xs:string"
use="required"/>
        <xs:attribute name="Quantity" type="xs:int" use="required"/>
        <xs:attribute name="QuotedPrice" type="xs:float" use="optional"/>
  </xs:complexType>
  <xs:complexType name="PartListType">
        <xs:sequence>
                <xs:element name="PartItem" type="sup:PartItemType"
maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="ExpectedShipDate" type="xs:string"
use="optional"/>
  </xs:complexType>
  <xs:element name="PartList" type="sup:PartListType"/>
</xs:schema>

In particular, we found that building up complex types, naming them and then
having the element definitions reference those defined types gave us a
number of benefits
1. First, it  eliminated the problem you were encountering with Axis
2. It is just a good design style to build re-usable components, even when
those "components" are XML fragments.  We got a tremendous amount of
leverage from re-using these complex types in different ways.
3. Axis generated helper classes for representing this XML structure as a
set of Java classes.  This made building and processing the XML document
much easier.
4. We found this enhanced the interoperability of several of our services
hosted on different WS platforms, all supporting the same interface.

Hope this helps,

Mark

____________________________________________
Mark Secrist, Senior Software Consultant
HP Developer Resources Organization (DRO) 
AppDev Advanced Technology Center
[EMAIL PROTECTED]  Tel: (970) 898-7490  



-----Original Message-----
From: Joachim Schneider [mailto:[EMAIL PROTECTED]
Sent: Monday, May 26, 2003 1:34 AM
To: Axis-User
Subject: Doc/Lit Problem using wsdl2java


I've defined a XML Schema and a WSDL file that includes this schema. When
using WSDL2Java the generated class names for all elements start with '_'
(underscore), those for types do not start with an underscore.
Also the generated Helpers do a

typeDesc.setXmlType(new
QName("http://www.thomsonpatentstore.net/xml/thomsonpatentstore.xsd";,
                              ">documentRequest"));

Is the '>' in front of documentRequest correct? The elment name in the
schema is documentRequest, the generated class is _documentRequest.

When deploying to axis I get an

- Unable to deploy typemapping:
{http://www.thomsonpatentstore.net/xml/thomsonpatentstore.xsd}>documentReque
st
java.lang.ClassNotFoundException: No type QName for mapping!

Exception. The generated classes have been copied to the
axis/WEB-INF/classes directory.


Is doc/lit supported broken in the latest CVS (25-05) version?

Joachim


Wila-Derwent GmbH
Landsberger Stra�e 191a
80687 M�nchen
Deutschland
Tel +49(0)89 547 56-221
Fax +49(0)89 547 56-409
mailto:[EMAIL PROTECTED]
http://www.wila-derwent.com
http://www.ipr-village.com

--------------------------------------------------------------------------
The information contained in this email is confidential and intended
only for use of the individual or entity named above. If the reader
of this message is not the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication
is strictly prohibited. Wila-Derwent GmbH will accept no responsibility
or liability in respect to this email other than to the addressee. If
you have received this communication in error, please notify us
immediately via email: [EMAIL PROTECTED]
--------------------------------------------------------------------------

Reply via email to