axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Jose (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Created: (AXISCPP-341) createNamespaceDecl() and addNamespaceDecl() allows duplicate namespace declaration within a Tag.
Date Wed, 22 Dec 2004 12:27:04 GMT
createNamespaceDecl() and addNamespaceDecl() allows duplicate namespace declaration within
a Tag.
-------------------------------------------------------------------------------------------------

         Key: AXISCPP-341
         URL: http://nagoya.apache.org/jira/browse/AXISCPP-341
     Project: Axis-C++
        Type: Bug
    Reporter: James Jose



createNamespaceDecl() and addNamespaceDecl() allows duplicate namespace declaration within
a Tag.


I created one SOAPHeader block and then tried to create two namespace declarations with the
same namespace prefix.

IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader","http://ws.apache.org/axisCppTest/");
const AxisChar *ns="ns1";
IAttribute *Iattr1=phb->createNamespaceDecl(ns,"http://ws.apache.org/axisCppTest/");
IAttribute *Iattr2=phb->createNamespaceDecl(ns,"http://ws.apache.org/axisCppTest/");

This code will generate the following SOAP Header.
<SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://ws.apache.org/axisCppTest/" xmlns:ns1="http://ws.apache.org/axisCppTest/"
xmlns:ns1="http://ws.apache.org/axisCppTest/"></ns2:TestHeader></SOAP-ENV:Header>

Here the namespace prefix 'ns1' is duplicated.
ie createNamespaceDecl() does not check for duplicate declaration. addNamespaceDecl() will
also
do this duplication.

Also the formed SOAP message is non compliant to the WS-I basic profile.
The conformance report shows the following failure message.

The soap:Envelope or soap:Body does not conform to XML 1.0.
Attribute "xmlns:ns1" was already specified for element "ns2:TestHeader".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message