Bug 8180 - Transfer: can a resource represenation be empty?
: Transfer: can a resource represenation be empty?
Status: CLOSED REMIND
Product: WS-Resource Access
Transfer
: FPWD
: PC Windows XP
: P2 normal
: ---
Assigned To: Doug Davis
: notifications mailing list for WS Resource Access
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-11-04 17:37 UTC by Doug Davis
Modified: 2010-03-17 10:59 UTC (History)
0 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Davis 2009-11-04 17:37:59 UTC
The definitions of Get and Put imply, thru their schema, that
a representation could be empty:

Get Response is defined as:
  <wst:GetResponse ...>
    xs:any*
  </wst:GetResponse>

Put is defined as:
  <wst:Put Dialect="xs:anyURI"? ...>
    xs:any*
  </wst:Put>

Put Response is defined as:
  <wst:PutResponse ...>
    xs:any*
  </wst:PutResponse>

We then have text similar to this:
--
[Body]/wst:Put
    This REQUIRED element MUST have as its first child element, an element that
comprises the representation of the resource that is to be replaced. Additional
extension elements MAY be included after the element representing the resource. 
--

The MUST would seem to imply that some XML is required.  The schema seems
to imply that it could be empty.  The text about extensions makes it really
interesting since if the representation is empty then you can't tell if the
element that is present is the representation or an extension.  We have a
bit of ambiguity/confusion here.

Proposal:
Allow for empty representations, but leave it up to extensions to figure out
how to know when their elements are extensions vs part of the resource.

So, as an example, modify Get Response from:
[Body]/wst:GetResponse
    This REQUIRED element MUST have as its first child element, an element that
comprises the representation of the resource. Additional extension elements MAY
be included after the element representing the resource. 

to:
[Body]/wst:GetResponse
    This is a REQUIRED element. The resource representation, if any, MUST
be its first child element. Additional extension elements MAY be included
after the element representing the resource. If resource representation is
empty then the extension specification MUST include a mechanism to ensure the
extension elements are not mistakenly interpreted as the resource
representation.

Make similar mods to the other ops as needed.
Comment 1 Doug Davis 2009-11-04 18:54:03 UTC
Amended proposal:
Also, add text to CreateResponse  about how extensions need to make sure
there's
a way to know when an element is an extension instead of the XML of the
resource.
Comment 2 Robert Freund 2010-01-28 18:51:00 UTC
resolved with the proposal to 8302


  翻译: