Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 19177 invoked from network); 7 Jan 2010 10:05:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jan 2010 10:05:27 -0000 Received: (qmail 44310 invoked by uid 500); 7 Jan 2010 10:05:26 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 44213 invoked by uid 500); 7 Jan 2010 10:05:26 -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 44204 invoked by uid 99); 7 Jan 2010 10:05:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2010 10:05:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.103.193.198] (HELO mail.cardinis.com) (212.103.193.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2010 10:05:18 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.cardinis.com (Postfix) with ESMTP id 58503629D955 for ; Thu, 7 Jan 2010 11:04:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.cardinis.com Received: from mail.cardinis.com ([127.0.0.1]) by localhost (mail.ost.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YgRWbnrMXtWn for ; Thu, 7 Jan 2010 11:04:56 +0100 (CET) Received: from [10.2.1.52] (ws-mauro.ost.lan [10.2.1.52]) by mail.cardinis.com (Postfix) with ESMTP id 3DB67629D952 for ; Thu, 7 Jan 2010 11:04:56 +0100 (CET) Message-ID: <4B45B1CE.50001@cardinis.com> Date: Thu, 07 Jan 2010 11:05:02 +0100 From: Mauro Molinari Organization: Cardinis Solutions User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: axis-dev@ws.apache.org Subject: Re: [Axis2] making minOccurs=1 by default for wsdl generated with POJO References: <4B434B5C.2040507@cardinis.com> <4B435314.90507@cardinis.com> <60708f4b1001052053x74c92480g7e534705539d89c3@mail.gmail.com> In-Reply-To: <60708f4b1001052053x74c92480g7e534705539d89c3@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Amila Suriarachchi ha scritto: > ok then lets make minOccurs = 1 by default. As Sosnoski has said it is > the the best solution. but that make everyone life easier. Sorry, I can't find where Sosnoski says that minOccurs=1 by default for every kind of parameters is the best solution. He said that it's the best to use minOccurs=1 for primitives (as I said), while he preferred to keep on using minOccurs=0 for object types, while I was saying it was preferrable to use nillable=true because of .NET compatibility. Moreover, if you use minOccurs=1 always, generating a client with Axis2 from the resulting WSDL, will then lead to the use of primitives that CANNOT let you specify a null value. So, the actual result is: => starting from public Integer methodA(Integer a); => Java2WSDL generates a WSDL with both the return type and the parameter type as mandatory (minOccurs=1, not specified but inherited as XML Schema default) => if you generate a client with WSDL2Java you'll get: public int methodA(int a); So, a client would not be able to call the service speciying null as the input parameter and could not handle null as the return type. That's not good at all! -- Mauro Molinari Software Designer & Developer E-mail: mauro.molinari@cardinis.com _______________________________________________ CARDINIS Solutions Via San Crispino, 46 35129 Padova - Italy Tel. +39 0498072095 Fax +39 0497800824 http://www.cardinis.com --- Questo messaggio � strettamente riservato ai destinatari specificati. Se � ricevuto per errore si prega di avvisare il mittente e di cancellarlo dal proprio sistema. - This message is specifically addressed to the recipient(s). Should you receive it by mistake, please notify the sender and delete it from your system.