You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Fred Preston (JIRA)" <ax...@ws.apache.org> on 2005/03/04 15:03:51 UTC

[jira] Closed: (AXISCPP-341) createNamespaceDecl() and addNamespaceDecl() allows duplicate namespace declaration within a Tag.

     [ http://issues.apache.org/jira/browse/AXISCPP-341?page=history ]
     
Fred Preston closed AXISCPP-341:
--------------------------------


> createNamespaceDecl() and addNamespaceDecl() allows duplicate namespace declaration within a Tag.
> -------------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-341
>          URL: http://issues.apache.org/jira/browse/AXISCPP-341
>      Project: Axis-C++
>         Type: Bug
>   Components: SOAP
>     Reporter: James Jose
>     Assignee: Fred Preston

>
> 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://issues.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