On Thu, 14 Sep 2006, Dobos, Laszlo wrote:
> * 1. XML serialization puts the value of the fields between opening and
> closing tags. It's okay for an XML document, but SOAP (the web services XML
> protocoll) can deserialize _only strings_ if they're written between the
> tags and other attributes are also specified at the same time. The correct
> way to store values is in elements, like
>
> <Wavelength>
> <Unit>nm</Unit>
> <Value>700</Value>
> </Wavelength>
>
> or store in attributes, like
>
> <Wavelength Unit="nm" Value="700" />
>
> But the following is not correct:
>
> <Wavelength Unit="nm">700</Wavelength>
>
> We should keep in mind that even though this third version looks nicer in a
> text editor, XML is nor for reading by humans, but for using in web
> services, so I suggest to follow the SOAP standard instead of making good
> looking documents.
>From where do you get this ruling? I've just looked up the W3C recommendation
for SOAP 1.2 (http://www.w3.org/TR/soap12-part1/#soapbodyel) and it says
(section 5.3.1):
"All child element information items of the SOAP Body element information item:
SHOULD have a [namespace name] property which has a value, that is the name of the element SHOULD be namespace qualified.
Note:
Namespace qualified elements tend to produce messages whose interpretation is less ambiguous than those with unqualified elements. The use of unqualified elements is therefore discouraged.
MAY have any number of character information item children. Child character information items whose character code is amongst the white space characters as defined by XML 1.0 [XML 1.0] are considered significant.
MAY have any number of element information item children. Such element information items MAY be namespace qualified.
MAY have zero or more attribute information items in its [attributes] property. Among these MAY be the following, which has special significance for SOAP processing:
encodingStyle attribute information item (see 5.1.1 SOAP encodingStyle Attribute)."
I.e. any mix of text, attribute and element content is allowed. Which SOAP standard are you looking at?
If you meant that mixes of element and attribute children are not allowed in rpc/encoded style (I don't know whether this is true), then let's not worry about that, because rpc/encoded is deprecated (in the WS-I basic profile and therefore in the IVOA Basic Profile for SOAP) and we shouldn't use it.
If you meant that .NET doesn't support mixed content, then we can consider accomodating such a broken toolkit (as we do by using "wrapped" document/literal in other services), but it's not obvious that we should do so.
If you meant that the WS-I basic profile has a ruling against mixed content, then we should take that seriously.
Please clarify.
Guy Rixon gtr-at-ast.cam.ac.uk Institute of Astronomy Tel: +44-1223-337542 Madingley Road, Cambridge, UK, CB3 0HA Fax: +44-1223-337523Received on 2006-09-15Z11:41:27