axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kasmeroglu <Daniel.Kasmero...@Kasisoft.net>
Subject A matter of understanding
Date Wed, 07 Mar 2007 01:07:29 GMT
Hi there,
I've got an issue and I've got a workaround for this. I simply want to understand what's wrong.
My project provides a simple service which allows to return an attribute within a XML file.
This
is the way the API is looking:

   String getAttribute( String xmldoc );

It is also specified that the input and the output of this function MUST be UTF-8 encoded.
My
problem occures when it comes to using this service with PHP. When I'm using the Axis2 Client
I can pull in my XML document in UTF-8 and retrieve the attribute value as UTF-8 encoded (as
expecteD).
But when I'm using PHP (5.2) the service gets a decoded String (in effect non UTF-8) so the
XML
parser claims an invalid UTF-8 byte sequence since the encoding for the parsing process is
still
specified in the document.
I can workaround this when I'm using PHP by simply encoding the document a second time and
decoding
the result.

    What I don't understand is: WHY ?

Why is it necessary to encode the message (which already comes in UTF-8) a second time before
I'm 
invoking the SOAP request using PHP.
I would appreciate if anyone could give me an answer on this issue ?
The people I'm discussing about this issue do claim that PHP behaves perfectly correct and
since I'm
no SOAP expert I'm not sure whether they're right or not. But at least I want to understand
this
behaviour.
A corresponding project (with additional infos) can be downloaded at:

     http://www.kasisoft.net/getattr.zip (something about 50k).

Thanks for the help.

Ciao
Kasimir


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message