3.1.4.87.2.2 GetXmlSchemaForViewResponse

The GetXmlSchemaForViewResponse element specifies the result data for the GetXmlSchemaForView WSDL operation.

 <xs:element name="GetXmlSchemaForViewResponse" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0" name="GetXmlSchemaForViewResult" nillable="true" type="xs:string"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>

GetXmlSchemaForViewResult: A string that contains the resulting XML schema. The XML schema MUST conform to [XMLSCHEMA1] and [XMLSCHEMA2]. The XML namespace specified by the XML schema is implementation-specific<95>. The XML schema MUST specify the root element that corresponds to the View. The name the root element MUST be equal to the name of the View. The root element MUST contain exactly one XML element for each of the fields in the View. The XML element is declared based on the TypeDescriptors that correspond to fields. For each TypeDescriptor the corresponding XML element MUST be declared as follows:

  • The name of the corresponding XML element MUST be equal to the name of the TypeDescriptor.

  • If the TypeDescriptor contains one or more other TypeDescriptors, the corresponding XML element MUST be declared as a complex type that contains XML elements that correspond to TypeDescriptors contained by the TypeDescriptor.

  • If the TypeDescriptor does not contain any TypeDescriptors, and the data type represented by the TypeDescriptor can be represented by a simple type, the corresponding XML element MUST be declared as that simple type. For example, if the data type represents a bit, the corresponding XML element is declared as "Boolean" simple type as specified in [XMLSCHEMA2] section 3.2.2.

  • If the TypeDescriptor does not contain any TypeDescriptors, and the data type represented by the TypeDescriptor cannot be represented by a simple type, the corresponding XML element SHOULD be declared as a complex type that contains a single XML element as specified in [XMLSCHEMA0] section 5.5. However, if the data type represented by the TypeDescriptor can be represented by a set of simple types, the corresponding XML element MAY be declared as a complex type that contains XML elements to represent the set of simple types.

  • If the TypeDescriptor is contained by another TypeDescriptor which has the IsCollection flag set to true, the value of the "maxOccurs" attribute as specified in [XMLSCHEMA1] section 3.3.2 MUST be "unbounded". Otherwise, the value MUST be 1.

XML elements corresponding to TypeDescriptors MUST contain the following annotations as specified in [XMLSCHEMA1] section 3.13. The XML elements MAY also contain additional implementation-specific annotations, or additional implementation-specific XML attributes for the XML elements that represent the annotations specified in this section. The XML namespace of the XML elements that correspond to annotations are implementation-specific.<96>

  • If the TypeDescriptor has the ReadOnly flag set to true, the XML element MUST contain an annotation with name "FieldInfo", which has an XML attribute with name "ReadOnly" and value true.

  • If the TypeDescriptor references an Identifier, and the TypeDescriptor references an Association, the XML element MUST contain an annotation with name "ForeignKeyInfo" that has the XML attributes in the following table specified with their names and values.

    Name

    Value

    EntityNamespace

    The namespace of the Entity that contains the Identifier referenced by the TypeDescriptor.

    EntityName

    The name of the Entity that contains the Identifier referenced by the TypeDescriptor.

    IdentifierIndex

    The index of the Identifier referenced by the TypeDescriptor, within the Entity that contains the Identifier.

    AssociationName

    The name of the Association referenced by the TypeDescriptor

  • If the TypeDescriptor references an Identifier, and the TypeDescriptor does not reference an Association, the XML element MUST contain an annotation with name "KeyInfo" that has the XML attributes in the following table specified with their names and values.

    Name

    Value

    EntityNamespace

    The namespace of the Entity that contains the Identifier referenced by the TypeDescriptor.

    EntityName

    The name of the Entity that contains the Identifier referenced by the TypeDescriptor.

    IdentifierIndex

    The index of the Identifier referenced by the TypeDescriptor, within the Entity that contains the Identifier.

  • If the TypeDescriptor contains localized names, the XML element MUST contain an annotation with name "LocalizedNames". The XML element that represents the annotation MUST contain XML elements with name "LocalizedName" for each localized name contained by the TypeDescriptor. The value of the "LocalizedName" element MUST be the localized name, and it MUST have an XML attribute with name "LCID" and the LCID of the localized name as the value.

  • If the TypeDescriptor has a DefaultValue for the specified MethodInstance, and data type of the DefaultValue can be represented by a simple type, the XML element MUST contain an annotation with name "DefaultValue" and the data of DefaultValue as the value.