Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 42124 invoked from network); 21 May 2008 06:31:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2008 06:31:32 -0000 Received: (qmail 13309 invoked by uid 500); 21 May 2008 06:31:33 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 13299 invoked by uid 500); 21 May 2008 06:31:33 -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 13288 invoked by uid 99); 21 May 2008 06:31:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 23:31:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2008 06:30:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1261A234C119 for ; Tue, 20 May 2008 23:30:57 -0700 (PDT) Message-ID: <982242872.1211351457073.JavaMail.jira@brutus> Date: Tue, 20 May 2008 23:30:57 -0700 (PDT) From: "nadir amra (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Closed: (AXISCPP-1048) WSDL2Ws code - deleted primitive return type pointers In-Reply-To: <1182259009.1208759001868.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXISCPP-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] nadir amra closed AXISCPP-1048. ------------------------------- Resolution: Fixed Fix Version/s: current (nightly) Actually the problem was in the generated TestServicePortTypeWrapper.cpp code. The original code generated invalid code as follows: xsd__int ret = pWs->add(v0,v1); return pIWSSZ->addOutputParam("return", (void*)&ret, XSD_INT); The corrected code looks like the following: xsd__int * ret = pWs->add(v0,v1); return pIWSSZ->addOutputParam("return", (void*)ret, XSD_INT); The reason pointers are used is because you have minOccurs="0" in element definitions. > WSDL2Ws code - deleted primitive return type pointers > ----------------------------------------------------- > > Key: AXISCPP-1048 > URL: https://issues.apache.org/jira/browse/AXISCPP-1048 > Project: Axis-C++ > Issue Type: Bug > Components: Server - General > Environment: Windows XP Prof. SP2 (german), Pentium 2,8 Ghz, 2 GB RAM > Reporter: Manuel Freiholz > Fix For: current (nightly) > > > Hi guys, > i wrote my problem to the mailing list some month ago. i never got an answer until i accidental found a reply on google :) > so here is the mail. > ------- > Hi guys, > its the first time that i am using the axis framework with c++ (usually > i do not develop with c/c++). > I wrote a simple calculation web service with java and deployed it to > the app-server. > The following wsdl has been generated: > > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:ns0="http://test.cadenas.de" > xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" > xmlns:ns1="http://org.apache.axis2/xsd" > xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > targetNamespace="http://test.cadenas.de"> > TestService > > attributeFormDefault="qualified" elementFormDefault="qualified" > targetNamespace="http://test.cadenas.de"> > > > > type="xs:int"/> > type="xs:int"/> > > > > > > > type="xs:int"/> > > > > > > > > > > > > > > > wsaw:Action="urn:addResponse"/> > > > type="ns0:TestServicePortType"> > style="document"/> > > > > > > > > > > > type="ns0:TestServicePortType"> > style="document"/> > > > > > > > > > > > type="ns0:TestServicePortType"> > > > > > > > > > > > > > binding="ns0:TestServiceSOAP11Binding"> > location="http://localhost:8080/cadenas/services/TestService"/> > > binding="ns0:TestServiceSOAP12Binding"> > location="http://localhost:8080/cadenas/services/TestService"/> > > binding="ns0:TestServiceHttpBinding"> > location="http://localhost:8080/cadenas/services/TestService"/> > > > > You can see that it is a very simple service, which provides a "int > add(int,int)" method. > I used the wsdl2ws tool to get this declaration for the "add" method: > STORAGE_CLASS_INFO xsd__int * add(xsd__int * Value0, xsd__int * Value1); > Generally i do not have a problem with pointers (tho i don't like > primitive type pointers), > but when i get an xsd__int* back from method which is always empty > (NULL) im worried :P > I found the reason in the generated class "TestServicePortType" in > method "add": > (read comments please) > ... > xsd__int * pReturn = m_pCall->getElementAsInt("return", 0); > if(pReturn) > { > Ret = *pReturn; // byVal (copy) would be better. > Axis::AxisDelete( (void *) pReturn, XSD_INT); // Deletes > the memory to which "Ret" points. > } > ... > I changed the datatype of variable "Ret" and the return type of the > method from "xsd__int*" to "xsd__int" and now everything works fine. > Is this a generally known bug or is there a way to tell the wsdl2ws > tool, that i dont like primitive datatype > pointers as return value? > It's also possible that i am completely wrong... so please help me :-) > Regards, > Manuel > Sorry for my bad english. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org