Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 46544 invoked from network); 12 Oct 2004 15:10:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Oct 2004 15:10:13 -0000 Received: (qmail 50569 invoked by uid 500); 12 Oct 2004 15:09:52 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 50519 invoked by uid 500); 12 Oct 2004 15:09:51 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 50465 invoked by uid 99); 12 Oct 2004 15:09:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [65.212.182.194] (HELO mypxgw01.bco-home.com) (65.212.182.194) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 12 Oct 2004 08:09:50 -0700 Received: by mypxgw01.bco-home.com with Internet Mail Service (5.5.2653.19) id ; Tue, 12 Oct 2004 08:12:46 -0700 Message-ID: <9F752C166F3BD511B2D40200C1105A560715CBB2@memail01.bco-home.com> From: mmosttler@bco.com To: axis-user@ws.apache.org Subject: RE: question regarding arrays of beans and doc/lit (wrapped) Date: Tue, 12 Oct 2004 08:12:33 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I don't have an answer but I can tell you that the new class, ArrayOf_*, is not necessary for proper functioning of your service or the client if it is an Axis Java client. But if you need to have the service be interop with other clients like .NET then the service you described does not work. Currently there is a bug somewhere in Axis relating to arrays as a bean property, they do not serialize correctly. A work around I have found is to actually change my bean to return the generated ArrayOf_* class (actually I only generated it 1 time then just use it). The serialization is then correct and works with a .NET client and the Axis Java client. marcus -----Original Message----- From: Shantanu Sen [mailto:ssen@pacbell.net] Sent: Monday, October 11, 2004 8:29 PM To: axis-user Subject: question regarding arrays of beans and doc/lit (wrapped) Sorry for sending the previous message too soon... I have a question regarding the following scenario. I start of with a set of java classes. The main class is listsvc.ListService: public interface ListService extends java.rmi.Remote { public ListPropertyBean[] getListProperties( String listId) throws RemoteException, BadIdException; .... } The ListProperyBean is defined as follows public class ListPropertyBean implements Serializable { private String name_; private String label_; private ReportBean[] reportBeans_; ... } The ReportBean is a simple bean: public class ReportBean implements Serializable { private String name_; private String type_; .. } Now when I use rpc-encoded, I get this in the generated wsdl for the ReportBean array: The corresponding typemapping in the wsdd is The serializer in this case is ArraySerializerFactory When I use wrapped mode, the wsdl has this: And the corresponding wsdd has with the serializerFactory as the BeanSerializerFactory. The issue with this is that a new class is generated for the wrapped mode: the ArrayOf_tns1_ReportBean which has a getItem and setItem that uses the listsvc.ReportBean. Since I have pre-existing java classes (e.g. listsvc.ReportBean etc) this means that I have to compile this new class ArrayOf_tns1_ReportBean if I want to load the WSDD programmatically (since it walks through the typemapping and instantiates each class). This is undesirable. Is there any way I can use doc/lit but still ensure that the generated classes (from the wsdl2java) remain the same as the original classes that was there when the java2wsdl was invoked? Essentially, I want to use the wrapped mode, but do not want the arrays be mapped to any new classes. Is there any switch that I can use with Java2WSDL to ensure this? Thanks for any help. Shantanu Sen