You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Naresh Agarwal <na...@yahoo.com> on 2002/01/03 12:07:53 UTC

XML AS A STRING PARAMETER

Hi

I am developing a Soap Service, in which i need to send a XML as return
parameter of a function.

Currently i'm SENDING THE XML AS A STRING. Now at the client end, client
should be able to use this XML *AS IS*.

But i came to know that some of the Soap Implementation (like Soap Lite)
cann't understand the XML, if it is send as a string (probably bcoz of some
encoding problems).

1)Does Aapche/AXIS (for Soap Client) understands the XML as a string
properly or are there any problems?

2)Also which other SOAP implementations (for Soap Client) have problem in
understanding such a XML

3)Also are there any workarounds for this?


Thanks,
Regards,
Naresh




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: XML AS A STRING PARAMETER

Posted by Marc Martinez <la...@technogeeks.org>.
On Thu, Jan 03, 2002 at 04:37:53PM +0530, Naresh Agarwal wrote:
> I am developing a Soap Service, in which i need to send a XML as return
> parameter of a function.
> 
> Currently i'm SENDING THE XML AS A STRING. Now at the client end, client
> should be able to use this XML *AS IS*.
> 
> But i came to know that some of the Soap Implementation (like Soap Lite)
> cann't understand the XML, if it is send as a string (probably bcoz of some
> encoding problems).

I think you need to use the 'literal xml' encoding style for this to
work cleanly.

> 2)Also which other SOAP implementations (for Soap Client) have problem in
> understanding such a XML

I think if you use the literal xml encoding things will work as
expected for you.  at least in my initial experiments I had no
problems moving xml data around.

> 3)Also are there any workarounds for this?

when I ran into issues moving high-ascii characters around with my xml
data, I started base64-encoding the output on the perl server side.
this gets you a byte[] result on the java client side, and keeps the
java string handlers from complaining about invalid data and throwing
exceptions.  packing things up into a byte array with an axis server
instead of a bare string, and the perl Soap Lite client automagically
handles the base64 decoding and the return parameter is the originally
encoded xml data.

HTH,
Marc