You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Tammy Martin <ta...@gmail.com> on 2008/09/09 20:35:58 UTC

AXIOMUtil.stringToOM

Hello,

Can you please tell me if there is an Axis2c implementation for the method
AXIOMUtil.stringToOM? If not, how do I convert a string containing xml to a
axiom_node_t for the axis2_svc_client_send_receive call?

Thanks,
Tammy

Re: AXIOMUtil.stringToOM

Posted by Tammy Martin <ta...@gmail.com>.
Thanks...that helps alot. :-)

On Tue, Sep 9, 2008 at 1:05 PM, Hatim Daginawala <
Hatim.Daginawala@argodata.com> wrote:

>  This is what I useā€¦
>
>
>
> static axiom_node_t *build_om_from_stream( const axutil_env_t * env,
> axis2_char_t *szData )
>
> {
>
>             axiom_xml_reader_t *r = NULL;
>
>             axiom_stax_builder_t *sb = NULL;
>
>             axiom_document_t *doc = NULL;
>
>             axiom_node_t *rtn_node = NULL;
>
>
>
>             do
>
>             {
>
>                         if( !szData )
>
>                                     break;
>
>
>
>                         r = axiom_xml_reader_create_for_memory(env, szData,
> strlen (szData), NULL, AXIS2_XML_PARSER_TYPE_BUFFER);
>
>                         if( !r )
>
>                                     break;
>
>
>
>                         sb = axiom_stax_builder_create(env, r);
>
>                         if( !sb )
>
>                                     break;
>
>
>
>                         doc = axiom_stax_builder_get_document(sb, env);
>
>                         if( doc )
>
>                                     rtn_node =
> axiom_document_build_all(doc, env);
>
>
>
>             }while( 0 );
>
>
>
>             axiom_stax_builder_free_self( sb, env);
>
>             return rtn_node;
>
> }
>
>
>  ------------------------------
>
> *From:* Tammy Martin [mailto:tammymartincali@gmail.com]
> *Sent:* Tuesday, September 09, 2008 1:36 PM
> *To:* Apache AXIS C User List
> *Subject:* AXIOMUtil.stringToOM
>
>
>
> Hello,
>
>
>
> Can you please tell me if there is an Axis2c implementation for the method
> AXIOMUtil.stringToOM? If not, how do I convert a string containing xml to a
> axiom_node_t for the axis2_svc_client_send_receive call?
>
>
>
> Thanks,
>
> Tammy
>
> ------------------------------
> ---------------------------------------------------
> 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.
>
>

RE: AXIOMUtil.stringToOM

Posted by Hatim Daginawala <Ha...@argodata.com>.
This is what I use...

 

static axiom_node_t *build_om_from_stream( const axutil_env_t * env,
axis2_char_t *szData )

{

            axiom_xml_reader_t *r = NULL;

            axiom_stax_builder_t *sb = NULL;

            axiom_document_t *doc = NULL;

            axiom_node_t *rtn_node = NULL;

 

            do

            {

                        if( !szData )

                                    break;

 

                        r = axiom_xml_reader_create_for_memory(env,
szData, strlen (szData), NULL, AXIS2_XML_PARSER_TYPE_BUFFER);

                        if( !r )

                                    break;

 

                        sb = axiom_stax_builder_create(env, r);

                        if( !sb )

                                    break;

 

                        doc = axiom_stax_builder_get_document(sb, env);

                        if( doc )

                                    rtn_node =
axiom_document_build_all(doc, env);

 

            }while( 0 );

 

            axiom_stax_builder_free_self( sb, env);

            return rtn_node;

}

 

________________________________

From: Tammy Martin [mailto:tammymartincali@gmail.com] 
Sent: Tuesday, September 09, 2008 1:36 PM
To: Apache AXIS C User List
Subject: AXIOMUtil.stringToOM

 

Hello,

 

Can you please tell me if there is an Axis2c implementation for the
method AXIOMUtil.stringToOM? If not, how do I convert a string
containing xml to a axiom_node_t for the axis2_svc_client_send_receive
call?

 

Thanks,

Tammy



---------------------------------------------------
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.