On Wed, 2006-03-01 at 18:03 +0530, Chaitanya Ravi wrote:
> Simple:
> 
> I want to send ü (Utf-8) characters to server side.
> 
> my query string is something like this:
> 
> <%3Fxml%20version%3D"1.0"%20encoding%3D"UTF-8"%20standalone%3D"no"%3F>
> <soap%3AEnvelope%20xmlns%3Asoap%3D"http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fencoding%2F"">
> <soap%3ABody>
> <isponsorrequest%20credentials%3D"Axi5dm1fnQMi%3D"%20version%3D"2.0">
> 
> ....
>  <select>
> <where>
> <name=üg%3Astaff"%2F>
> <%2Fwhere>
> <%2Fselect>
> 
> ....
> <%2Fisponsorrequest>
> <%2Fsoap%3ABody>
> <%2Fsoap%3AEnvelope>
> 
> Everything is working well except when in send such utf-8 characters.
> At the server i see ü as ?
> 
> I hope am clear
> 
> 

OK, one more time: sending XML messages as a query string makes _no_
sense, because request URI is not simply intended for passing large
entities _especially_ if they use non-ASCII characters. Per URI spec
only ASCII characters are permissible.

When using HTT POST make sure you apply the _same_ charset encoding
(UTF-8 in this case) on both ends of the HTTP transport. You can see
what gets sent across the wire by activating the wire logging on the
client side

Hope this helps

Oleg

> 
> 
> 
> 
> On 3/1/06, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
> >
> > On Wed, 2006-03-01 at 17:42 +0530, Chaitanya Ravi wrote:
> > > Even the post doesn't work. Its the same way.
> > >
> >
> > What specifically does not work?
> >
> >
> > > The only way to help sending unicode characters is to send it as
> > > bytearray.Am not finding any method to do it :(
> > >
> > > Can the developers add something like methodBase.setQueryStrin(byte[]) ?
> > >
> >
> > What for? Just URL encode query strings that contain non ASCII
> > characters if you insist on sending the request body in the query
> > string.
> >
> >
> > > Meanwhile can someone suggest workaround ?
> > >
> >
> > What you are trying to do makes no sense. Just use POST.
> >
> > Oleg
> >
> > >
> > >
> > > On 3/1/06, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
> > > >
> > > > On Wed, 2006-03-01 at 15:11 +0530, Chaitanya Ravi wrote:
> > > > > Hi
> > > > >
> > > > > I wan tot send the query as the byte array since my query string
> > > > includes
> > > > > unicode characters. How can i do this ?
> > > > >
> > > > > GetMethod method = new GetMethod("/Sponsor");
> > > > > method.setQueryString(" I send xml string here");
> > > > >
> > > > > But if i have unicode characters in the xmlstring, they don't get
> > sent
> > > > > properly. So, i want to convert the xml string into byte array and
> > send
> > > > it
> > > > > to my server.
> > > > >
> > > > > Please help
> > > >
> > > > Why not just use POST?
> > > >
> > > > Oleg
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to