Andrew

    Thanks for the samples. From your sample messages I can see that you
return an array of objects back to the SOAP client. Would you know how to
express arrays as part of XSD document, such as if I want to define an
object, such as:


public class message{
        private String[] users;
        private String msgID;

        // Setter and getter methods for users
        // and the msgID
}

How can I represent the above JavaBean using XSD, especially its member
'users' which is an
array of undetermined length.

I tried to define it like,

<element name="message">
        <complexType>
                <sequence>
                        <element name="msgID".../>
                        <element name="users" type="SOAP-ENC:Array>
??????????? Is this right,how do I define datatype of array members
                </sequence>
        </complexType>
</element>

The reason I have a problem with this, is because SOAP client libraries from
Apache automatically generate a proper SOAP/HTTP message where the member
'users' is specified as:

<users xmlns:ns2="http://.../soap/encoding/"; typy="ns2:Array"
ns2:arrayType="String[2]">
        <item>user1</item>
        <item>user2</item>
</users>

but they don't generate an XSD document that I can have and put into WSDL
file. What I want to do it is to generate a proper XSD document which can
validate XML document for my JavaBean XML representation and put it in WSDL
file. If I am unclear on anything please let me know.

thanks in advance

Max

-----Original Message-----
From: Andrew Simpson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 9:16 AM
To: [EMAIL PROTECTED]
Subject: RE: Array datatype with SOAP



Attached are both deployment descriptor and example SOAP interactions for
arrays of beans.

Andrew
________________________________________________________________________

 Andrew Simpson, SpeechWorks International, Inc.
 695 Atlantic Avenue, Boston, MA 02111, U.S.A.
 Voice: +1 617 428 4444,  Fax: +1 617 757 2211
 [EMAIL PROTECTED]  http://www.speechworks.com



-----Original Message-----
From: Max Stolyarov [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 6:50 PM
To: '[EMAIL PROTECTED]'
Subject: Array datatype with SOAP


> Hello,
>
>    Does someone knows how to define elements that have Array data type.
> SOAP-ENC specifications provide for this but somehow I can't figure this
> out.
>
> Thanks
>
>
> Max Stolyarov
> NOVARRA
> 3232 Kennicott Ave
> Arlington Heights, Illinois  60004
> Phone:  (847) 368-7800 x 252
> Facsimile:  (847) 590-8144
>

Reply via email to