You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Michael Paolini/Austin/IBM <pa...@us.ibm.com> on 2000/09/28 22:48:10 UTC

How to send a XML string using SOAP

After reviewing the Apache SOAP documentation and code, I am unable to find
a way to perform what I hoped would be a simple and standard task.

What I'd like to do is provide a string representation of XML as the
payload of a SOAP message.  Is this possible, must I build a DOM out of
this XML in order to get the soap wrapper and transport?  Put another way,
I've got a pre-canned valid XML string I'd like to send using SOAP without
paying the expense of first converting it to a DOM object to feed to SOAP
which would then ultimately convert it back to a string.  Is is this
possible and reasonable?

I guess I was expecting there to be a method on Body to set the payload as
a string, sidestepping the expense of the unmarshall(Node) and expense of
the extra steps taken in the marshall call.  I'm also thinking about that
32ms overhead referenced in "Apache-SOAP performance."

Thanks in advance,
~Mike


----------------------------------------------------------------------------------------------------------------------------------

"A doctor can bury his mistakes, an architect can only advise his client to
plant vines...." -Frank Lloyd Wright

Internet ID: paolini@us.ibm.com
IBM Internal e-mail ID: PAOLINI/Austin/IBM


Re: How to send a XML string using SOAP

Posted by Cory Isaacson <ci...@capita2.com>.
I tried this, and the only way I can see is to build the XML string in a
CDATA bracket, and then add it as a normal String type. But I did use the
Literal XML encoding very successfully, and found the parse/serialize
overhead to be minimal (<10ms which was OK for what I need), so that is the
best way if it can work for you.

Thanks,

Cory
----- Original Message -----
From: "Michael Paolini/Austin/IBM" <pa...@us.ibm.com>
To: <so...@xml.apache.org>
Sent: Thursday, September 28, 2000 4:48 PM
Subject: How to send a XML string using SOAP


> After reviewing the Apache SOAP documentation and code, I am unable to
find
> a way to perform what I hoped would be a simple and standard task.
>
> What I'd like to do is provide a string representation of XML as the
> payload of a SOAP message.  Is this possible, must I build a DOM out of
> this XML in order to get the soap wrapper and transport?  Put another way,
> I've got a pre-canned valid XML string I'd like to send using SOAP without
> paying the expense of first converting it to a DOM object to feed to SOAP
> which would then ultimately convert it back to a string.  Is is this
> possible and reasonable?
>
> I guess I was expecting there to be a method on Body to set the payload as
> a string, sidestepping the expense of the unmarshall(Node) and expense of
> the extra steps taken in the marshall call.  I'm also thinking about that
> 32ms overhead referenced in "Apache-SOAP performance."
>
> Thanks in advance,
> ~Mike
>
>
> --------------------------------------------------------------------------
--------------------------------------------------------
>
> "A doctor can bury his mistakes, an architect can only advise his client
to
> plant vines...." -Frank Lloyd Wright
>
> Internet ID: paolini@us.ibm.com
> IBM Internal e-mail ID: PAOLINI/Austin/IBM
>


Re: How to send a XML string using SOAP

Posted by Cory Isaacson <ci...@capita2.com>.
I tried this, and the only way I can see is to build the XML string in a
CDATA bracket, and then add it as a normal String type. But I did use the
Literal XML encoding very successfully, and found the parse/serialize
overhead to be minimal (<10ms which was OK for what I need), so that is the
best way if it can work for you.

Thanks,

Cory
----- Original Message -----
From: "Michael Paolini/Austin/IBM" <pa...@us.ibm.com>
To: <so...@xml.apache.org>
Sent: Thursday, September 28, 2000 4:48 PM
Subject: How to send a XML string using SOAP


> After reviewing the Apache SOAP documentation and code, I am unable to
find
> a way to perform what I hoped would be a simple and standard task.
>
> What I'd like to do is provide a string representation of XML as the
> payload of a SOAP message.  Is this possible, must I build a DOM out of
> this XML in order to get the soap wrapper and transport?  Put another way,
> I've got a pre-canned valid XML string I'd like to send using SOAP without
> paying the expense of first converting it to a DOM object to feed to SOAP
> which would then ultimately convert it back to a string.  Is is this
> possible and reasonable?
>
> I guess I was expecting there to be a method on Body to set the payload as
> a string, sidestepping the expense of the unmarshall(Node) and expense of
> the extra steps taken in the marshall call.  I'm also thinking about that
> 32ms overhead referenced in "Apache-SOAP performance."
>
> Thanks in advance,
> ~Mike
>
>
> --------------------------------------------------------------------------
--------------------------------------------------------
>
> "A doctor can bury his mistakes, an architect can only advise his client
to
> plant vines...." -Frank Lloyd Wright
>
> Internet ID: paolini@us.ibm.com
> IBM Internal e-mail ID: PAOLINI/Austin/IBM
>