Hi,
If your schema declaration is proper then it should generate an array
of the correct type. If you are still seeing OMElements then there
could be a problem with your schema
Ajith
On 8/15/06, Debasish Dutta Roy <[EMAIL PROTECTED]> wrote:
I have seen that example on the net. But my list/array is of another object.
Not a native data type.
If I do a complextype then this object is not created.
I any case, it creates an array of OMElement[] and not an Object[].
As for creating list vs array, i think it would depend on the tool. If it
can create one you can get a list.
I am using the nightly build of 08/07/2006. Anybody has got any idea???
It is a simple case, I have a manager Class which has member of array of
Employee objects who are subordinates to him.
On 8/11/06, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
> Hi,
> As far as generating code is concerned you *cannot* generate a list
> field, even if you have a the maxOccurs set to unbound! it is always
> an array!
> As for this schema it is not right. What you should be doing is the
following
>
> <xsd:element name="bList" type="B" minOccurs="1" maxOccurs="unbounded"/>
>
> <xsd:complexType name="B">
> <xsd:sequence>
> <xsd:element name="str"
type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
>
>
>
> Ajith
> On 8/11/06, [EMAIL PROTECTED]
> < [EMAIL PROTECTED]> wrote:
> >
> > All
> > I need an object which contains a member variable, which is list of
another
> > object.
> >
> > Class A {
> > //list of object B
> > private java.util.List bList;
> > }
> >
> > Class B {
> > private String str;
> > }
> >
> > How do I represent this in WSDL. I am using WSDL2Java commandline. Since
I
> > am using the tool I expect to get a java.util.List
> >
> > This is how my current wsdl looks...
> >
> > <xsd:element name="bList" type="B" minOccurs="1" maxOccurs="unbounded"/>
> >
> > <xsd:element name="B">
> > <xsd:complexType>
> > <xsd:sequence>
> > <xsd:element name="str" type="xsd:string"/>
> > </xsd:sequence>
> > </xsd:complexType>
> > </xsd:element>
> >
> > But when I generate the code inside class A, I get
> >
> > protected org.apache.axiom.om.OMElement[] localBList ;
> >
> > why an array, and why OMElement?
> >
> > Can you tell me what I am missing.
> > ___________________________________________________
> > Debasish Dutta Roy
> > NITAS
> > Ph: 617-871-3033
> > _________________________
> >
> > CONFIDENTIALITY NOTICE
> >
> > The information contained in this e-mail message is intended only for
the
> > exclusive use of the individual or entity named above and may contain
> > information that is privileged, confidential or exempt from disclosure
under
> > applicable law. If the reader of this message is not the intended
recipient,
> > or the employee or agent responsible for delivery of the message to the
> > intended recipient, you are hereby notified that any dissemination,
> > distribution or copying of this communication is strictly prohibited. If
you
> > have received this communication in error, please notify the sender
> > immediately by e-mail and delete the material from any computer. Thank
you.
> >
>
>
> --
> Ajith Ranabahu
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Ajith Ranabahu
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]