[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [wsrp] Schema error in WSRP 2.0
This turned out be a little more subtle than I originally thought. Here are some messages worth validating. We tried JAXP based validation, and also on online validator at http://www.xmlforasp.net/SchemaValidator.aspx. Message 1: <v2:destroyPortletsResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:v2="urn:oasis:names:tc:wsrp:v2:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:wsrp:v2:types wsrp-2.0-types.xsd"> <v2:failedPortlets errorCode="v2:AccessDenied"> <v2:portletHandles>test</v2:portletHandles> </v2:failedPortlets> </v2:destroyPortletsResponse> This does not validate against the v2 types schema. JAXP reports the following: 3,48 cvc-enumeration-valid: Value 'InvalidHandle' is not facet-valid with respect to enumeration '[AccessDenied, ExportNoLongerValid, InconsistentParameters, InvalidRegistration, InvalidCookie, InvalidHandle, InvalidSession, InvalidUserCategory, ModifyRegistrationRequired, MissingParameters, OperationFailed, OperationNotSupported, ResourceSuspended, TooBusy, TooManyRequests]'. It must be a value from the enumeration. 3,48 cvc-attribute.3: The value 'InvalidHandle' of attribute 'errorCode' on element 'v2:failedPortlets' is not valid with respect to its type, 'ErrorCodes'. Message 2: <v2:destroyPortletsResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:v2="urn:oasis:names:tc:wsrp:v2:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:wsrp:v2:types wsrp-2.0-types.xsd"> <v2:failedPortlets errorCode="xsd:AccessDenied"> <v2:portletHandles>test</v2:portletHandles> </v2:failedPortlets> </v2:destroyPortletsResponse> This message is valid against the schema. The difference is that the second message uses errorCode from the XML schema namespace. Since wsrp_v2_types.xsd did not declare a prefix for the values of the enumeration, and since wsrp_v2_types.xsd has the attribute xmlns="http://www.w3.org/2001/XMLSchema", the validator interpreted the enumeration values to be from the XML schema namespace. 6.1.25 clearly states that the faut codes uses an enum of values with the prefix mapped to V2 namespace URI - but wsrp_v2_types.xsd does not reflect this. If the schema is changed to declare the values of enumerations from the v2 namespace (i.e. prefix the values as "types:AccessDenied" and so on), the first message will be valid. Subbu Rich Thompson wrote:
_______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]