axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senaka Fernando" <sen...@wso2.com>
Subject Re: Sending UTF8 through Axis-C
Date Thu, 10 Jan 2008 05:38:15 GMT
Hi Arseny,

The issue is that when you use wcstombs, the converted string must be
char* compatible AFAIK. You can instead encode your text into base64 and
decode it at your end. This should work as we can encode anything from
images to text files.

Rampart/C folks use this encoding feature. Rampart/C is the extension to
Axis2/C that provides security (Rampart/C is an apache software foundation
project).

The next option is to send your data as an attachment using MTOM. There is
an mtom sample demonstrating how it works. Please note that this
attachment need not always be an image.

The native Axis2/C implementation does not have wchar_t support and you
are encouraged to use one of the methods above.

Devs, please correct me if I've made a mistake here.

Regards,
Senaka

> Hello!
> I am trying to send russian text from MS VC program (client) to Java
> (server) using axis-c and axis-j respectively.
> The problem is that I do not know how to correctly encode CString with
> cyrillic symbols into UTF8.
> When I do it the same way as I do it for english params
>
> char* lastNameAnsi = new char[100];
> wcstombs(lastNameAnsi, mLastName.GetString(), 100);
>
> I get:
> "invalid byte 2 of 2-byte utf-8 sequence axis" SAXException
>
> And as I see the stubs generated by wsdl2ws have char* (not wchar_t* or
> smth) for string parameters.
> What should I do to send unicode using axis-c?
> Thank you in advance!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>


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


Mime
View raw message