axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Gamage" <dimut...@gmail.com>
Subject Re: [AXIS2C] Adding literal text to an AXIOM element
Date Tue, 18 Dec 2007 02:35:41 GMT
Hi Clifford,
You can't have an xml added in to a soap body Or another axiom element
using axiom_element_set_text. There it always assume the adding text
is a literal one. (THe reason why it convert your xml to a literal
one).

So first you have to covert your xml text to an axiom node which can
be added to another element/node using axiom_node_add_child. That is
called deserialization of xml.That is basically covert axis2_char_t to
axiom_node.

You can use the following guide[1]. Or I found a good reference on how
to do deserialization in real code[2]. (Find for the
wsf_util_deserialize_buffer function in the file)


[1] http://ws.apache.org/axis2/c/docs/om_tutorial.html#Reader_and_Writer
[2] http://wso2.org/repos/wso2/trunk/wsf/php/src/wsf_util.c

Thanks
Dimuthu


On Dec 18, 2007 6:26 AM, Clifford THOMPSON < cthompso@mdacorporation.com> wrote:
> Hello,
>
> I have question regarding how to add literal text to an AXIOM element.
> Basically, I have some XML like the following:
>
>    <myNs:element xmlns:myNs="http://mynamespace">my text</myNs:element>
>
> Which I would like to add to an existing AXIOM element as text (the SOAP
> body of my web service message to be exact). The problem is that when I
> do this using "axiom_element_set_text", the double quotes from the
> namespace get converted to "$quot;", which is not acceptable for my
> application. The blob of XML comes from an external source, so I would
> prefer not to have to build up the AXIOM elements myself. Does anyone
> know how this might be possible?
>
> Cheers,
> Clifford
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message