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:

<complexType name="ArrayOf_tns1_ReportBean">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:ReportBean[]"/>
     </restriction>
    </complexContent>
</complexType>

The corresponding typemapping in the wsdd is

<typeMapping
        xmlns:ns="listsvc"
        qname="ns:ArrayOf_tns1_ReportBean"
        type="java:listsvc.ReportBean[]"
...
>

The serializer in this case is ArraySerializerFactory 

When I use wrapped mode, the wsdl has this:

 <complexType name="ArrayOf_tns1_ReportBean">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0"
name="item" type="tns1:ReportBean"/>
    </sequence>
   </complexType>

And the corresponding wsdd has 

<typeMapping
        xmlns:ns="listsvc"
        qname="ns:ArrayOf_tns1_ReportBean"
        type="java:listsvc.ArrayOf_tns1_ReportBean"
...>

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

Reply via email to