Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 49962 invoked from network); 6 Dec 2007 11:27:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Dec 2007 11:27:12 -0000 Received: (qmail 34682 invoked by uid 500); 6 Dec 2007 11:27:00 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 34671 invoked by uid 500); 6 Dec 2007 11:27:00 -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 34660 invoked by uid 99); 6 Dec 2007 11:27:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2007 03:27:00 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2007 11:26:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4535E714244 for ; Thu, 6 Dec 2007 03:26:43 -0800 (PST) Message-ID: <8734982.1196940403280.JavaMail.jira@brutus> Date: Thu, 6 Dec 2007 03:26:43 -0800 (PST) From: "Damitha Kumarage (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Assigned: (AXIS2C-779) WSDL2C generates invalid function prototypes when WSDL operation name is a C/C++ reserved word In-Reply-To: <30641633.1195581283158.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/AXIS2C-779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Damitha Kumarage reassigned AXIS2C-779: --------------------------------------- Assignee: Dimuthu Gamage > WSDL2C generates invalid function prototypes when WSDL operation name is a C/C++ reserved word > ---------------------------------------------------------------------------------------------- > > Key: AXIS2C-779 > URL: https://issues.apache.org/jira/browse/AXIS2C-779 > Project: Axis2-C > Issue Type: Improvement > Components: code generation > Affects Versions: Current (Nightly) > Environment: Windows XP, Visual Studio 2005 > Reporter: Bill Mitchell > Assignee: Dimuthu Gamage > Priority: Minor > Attachments: service.wsdl > > > When given a WSDL with a operation with the name "delete", WSDL2C generates a function prototype for the operation using "delete" as the name of a formal parameter. Of course, the C++ compiler processing the header considers this an invalid use of a reserved word. > In particular, let the WSDL contain an operation definition of the form: > ... > > > > > ... > The generated prototype looks like this: > The template in the header for the stub for this operation is: > axiom_node_t* axis2_stub_Fservice_delete( axis2_stub_t *stub, const axutil_env_t *env, > axiom_node_t* delete); > I have verified that the same problem arises with words from the C reserved word list. If the operation name is "struct", then the formal parameter name is also "struct", in both the generated .h and .c files. > At least 3 approaches to resolving the problem are possible: > (1) Always prefix the names used in the formal parameters with a fixed Axis2 string, e.g., "op_". > (2) Replace names with a substitute when they are found to conflict with a word in the C/C++ reserved word list. > (3) Prefix all names from the WSDL with a string representing the namespace, so that every name is of the form nsstring_name, where even the default namespace is replaced with some nsstring. > Where solution (3) might solve a general class of conflcts of names across namespaces as well as this specific issue, for this one issue of the formal parameter to the operation stub solution (1) should be adequate. > The workaround, where the user is not able to change the WSDL itself, is to hand massage the generated .h and .c files after code generation wherever the conflict arises and the compiler diagnoses the error. -- 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