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 "Bangera, Roshan" <Ro...@commerceone.com> on 2001/05/31 17:09:19 UTC

How to pass XML String as a Parameter

Hi all,

I am using ApacheSOAP2.2 and using the Apache SOAP client as well. 

I need to pass an XML String as a parameter to my call. Do I have to wrap it
using CDATA or encode it or do I just send it as any other string?

If I do need to wrap it or encode it, does my java class which implements my
web service need to unwrap or decode the parameter before using it or does
the SOAP server handle that for me?

Thanks in advance,

Roshan Bangera
roshan.bangera@commerceone.com

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: How to pass XML String as a Parameter

Posted by Hartmut Bernecker <h....@dhw.de>.
Hi,

if I use the ordinary String class, will there be a problem if I want to
transport Unicode Data?
Scenario: The SOAP Protocol must be UTF-8 and the XML-Data transported
by SOAP must be also UTF-8 (Unicode).
Rajagopala, have you done so and would share your experience?

TIA
hab

********************************************
"Rajagopala R. Sesetti" schrieb:
> 
> Just use ordinary String class, if you already got the XML as a String. I am
> using this snippet in my program. No specific encoding is necessary if you have
> a String.
> 
>     Vector params = new Vector();
>     params.addElement(new Parameter("cregisterMsg", String.class, strValReq,
> null));
> 
> Things change when you want to pass "Document". You will need XML Encoding then.
> 
> Cheers,
> -RAJ
> 
> --

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: How to pass XML String as a Parameter

Posted by Hartmut Bernecker <h....@dhw.de>.
Hi,

if I use the ordinary String class, will there be a problem if I want to
transport Unicode Data?
Scenario: The SOAP Protocol must be UTF-8 and the XML-Data transported
by SOAP must be also UTF-8 (Unicode).
Rajagopala, have you done so and would share your experience?

TIA
hab

********************************************
"Rajagopala R. Sesetti" schrieb:
> 
> Just use ordinary String class, if you already got the XML as a String. I am
> using this snippet in my program. No specific encoding is necessary if you have
> a String.
> 
>     Vector params = new Vector();
>     params.addElement(new Parameter("cregisterMsg", String.class, strValReq,
> null));
> 
> Things change when you want to pass "Document". You will need XML Encoding then.
> 
> Cheers,
> -RAJ
> 
> --

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: How to pass XML String as a Parameter

Posted by "Rajagopala R. Sesetti" <rs...@atdsprint.com>.
Just use ordinary String class, if you already got the XML as a String. I am
using this snippet in my program. No specific encoding is necessary if you have
a String.

    Vector params = new Vector();
    params.addElement(new Parameter("cregisterMsg", String.class, strValReq,
null));

Things change when you want to pass "Document". You will need XML Encoding then.



Cheers,
-RAJ

--
****** 100%, ALWAYS ******

Re: How to pass XML String as a Parameter

Posted by "Rajagopala R. Sesetti" <rs...@atdsprint.com>.
Just use ordinary String class, if you already got the XML as a String. I am
using this snippet in my program. No specific encoding is necessary if you have
a String.

    Vector params = new Vector();
    params.addElement(new Parameter("cregisterMsg", String.class, strValReq,
null));

Things change when you want to pass "Document". You will need XML Encoding then.



Cheers,
-RAJ

--
****** 100%, ALWAYS ******