Thanks Nandika that fixed the issue but axiom_node_serialize_sub_tree causes a memory leaks.
Part of the memory leak is caused by the fix for issue 810 and part I believe is caused by the other namespace hash table not being free https://issues.apache.org/jira/browse/AXIS2C-810?page=com.atlassian.jira .plugin.system.issuetabpanels:all-tabpanel Solution doesn't look as simple as freeing the hash tables since that causes traps. I am attaching the test program I am using to test this, just in case if anyone else wants to take a look. Thanks Hatim -----Original Message----- From: Nandika Jayawardana [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 11:33 PM To: Apache AXIS C Developers List Subject: Re: axiom_node_serialize does not serialize namespaces properly Hi, For efficiency reasons, axiom_node_serialize does not serialize all the namespaces applicable to an element when the node is a sub element of the axiom tree. Therefore you need to use axiom_node_serialize_sub_tree method to properly serialize the sub tree properly. Regards Nandika On Thu, Jul 31, 2008 at 10:56 PM, Hatim Daginawala <[EMAIL PROTECTED]> wrote: > Hi All, > > > > Here is the sample XML I am working with: > > <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> > > <s:Header> > > <h:guid s:mustUnderstand="1" > xmlns:h="http://localhost/namespce/header/">00000000-0000-0000-0000-0000 00000001</h:guid> > > </s:Header> > > <s:Body> > > <EchoParm xmlns="http://localhost/namespce/body/"> > > <str>Response: Hello EchoEx</str> > > </EchoParm> > > </s:Body> > > </s:Envelope> > > > > When I retrieve guid node and serialize it with libxml2 the XML I get is: > > <h:guid s:mustUnderstand="1" > xmlns:h="http://localhost/namespce/header/">00000000-0000-0000-0000-0000 00000001</h:guid> > > > > When I retrieve guid node and serialize it with guththila the XML I get is: > > <h:guid xmlns:h="http://localhost/namespce/header/" > xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" > s:mustUnderstand="1">00000000-0000-0000-0000-000000000001</h:guid> > > > > I have a test program to show this behavior, if anyone would like to try it > out. > > > > Is this a known bug or should I raise a JIRA for this? > > > > I am stuck with using libxml2 since guththila seems to show some major > memory leaks in my application. Any insight to fix libxml wrapper so that it > outputs valid XML will be greatly appreciated. > > > > Thank you! > > ________________________________ > --------------------------------------------------- > Confidentiality Notice: This electronic mail transmission is confidential, > may be privileged and should be read or retained only by the intended > recipient. If you have received this transmission in error, please > immediately notify the sender and delete it from your system. -- http://nandikajayawardana.blogspot.com/ WSO2 Inc: http://www.wso2.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------- Confidentiality Notice: This electronic mail transmission is confidential, may be privileged and should be read or retained only by the intended recipient. If you have received this transmission in error, please immediately notify the sender and delete it from your system.
libxml_issue2.c
Description: libxml_issue2.c
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]