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: setUri() API - Usage
Date Mon, 10 Jan 2005 12:09:50 GMT
Hi Roshan,

There is no API which  creates the namespace declaration without adding to 
the HeaderBlock. If createNamespaceDecl() creates and add the namespace to 
the HeaderBlock , what is the advantage of having an API 
addNamespaceDecl() ? I am just trying to understand the necessity of 
addNamespaceDecl() API and how it can be used.

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> 
10/01/2005 16:20
Please respond to
"Apache AXIS C Developers List"


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

Subject
Re: setUri() API - Usage






hi James,

>    Also I have some doubt about functionality of addNamespaceDecl() - 

if you use the ".. *attr=phb->createNamespaceDecl()" method it will
create and also add the namespace declaration to the HeaderBlock. So you
don't need to explictly call the "phb->addNamespaceDecl(attr)" and if
you do so it will duplicate the namespcae declartion. (We use a list
internaly so it just add the second one also). That causes this problem
of server receiving a invalied content.

It is mentioned in the createNamespaceDecl() API comments that it
creates and adds.

Roshan

On Mon, 2005-01-10 at 10:03, Roshan Weerasuriya wrote:
> hi James,
> 
> >    Any idea about setUri() API in IAttribute class.
> There seems to be a problem here. I will correct it. Thanks for pointing
> it out.
> 
> Roshan
> 
> On Fri, 2005-01-07 at 12:48, James Jose wrote: 
> > Roshan,
> > 
> >     Any idea about setUri() API in IAttribute class.
> > 
> >    Also I have some doubt about functionality of addNamespaceDecl() - 
> > 
> >  I tried the following code.
> > IHeaderBlock
> > *phb=ws.createSOAPHeaderBlock("TestHeader","http://axis.com");
> >                 IAttribute
> > *attr=phb->createNamespaceDecl("np","http://apache.com");
> >                 phb->addNamespaceDecl(attr);
> > 
> > This generates the following SOAP header and results in an Exception.
> > <SOAP-ENV:Header><ns2:TestHeader xmlns:ns2="http://axis.com"
> > xmlns:np="http://apache.com"
> > xmlns:np="http://apache.com"></ns2:TestHeader></SOAP-ENV:Header>
> > <SOAP-ENV:Body>
> > 
> > API documentation for addNamespaceDecl() says it sets the namespace
> > declaration of the Header Block.
> > 
> > 
> > 
> > 
> > Thanks in advance..
> > 
> > James
> > --
> > James Jose
> > Messaging Clients Team, WMQDDC
> > IBM Software Labs, India
> > Direct: 91-80- 25094331  Ext :2331
> > E-mail: jamejose@in.ibm.com
> > 
> > 
> > 
> > 
> > James Jose/India/IBM@IBMIN
> > 
> > 04/01/2005 18:35
> >          Please respond to
> >   "Apache AXIS C Developers List"
> >                To
> > axis-c-dev@ws.apache.org
> >                cc
> > 
> >           Subject
> > setUri() API -
> > Usage
> > 
> > 
> > 
> > 
> > 
> > Hi
> > 
> >   I have used setUri() API in the IAttribute class. But it is not
> > changes the SOAP message anyway.
> >   ie its not updated the namespace URI associated with the attribute
> > prefix in SOAP Message.
> > 
> >   So I just want to know why this API is used.
> > 
> >   Thanks in advance
> >     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