axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkat Gyambavantha" <vgyam...@tibco.com>
Subject RE: Namespace Issue
Date Mon, 29 May 2006 20:03:34 GMT
elementFormdefault attribute is set to false should actually be

elementFormDefault attribute is set to unqualified

 

________________________________

From: Venkat Gyambavantha 
Sent: Monday, May 29, 2006 1:01 PM
To: 'axis-user@ws.apache.org'
Subject: Namespace Issue

 

Hi,

 

Looks like there is some problem in the way namespaces are handled. Here
is the summary of the issue.

 

I created an xsd file that contains two complex types A and B. In the
complex type B, I create an element of type A. elementFormdefault
attribute is set to false.

Inside my wsdl, I import this xsd file

 

Where ns1=http://sample.com/test

 

<xsd:complexType name="A">

                        <xsd:sequence>

                                    <xsd:element name="name"
type="xsd:string"></xsd:element>

                                    <xsd:element name="description"
type="xsd:string"></xsd:element>

                        </xsd:sequence>

            </xsd:complexType>

 

            <xsd:complexType name="B">

                        <xsd:sequence>

                                    <xsd:element name="resource"

                                                type="ns1:A"
minOccurs="1" maxOccurs="1">

                                    </xsd:element>

                                    <xsd:element name="details"
type="xsd:string" minOccurs="1" maxOccurs="unbounded" />

                        </xsd:sequence>

            </xsd:complexType> 

 

When I try to create an element BElement of type B, I was expecting
output to be 

 

Response: 1 [correct]

< BElement xmlns="http://sample.com/test">

    <resource xmlns="">   

        <name>Test</name>

         < description>desc</description>

     </ resource >

   <details xmlns="">some details</details>

</ BElement>

 

Instead the ouput looks like 

 

Response: 2 [wrong]

 

< BElement xmlns="http://sample.com/test">

    <resource>   

        <name>Test</name>

         < description>desc</description>

     </ resource >

   <details>some details</details>

</ BElement>

 

Since elementFormDefault attribute is set to false, all locally defined
elements [resource, details] should belong to empty namespace. If
debugged through the code while constructing the response everything
looks fine, but the actual response I get (confirmed with the
SOAPMonitor utilty] looks like Response: 2 above.

 

Let me know if I am missing something.

 

Thanks

Venkat

 


Mime
View raw message