complexType/simpleType not enforced

J

JamesG

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
 
J

Joe Kesselman

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.)
 
J

JamesG

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


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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top