Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 29393 invoked from network); 28 Apr 2005 14:14:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Apr 2005 14:14:25 -0000 Received: (qmail 84894 invoked by uid 500); 28 Apr 2005 14:15:04 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 84660 invoked by uid 500); 28 Apr 2005 14:15:01 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 84470 invoked by uid 99); 28 Apr 2005 14:14:58 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 28 Apr 2005 07:14:58 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id DC8383DA for ; Thu, 28 Apr 2005 16:04:43 +0200 (CEST) Message-ID: <1652480907.1114697083901.JavaMail.jira@ajax.apache.org> Date: Thu, 28 Apr 2005 16:04:43 +0200 (CEST) From: "Mark Whitlock (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Closed: (AXISCPP-615) Wrong serialization for type XSD_BASE64BINARY In-Reply-To: <1185925120.1113580696592.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXISCPP-615?page=all ] 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: http://issues.apache.org/jira/browse/AXISCPP-615 > 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 WS. > 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 undefined. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira