axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Whitlock (JIRA)" <>
Subject [jira] Closed: (AXISCPP-615) Wrong serialization for type XSD_BASE64BINARY
Date Thu, 28 Apr 2005 14:04:43 GMT
     [ ]
Mark Whitlock closed AXISCPP-615:

    Resolution: Fixed

I have fixed this JIRA as suggested. I have added the fix into base64Binary and hexBinary
as well.

> Wrong serialization for type XSD_BASE64BINARY
> ---------------------------------------------
>          Key: AXISCPP-615
>          URL:
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization
>     Versions: 1.5 Final
>  Environment: Win32 (maybe Linux too)
>     Reporter: Giorgio Saviane
>     Assignee: Mark Whitlock
>     Priority: Blocker

> The XSD_BASE64BINARY is wrongly copied when you add a parameter on a client call to a
> A XSD_BASE64BINARY is treated as a string instead as a memory block in SoapSerializer::addOutputParam
method. In line 970 I've found the statement:
>             strcpy((char*)(pParam->m_Value.b64bValue->__ptr), (char*)(*((xsd__base64Binary
*) (pValue))).__ptr);
> and should be:
>             memcpy((char*)(pParam->m_Value.b64bValue->__ptr), (char*)(*((xsd__base64Binary
*) (pValue))).__ptr, pParam->m_Value.b64bValue->__size);
> otherwise the copy will stopped at the first null value. Applying that patch the call
works fine.
> Steps to reproduce the bug
> ==========================
> Expose on the server a WS with a method that accepts a binary memory block as parameter
(a Java byte[]). Create the wsdl and a C++ client prototype with the tool:
> %JAVA_HOME%\bin\java -classpath %AXIS_C_HOME%\lib\axis\wsdl2ws.jar;%AXISCLASSPATH% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws
%1 -o./ClientOut -lc++ -sclient class.wsdl
> Complete the client call pasting some chunks of binary data on the parameter, whit a
0 value on the middle (e.g.: "abcd\0x00defg"). Compile the C++ client and run it, the server
will receive correcltly the left side of the string preceding the 0, the other side will be

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message