axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkat Gyambavantha (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-785) Incorrect namespace handling
Date Tue, 30 May 2006 22:58:30 GMT
Incorrect namespace handling
----------------------------

         Key: AXIS2-785
         URL: http://issues.apache.org/jira/browse/AXIS2-785
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

    Versions: 1.0    
 Environment: Windows XP
    Reporter: Venkat Gyambavantha


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 "unqualified".

Inside my wsdl, I imported 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 unqualified, 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.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message