Your statement about the names is incorrect, Anne. Schema doesn't allow the same name to be used for different global definitions, but you're fine reusing names for local elements in different complexTypes.

 - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Anne Thomas Manes wrote:
Given that the schema specified elementFormDefault="qualified", the
schema is invalid. You cannot define two elements in a single
namespace with the same local name. The proper fix to Axis2 would be
to generate an error that flags the problem.

The proper fix to the schema is to create a global element called URL
and ref the element from the complex type definitions.

Note also that the first schema (the one imported into the WSDL)
includes a number of element definitions with no type definitions.
e.g.,

       <xsd:element name="LoadBlogRequest" />

These definitions default to xsd:anyType, which will cause lots of
interop problems. My interpretation of the schema is that these
elements are intended to contain nothing -- basically a void type. If
that is the intention, they should be defined as follows:

      <xsd:element name="LoadBlogRequest" >
            <xsd:complexType />
      </xsd:element>

Anne

On 3/7/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:
The problem was you had two complex types contain same element name
eg.
 <xsd:complexType name=
"Entry">
 <xsd:element name="URL"
minOccurs="0" maxOccurs="1">
 <xsd:simpleType
>
 <xsd:restriction base="xsd:string">
 <xsd:minLength
 value="0" />
 <xsd:maxLength
 value="255" />
 </xsd:restriction>
 </xsd:simpleType
>

 </xsd:element>
 </xsd:complexType>

and
<xsd:complexType
 name="Entry_Reply">
 <xsd:all minOccurs="0"
maxOccurs="1">
 <xsd:element name=
"URL" minOccurs="0" maxOccurs="1">

 <xsd:simpleType>
 <xsd:restriction base="xsd:string">

 <xsd:minLength value="0" />
 <
xsd:maxLength value="255" />
 </xsd:restriction>

 </xsd:simpleType>
 </xsd:element>
I fixed this by generating a unique suffix. Please check with a nightly
build


 --
Amila Suriarachchi,
WSO2 Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to