Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 21552 invoked from network); 16 Nov 2004 13:20:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Nov 2004 13:20:45 -0000 Received: (qmail 33607 invoked by uid 500); 16 Nov 2004 13:20:44 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 33589 invoked by uid 500); 16 Nov 2004 13:20:44 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 33566 invoked by uid 99); 16 Nov 2004 13:20:44 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [64.63.192.251] (HELO smtp5.ispsnet.net) (64.63.192.251) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 16 Nov 2004 05:20:39 -0800 Received: from scooby (unverified [4.249.147.219]) by smtp5.ispsnet.net (Joe1) with ESMTP id 19545382 for ; Tue, 16 Nov 2004 08:20:35 -0500 Message-ID: <02a001c4cbdf$37a48190$0100a8c0@scooby> Reply-To: "Robert J. Blanchard" From: "Robert J. Blanchard" To: "Apache AXIS C User List" References: <20041116011618.68563.qmail@web40629.mail.yahoo.com> Subject: Re: Returning Structures Containing Arrays Date: Tue, 16 Nov 2004 08:21:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Samisa... Actually, I was doing a little sleuthing and found there is a problem in the SoapDeSerializer.cpp file in the getBasicArray method. When I looked this morning over at the axis-c-dev mailing list, it seems someone else has reached the same conclusion: QUOTE: [AXIS C++ 1.3] Bug in SoapDeSerializer::getBasicArray when there is more than one array Using axis-c 1.3, I could not get these two vectors, I could get only one of them. After some investigation, I found that SoapDeSerializer::getBasicArray() always get the first next node and after some debug, I discovered that the next node was which failed in all cases. In order to get the next node not null, I patch the method : --- axis-c-src-1-3-linux/src/soap/SoapDeSerializer.cpp 2004-10-22 14:50:49.000000000 +0200 +++ axis-c-src-1-3-linux.modif/src/soap/SoapDeSerializer.cpp 2004-11-15 13:59:12.000000000 +0100 @@ -726,10 +726,11 @@ free(Array.m_Array);\ Array.m_Array = 0;\ Array.m_Size = 0;\ return Array;\ }\ +m_pNode = m_pParser->next(); /* skip end element node */\ return Array; #define DESERIALIZE_LITERAL_ARRAY_BLOCK(cpp_type, conv_func) \ Array.m_Array = malloc(sizeof(cpp_type)*INITIAL_ARRAY_SIZE);\ if (!Array.m_Array) return Array;\ @@ -848,10 +849,11 @@ free(Array.m_Array); Array.m_Array = 0; Array.m_Size = 0; return Array; } + m_pNode = m_pParser->next(); /* skip end element node */ return Array; case XSD_UNSIGNEDINT: DESERIALIZE_ENCODED_ARRAY_BLOCK(unsigned int, CONV_STRTOUL) case XSD_SHORT: DESERIALIZE_ENCODED_ARRAY_BLOCK(short, CONV_STRTOL) ENDQUOTE I implemented the same change on my end, and now the code works correctly. I would concur with Julien Lemoine that this is a necessary fix. Thanks, Rob ----- Original Message ----- From: "Samisa Abeysinghe" To: "Apache AXIS C User List" Sent: Monday, November 15, 2004 8:16 PM Subject: Re: Returning Structures Containing Arrays > Hi Rob, > Do you have a WSDL for your service? If so please send it over to recreate the situation along > with the client/server code. > Thanks, > Samisa... > > --- Rob Blanchard wrote: > > > Help! > > > > I'm trying to use Axis-C++ to create a client and server, where the > > return from the server is a structure that contains an array and two > > doubles. > > > > I have successfully been able to create a server that returns a > > structure containing two doubles, or a server that returns an array. > > But when I try to make a server that returns a more complicated > > structure (containing an array), my client segfaults on me - it appears > > to be some problem with the SoapDeSerializer function. It seems to > > parse out the array fine, but when it gets to the double, it returns an > > AXIS_FAIL. > > > > Anyone have any ideas what I might be doing wrong, or what additional > > information may be needed to solve this? > > > > Thanks, > > Rob Blanchard