Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 49968 invoked from network); 5 Jan 2010 10:40:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Jan 2010 10:40:16 -0000 Received: (qmail 40241 invoked by uid 500); 5 Jan 2010 10:40:16 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 40119 invoked by uid 500); 5 Jan 2010 10:40:15 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 40110 invoked by uid 99); 5 Jan 2010 10:40:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jan 2010 10:40:15 +0000 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; Tue, 05 Jan 2010 10:40:14 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9D0FD234C4A9 for ; Tue, 5 Jan 2010 02:39:54 -0800 (PST) Message-ID: <676891892.41161262687994641.JavaMail.jira@brutus.apache.org> Date: Tue, 5 Jan 2010 10:39:54 +0000 (UTC) From: "Mauro Molinari (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation In-Reply-To: <5272480.1193319411581.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796616#action_12796616 ] Mauro Molinari commented on AXIS2-3300: --------------------------------------- This is acceptable and is ok for .NET >=2.0 compatibility, however consider that in this case the generated WSDL may not be usable to create suitable clients by .NET 1.x users. This should be documented in some way, so that if a Java developer using Axis2 must write web services that have to be invoked even by .NET 1.x clients, he will then be forced to opt for a contract-first approach. Actually, this is also the case right now, so the new behaviour wouldn't be worse than the current one in any case ;-) > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis2 > Issue Type: Bug > Components: Tools > Affects Versions: 1.3 > Reporter: Mauro Molinari > Assignee: Deepal Jayasinghe > Attachments: axis2-1.4.1.diff > > > When you try to expose a POJO as a webservice, suppose you have two Java methods with the following signatures: > public Integer a(String, Integer) > public String b(Integer, String) > Java2WSDL adds the minOccurs="0" for each element of each complex type, both for the input parameters and for the output parameters. > When generating clients using .NET WebService Studio 2.0, the result is the following: > - all the generated C# methods input parameters are doubled, except for the string ones: the doubled parameters are booleans whose meaning is: "is the previous parameter specified or not?" > - all the generated C# methods return parameters are void, except for the string ones > The actual result are clients with methods like these: > public void a(string, int, bool); > public string b(int, bool, string); > This is obviously a problem, particularly for the "void" return type. > If I remove minOccurs="0", clients are generated correctly by .NET WebService Studio 2.0. > The issue is this: why does Java2WSDL always adds minOccurs="0"? If its meaning were "it can be null", I think nillable="true" attribute should be more appropriate... Moreover, if I substitute Integer with int in the original Java class methods, minOccurs="0" is still added by Java2WSDL, even if an int cannot be null. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.