axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Jose <jamej...@in.ibm.com>
Subject Re: Regarding createAttribute() in IHeaderBlock
Date Mon, 17 Jan 2005 10:42:53 GMT
Roshan,

      URI of an attribute really confusing me -
     ---------------------------------------------------------
     phb->createNamespaceDecl("np","http://axis.com");
    *attr=phb->createAttribute("Name","np","http://apache.com","AXIS");
      In this prefix of Name become 'np'. But uri of Name will be 
"http://apache.com".
     URI of an attribute means uri associated with its namespace prefix. 
Is this right?


Thanks & Regards
James
--------------------------------------------------
James Jose
Messaging Clients Team, WMQDDC
IBM Software Labs, India
Direct: 91-80- 25094331  Ext :2331
E-mail: jamejose@in.ibm.com





Roshan Weerasuriya <roshan@opensource.lk> 
17/01/2005 14:46
Please respond to
"Apache AXIS C Developers List"


To
Apache AXIS C Developers List <axis-c-dev@ws.apache.org>
cc

Subject
Re: Regarding createAttribute() in IHeaderBlock






hi James,

>   But In this API call if I give all the four parameters then it does
not create a namespace declaration.
>            IHeaderBlock
> *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.apache.com");
>         IAttribute
> *attr=phb->createAttribute("Name","np","http://apache.com","AXIS");
>    The resultant SOAP Header is
>         <SOAP-ENV:Header>
>              <ns2:TestHeader xmlns:ns2="http://axis.apache.com"
> np:Name="AXIS">
>              </ns2:TestHeader>
>         </SOAP-ENV:Header>
> 
>    Is this a bug?
Actualy if the user is specifing his/her own prefix, the current way of
doing things is that the user also has to add the namespace declaration
to match his/her prefix (using the createNamespaceDecl() method). Since
the namespace declaration is not given, you get this out put. Is this
approach OK?

>   if I pass prefix as empty string and all other parameters like the
>following.
>              HeaderBlock
> *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.apache.com");
>              IAttribute
> *attr=phb->createAttribute("Name","","http://apache.com","AXIS"); 
>    This will create a namespace declaration.
>   <SOAP-ENV:Header>
>       <ns2:TestHeader xmlns:ns2="http://axis.apache.com"
> xmlns:ns3="http://apache.com" ns3:Name="AXIS">
>       </ns2:TestHeader>
>    </SOAP-ENV:Header>

Here the namespace "http://apache.com" is declared twice. Is this OK or 
should we check this and declare only one?

Roshan

On Fri, 2005-01-14 at 19:15, James Jose wrote:
> Hi Roshan,
> 
>    A small doubt in createAttribute (const AxisChar *localname, const
> AxisChar *prefix, const AxisChar *uri, const AxisChar *value) API in
> IHeaderBlock
> 
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> 
>    if I pass prefix as empty string and all other parameters like the
> following.
>              HeaderBlock
> *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.apache.com");
>              IAttribute
> *attr=phb->createAttribute("Name","","http://apache.com","AXIS"); 
>    This will create a namespace declaration.
>   <SOAP-ENV:Header>
>       <ns2:TestHeader xmlns:ns2="http://axis.apache.com"
> xmlns:ns3="http://apache.com" ns3:Name="AXIS">
>       </ns2:TestHeader>
>    </SOAP-ENV:Header>
> 
>    But In this API call if I give all the four parameters then it does
> not create a namespace declaration.
>            IHeaderBlock
> *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.apache.com");
>         IAttribute
> *attr=phb->createAttribute("Name","np","http://apache.com","AXIS");
>    The resultant SOAP Header is
>         <SOAP-ENV:Header>
>              <ns2:TestHeader xmlns:ns2="http://axis.apache.com"
> np:Name="AXIS">
>              </ns2:TestHeader>
>         </SOAP-ENV:Header>
> 
>    Is this a bug?
> 
> 
> 
> 
> 
> Regards
> James
> --------------------------------------------------
> James Jose
> Messaging Clients Team, WMQDDC
> IBM Software Labs, India
> Direct: 91-80- 25094331  Ext :2331
> E-mail: jamejose@in.ibm.com
> 



Mime
View raw message