axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Junaid.Bha...@mro.com
Subject Re: Possible bug: empty namespaces for attributes using doc-literal
Date Fri, 12 Mar 2004 22:10:58 GMT





It is still not a bug. Let em clarify this a bit further:

xmlns="" means that the element is in no namespace. Also
elementFormDefault="unqualified" only affects locally declared elements - -
It means local elements like <controlNum>, etc will be in no namespace
(hence the xmlns=""). It does not affect global elements like <capability>
which will always be in the targetNamespace that you define, irrespective
of the elementFormDefault attribute.

Thus the SOAP message generated by Axis is valid in either case.

Hope that helps.

- Junaid



                                                                           
             "Matthew                                                      
             Sgarlata"                                                     
             <sgarlatm@crystal                                          To 
             cognition.com>            <axis-user@ws.apache.org>           
                                                                        cc 
             03/12/2004 04:56                                              
             PM                                                    Subject 
                                       Re: Possible bug: empty namespaces  
                                       for attributes using doc-literal    
             Please respond to                                             
             axis-user@ws.apac                                             
                  he.org                                                   
                                                                           
                                                                           
                                                                           




Thank you for your help Junaid, but I still think that we have found a bug.
You're right, specifying elementFormDefault="qualified" gives me the output
I want.  However, I think the SOAP generated when
elementFormDefault="unqualified" (or is unspecified) is wrong.  I think
that
specifying xmlns="" is different than leaving out an XML namespace
altogether.  I think if elementFormDefault="unqualified" then the SOAP
should be as shown below

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <capability>
   <controlNum>104-41022207</controlNum>
   <!-- other attributes here -->
   <poc>
    <emailAddress>Sgarlata_Matt@testing.com</emailAddress>
    <!-- other attributes here -->
   </poc>
  </capability>
 </soapenv:Body>
</soapenv:Envelope>

Can an XML Schema expert weigh in here?  Thanks,

Matt




Mime
View raw message