complexType/simpleType not enforced

Discussion in 'XML' started by JamesG, Apr 20, 2007.

  1. JamesG

    JamesG Guest

    Hi all,
    I'm developing a web service, and as part of the WSDL I have the
    following constraints:

    <xsd:simpleType name="consTokenType">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[a-z0-9]{32}"/>
    </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="statusType">
    <xsd:restriction base="xsd:string">
    <xsd:enumeration value="enroute"/>
    <xsd:enumeration value="delayed"/>
    <xsd:enumeration value="instorage"/>
    <xsd:enumeration value="pendingcustoms"/>
    <xsd:enumeration value="missing"/>
    </xsd:restriction>
    </xsd:simpleType>

    However, these restrictions are not being enforced. It is also the
    case with other complexTypes in the document.
    Anyone have an idea why this is the case?

    Thanks
     
    JamesG, Apr 20, 2007
    #1
    1. Advertisements

  2. > However, these restrictions are not being enforced.

    Are you sure schema validation is turned on in your parser's options?
    (Many still default to nonvalidating mode.)

    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Apr 20, 2007
    #2
    1. Advertisements

  3. JamesG

    JamesG Guest

    On Apr 20, 5:38 pm, Joe Kesselman <> wrote:
    > > However, these restrictions are not being enforced.

    >
    > Are you sure schema validation is turned on in your parser's options?
    > (Many still default to nonvalidating mode.)
    >
    > --
    > () ASCII Ribbon Campaign | Joe Kesselman
    > /\ Stamp out HTML e-mail! | System architexture and kinetic poetry



    Hi,
    My parser is PHP5 using the SOAP extension. I thought this might be
    the case... I assume PHP does not validate using the schema (ignores
    it)?
    Perhaps I should post this in the PHP group.

    Thanks
     
    JamesG, Apr 21, 2007
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Moth
    Replies:
    2
    Views:
    513
  2. D. Alvarado

    complexType is not allowed here!?

    D. Alvarado, Apr 20, 2004, in forum: XML
    Replies:
    2
    Views:
    994
    Henry S. Thompson
    Apr 21, 2004
  3. Replies:
    0
    Views:
    521
  4. sk
    Replies:
    1
    Views:
    522
    Priscilla Walmsley
    Jun 14, 2006
  5. JamesG
    Replies:
    0
    Views:
    437
    JamesG
    Apr 19, 2007
  6. John Nagle
    Replies:
    4
    Views:
    790
    James Antill
    Aug 7, 2007
  7. Anil Mamede
    Replies:
    2
    Views:
    512
    Anil Mamede
    Apr 6, 2008
  8. kanpeter
    Replies:
    0
    Views:
    1,412
    kanpeter
    Oct 26, 2010
Loading...