Loading ...
Sorry, an error occurred while loading the content.
 

RE: [soapbuilders] About Arrays, WSDL, and Schema

Expand Messages
  • Bob Cunnings
    Hello, From Simon, ... Actually, shouldn t it be: this that or at least:
    Message 1 of 6 , Feb 8, 2001
      Hello,

      From Simon,

      > given a WSDL of
      > <part name="param" type="xsd:ArrayOfString"/>
      >
      > i would expect the relevant part of the SOAP request to be
      > <param SOAP-ENC:arrayType="xsd:string">
      > <item>this</item>
      > <item>that</item>
      > </param>
      >

      Actually, shouldn't it be:

      <param SOAP-ENC:arrayType="xsd:string[2]">
      <item>this</item>
      <item>that</item>
      </param>

      or at least:

      <param SOAP-ENC:arrayType="xsd:string[]">
      <item>this</item>
      <item>that</item>
      </param>

      cf. the SOAP spec:

      http://www.w3.org/TR/SOAP/#_Ref4777957010

      The 'asize' construct is mandatory, IMO. Of course I'm talking
      about the actual SOAP message XML here, not the WSDL. The
      SOAP implementation here relies on this as an important aid to
      deserialization, especially for multi-dimensional arrays.

      RC

      > However xsd:ArrayOfString does not exist. you need to explicitly build the
      > array definition yourself, e.g.
      >
      > <complexType name="ArrayOfString" base="soap:Array">
      > <sequence>
      > <element name="item" type="xsd:string" minOccurs='0' maxOccurs='*' />
      > </sequence>
      > </complexType>
      >
      > Cheers
      > Simon
      >
      > -----Original Message-----
      > From: W. Matthew Long [mailto:mlong@...]
      > Sent: Thursday, February 08, 2001 2:56 PM
      > To: soapbuilders@yahoogroups.com
      > Subject: [soapbuilders] About Arrays, WSDL, and Schema
      >
      >
      > WSDL gives a simple method of describing an array with
      > <part name="param" type="xsd:ArrayOfString"/>
      > from this I inherently know the part is an array of strings.
      > Therefore, I could describe the array directly with
      > <SOAP-ENC:array SOAP-ENC:arrayType="xsd:string">
      > <param>this</param>
      > <param>that</param>
      > </SOAP-ENC:array>
      >
      > since this is compliant to v1.1 of SOAP it would seem that this would
      > be the most native form of an array, where the arrayType is a native
      > xsd type.
      >
      > The requirement of some services to add the array "name" requires the
      > use of schema to ascertain the array contents of a simple type.
      > Example:
      > <SOAP-ENC:Stuff SOAP-ENC:arrayType="xsd:string">
      > ...
      > </SOAP-ENC:Stuff>
      >
      > one of two things occur here. 1) Stuff *is* the WSDL part name,
      > which requires me to locate the array item names in the schema, or 2)
      > the WSDL part name is the array item, but I have to locate "Stuff" in
      > the schema.
      >
      > ...my point here is that these cumbersome requirements vanish when
      > using the more basic form.
      >
      > Of course, you would have to utilize the schema *if* you have
      > an "element" attribute in the part.
      >
      > This is bothersome from an interop point of view, since I assume the
      > most basic form of an array *should* be supportable.
      >
      > -Matt
      >
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > soapbuilders-unsubscribe@yahoogroups.com
      >
      >
      >
      >
      > To unsubscribe from this group, send an email to:
      > soapbuilders-unsubscribe@yahoogroups.com
      >
      >
    • Simon Fell
      well spotted. the SOAP version should of course include the size info. Cheers Simon ... From: Bob Cunnings [mailto:cunnings@lectrosonics.com] Sent: Thursday,
      Message 2 of 6 , Feb 8, 2001
        well spotted. the SOAP version should of course include the size info.

        Cheers
        Simon

        -----Original Message-----
        From: Bob Cunnings [mailto:cunnings@...]
        Sent: Thursday, February 08, 2001 3:56 PM
        To: soapbuilders@yahoogroups.com
        Subject: RE: [soapbuilders] About Arrays, WSDL, and Schema


        Hello,

        From Simon,

        > given a WSDL of
        > <part name="param" type="xsd:ArrayOfString"/>
        >
        > i would expect the relevant part of the SOAP request to be
        > <param SOAP-ENC:arrayType="xsd:string">
        > <item>this</item>
        > <item>that</item>
        > </param>
        >

        Actually, shouldn't it be:

        <param SOAP-ENC:arrayType="xsd:string[2]">
        <item>this</item>
        <item>that</item>
        </param>

        or at least:

        <param SOAP-ENC:arrayType="xsd:string[]">
        <item>this</item>
        <item>that</item>
        </param>

        cf. the SOAP spec:

        http://www.w3.org/TR/SOAP/#_Ref4777957010

        The 'asize' construct is mandatory, IMO. Of course I'm talking
        about the actual SOAP message XML here, not the WSDL. The
        SOAP implementation here relies on this as an important aid to
        deserialization, especially for multi-dimensional arrays.

        RC

        > However xsd:ArrayOfString does not exist. you need to explicitly build the
        > array definition yourself, e.g.
        >
        > <complexType name="ArrayOfString" base="soap:Array">
        > <sequence>
        > <element name="item" type="xsd:string" minOccurs='0' maxOccurs='*' />
        > </sequence>
        > </complexType>
        >
        > Cheers
        > Simon
        >
        > -----Original Message-----
        > From: W. Matthew Long [mailto:mlong@...]
        > Sent: Thursday, February 08, 2001 2:56 PM
        > To: soapbuilders@yahoogroups.com
        > Subject: [soapbuilders] About Arrays, WSDL, and Schema
        >
        >
        > WSDL gives a simple method of describing an array with
        > <part name="param" type="xsd:ArrayOfString"/>
        > from this I inherently know the part is an array of strings.
        > Therefore, I could describe the array directly with
        > <SOAP-ENC:array SOAP-ENC:arrayType="xsd:string">
        > <param>this</param>
        > <param>that</param>
        > </SOAP-ENC:array>
        >
        > since this is compliant to v1.1 of SOAP it would seem that this would
        > be the most native form of an array, where the arrayType is a native
        > xsd type.
        >
        > The requirement of some services to add the array "name" requires the
        > use of schema to ascertain the array contents of a simple type.
        > Example:
        > <SOAP-ENC:Stuff SOAP-ENC:arrayType="xsd:string">
        > ...
        > </SOAP-ENC:Stuff>
        >
        > one of two things occur here. 1) Stuff *is* the WSDL part name,
        > which requires me to locate the array item names in the schema, or 2)
        > the WSDL part name is the array item, but I have to locate "Stuff" in
        > the schema.
        >
        > ...my point here is that these cumbersome requirements vanish when
        > using the more basic form.
        >
        > Of course, you would have to utilize the schema *if* you have
        > an "element" attribute in the part.
        >
        > This is bothersome from an interop point of view, since I assume the
        > most basic form of an array *should* be supportable.
        >
        > -Matt
        >
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > soapbuilders-unsubscribe@yahoogroups.com
        >
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > soapbuilders-unsubscribe@yahoogroups.com
        >
        >




        To unsubscribe from this group, send an email to:
        soapbuilders-unsubscribe@yahoogroups.com
      Your message has been successfully submitted and would be delivered to recipients shortly.