OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [wsrp] Schema error in WSRP 2.0


Rich Thompson wrote:
> 
> Have you tried prefixing the values with "types:" to see if an 
> appropriate runtime message is generated? It looks to me like the Axis 
> stack would generate a value of "types:AccessDenied", but I don't know 
> what it would place into the message as namespace declarations.

That's the solution I meant by "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."

IMO, this is the correct fix for the xsd as it reflects the first 
sentence from 6.1.25 of the spec.

> Another possibility is that we need to declare a type which extends 
> xsd:QName such that the enumeration can be against that type and 
> therefore in the WSRP types namespace. I would definitely want enough 
> testing to know exactly what solution is actually needed.

As Nate pointed out, Axis 1.x has serious trouble dealing with 
restrictions on QNames no matter what. Only string-based restriction 
works correctly - but we want to use this for fault codes in WSRP 2.0.

For those interested in using Axis for their implementations - please 
gen messages with Axis, and see the behavior. The key issue is that Axis 
generates an attribute with value "{namespace URI}:localName}" instead 
of "prefix:localName". The former does not belong to the value space of 
QName. More testing from other stacks would also be helpful.

Subbu

> 
> Rich
> 
> 
> *Subbu Allamaraju <subbu@bea.com>*
> 
> 10/06/2006 09:48 AM
> 
> 	
> To
> 	wsrp@lists.oasis-open.org
> cc
> 	
> 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:
> 
> Why should it have used the fault element names? These are error codes, 
> not faults. I would also note that the schema matches 6.1.25 in the spec.
> 
> Rich
> 
> *"Subbu Allamaraju" **_<subbu@bea.com>_* <mailto:subbu@bea.com>
> 
> 10/04/2006 04:45 PM
> 
> 	
> To
> 	_<wsrp@lists.oasis-open.org>_ <mailto:wsrp@lists.oasis-open.org>
> cc
> 	
> Subject
> 	[wsrp] Schema error in WSRP 2.0
> 
> 
> 
> 	
> 
> 
> 
> 
> 
> 
> 
> We came across an error in the schema regarding the ErrorCodes type.
> 
> This type is a restriction based on QName, but it uses element names in 
> stead of types in the enumeration.
> 
> This type should have been
> 
> <simpleType name="ErrorCodes">
> <restriction base="xsd:QName">
>   <enumeration value="AccessDeniedFault"/>
>   <enumeration value="ExportNoLongerValidFault"/>
>   <enumeration value="InconsistentParametersFault"/>
>   <enumeration value="InvalidRegistrationFault"/>
>   <enumeration value="InvalidCookieFault"/>
>   <enumeration value="InvalidHandleFault"/>
>   <enumeration value="InvalidSessionFault"/>
>   <enumeration value="InvalidUserCategoryFault"/>
>   <enumeration value="ModifyRegistrationRequiredFault"/>
>   <enumeration value="MissingParametersFault"/>
>   <enumeration value="OperationFailedFault"/>
>   <enumeration value="OperationNotSupportedFault"/>
>   <enumeration value="ResourceSuspendedFault"/>
>   <enumeration value="TooBusyFault"/>
>   <enumeration value="TooManyRequestsFault"/>
> </restriction>
> </simpleType>
> 
> This needs to be fixed.
> 
> Subbu
> _______________________________________________________________________
> 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.
> 
> 
> _______________________________________________________________________
> 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.
> 

_______________________________________________________________________
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]