Skip to main content

Primitive data types in BasicProfileBinding

Posted by arungupta on May 13, 2005 at 3:44 PM PDT

I find it surprising that even for BasicProfileBinding,
which is supposed to interoperate with WS-I Basic
Profile
compliant Web services, the simple data types are from "http://schemas.microsoft.com/2003/10/Serialization/"
namespace instead of the standard XML Schema "http://www.w3.org/2001/XMLSchema".
For instance, here is how a complexType with a primitive "string" data
type be defined in Indigo:

<schema targetNamespace="http://tempuri.org/" 
  xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>

...
<complexType>
  <xs:sequence>
    <xs:element name="foo" type="q1:string"/>
  </xs:sequence>
</complexType>

...
</schema>

<schema
  targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>

...
<xs:complexType name="string">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attributeGroup ref="tns:TypeAttributes" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>

<xs:attributeGroup name="TypeAttributes">
  <xs:attribute name="Id" type="xs:int" />
  <xs:attribute name="Ref" type="xs:int" />
  <xs:attribute name="BaseTypes">
    <xs:simpleType>
      <xs:list itemType="xs:QName" />
    </xs:simpleType>
  </xs:attribute>
  <xs:attribute name="ClrType" type="xs:string" />
  <xs:attribute name="ClrAssembly" type="xs:string" />
  <xs:attribute name="MustUnderstand" type="xs:boolean" />
  <xs:anyAttribute namespace="##targetNamespace" processContents="skip" />
</xs:attributeGroup>

...
</schema>

rather than the simple XML Schema way:

<schema targetNamespace="http://tempuri.org/" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>

...
<complexType>
  <xs:sequence>
    <xs:element name="foo" type="xs:string"/>
  </xs:sequence>
</complexType>

...
</schema>

And that's the way pretty all the primitive data types are defined.

What does it buy Indigo in terms of interoperability ?

Related Topics >>