List of SOAP interoperability issues that may occur when you work with the Generic Language Universal Environment (Glue) Technology 5.0.1 in SQL Server 2005 (894710)



The information in this article applies to:

  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Workgroup
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Enterprise X64 Edition

INTRODUCTION

Native HTTP SOAP support that is introduced in Microsoft SQL Server 2005 lets you enable the Transact-SQL programmability of SQL Server as Web methods. For example, you can enable the stored procedures or the user-defined functions as Web methods. This functionality lets SQL Server 2005 become available as a SOAP 1.2-compliant server. A SOAP 1.2-compliant server is reachable over HTTP by both SOAP 1.1 and SOAP 1.2 clients.

This article describes SOAP interoperability issues that may occur when you work with Generic Language Universal Environment (Glue) Technology 5.0.1.

Note Glue Technology is also known as Glueware.

For more information about Glue, visit the following Web site:

MORE INFORMATION

If you want to use Glue to create applications that communicate with SQL Server 2005, we highly recommend that you use the simple Web Services Description Language (WSDL) document instead of the default (extended) WSDL document. You can retrieve the simple WSDL document by adding the "?wsdlsimple" query string at the end of the URL. For example, use the following URL:

http://Server/endpoint?wsdlsimple

SQL Server 2005 requires correct Microsoft Windows NT authentication before you can retrieve the WSDL document. To enable Glue to import the WSDL document, you may have to retrieve the WSDL document and then save the document as a file or as a Web page.

The following interoperability issues may occur when you use Glue together with native HTTP support in SQL Server 2005.

You may have to modify the XSD schema definition for the SqlRowSet complex type

To use Glue to correctly parse the default (extended) WSDL document that is generated by SQL Server 2005, you may have to modify the XML Schema definition language (XSD) schema definition for the SqlRowSet complex type. The XSD schema definition that SQL Server 2005 generates is similar to the following code example.
<xsd:complexType name="SqlRowSet">
  <xsd:sequence maxOccurs="unbounded">
	<xsd:element ref="xsd:schema" />
	<xsd:any />
  </xsd:sequence>
</xsd:complexType>
You may have to modify the schema to the following code example.
<xsd:complexType name="SqlRowSet">
  <xsd:sequence>
	<xsd:any minOccurs="0" maxOccurs="unbounded" />
  </xsd:sequence>
</xsd:complexType>
To avoid this issue, use the simple WSDL document to generate the client-side code.

Glue only supports the MD5 algorithm for Digest authentication

For Digest authentication, Glue only implements the MD5 algorithm. Glue does not implement the MD5-Sess algorithm. For security reasons, the MD5-sess algorithm is the algorithm that Windows Server 2003 enforces when you use Digest authentication.

To work around this issue, endpoints that require authentication interoperability with Glue clients must implement an authentication type that is different from Digest. For example, the endpoints can implement Basic or WS-Security over SSL authentication.

Glue clients send invalid xsi:type values for certain SQL data types

Glue clients send invalid xsi:type values for the unsupported SQL data types that are listed in the following table.
XSD data typeSQL data type
IntegerInt
LongBitInt
ShortSmallInt
UnsignedByteTinyInt
DoubleFloat
FloatReal
BooleanBit
For example, the following request from a Glue client includes an unsupported xsi:type value:
<?xml version='1.0' encoding='UTF-8'?>
<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:n2='http://schemas.xmlsoap.org/soap/encoding/'>
  <soap:Body>
    <n:RetLongOut xmlns:n='http://tempuri'>
      <n:a xsi:type='n2:long'>23425234</n:a>
      <n:res xsi:type='n2:long'>0</n:res>
    </n:RetLongOut>
  </soap:Body>
</soap:Envelope>
Note The xsi:type value uses the http://schemas.xmlsoap.org/soap/encoding/ namespace. SQL Server 2005 supports the standard XSD namespace and the http://schemas.microsoft.com/sqlserver/2004/sqltypes namespace data types.

Glue incorrectly maps string and decimal types

The Glue proxy class generator may work with the default (extended) WSDL document that is generated by SQL Server 2005. In this scenario, the Glue proxy class generator interprets any unnamed xsd:simpleType element that has an xsd:restriction element as a byte[]. The following example XSD fragment illustrates this issue.
<xsd:element name="RetString">
  <xsd:complexType>
    <xsd:sequence>
      <xsd:element minOccurs="1" maxOccurs="1" name="a" nillable="true">
        <xsd:simpleType>
          <xsd:restriction base="sqltypes:nvarchar" sqltypes:localeId="1033" sqltypes:sqlCompareOptions="IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId="52" /> 
        </xsd:simpleType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>
This issue applies to all SQL string and decimal types.

This issue only occurs when you use the default (extended) WSDL document for an HTTP SOAP endpoint. This issue does not affect endpoints for which the simple WSDL document is used.

Glue currently only supports an <xsd:extension> element within an <xsd:complexContent> node

Glue currently only allows for an <xsd:extension> element to appear within an <xsd:complexContent> node. This behavior affects the default (extended) WSDL definition of the TypedXml class.

For example, you may use the following WSDL code fragment.
<xsd:element name="RetTypedXml">
 <xsd:complexType>
  <xsd:sequence>
   <xsd:element name="a" minOccurs="1" maxOccurs="1" nillable="true">
     <xsd:complexType sqltypes:xmlSchemaCollection="[Interop].[dbo].[SqlInterop]">
       <xsd:complexContent>
         <xsd:restriction base="sqltypes:xml">
          <xsd:sequence>
           <xsd:any processContents="strict" namespace="http://Sqlsoap" /> 
          </xsd:sequence>
         </xsd:restriction>
       </xsd:complexContent>
     </xsd:complexType>
   </xsd:element>
 </xsd:sequence>
</xsd:complexType>
</xsd:element>
When you use this WSDL code fragment, an exception is thrown by the Glue proxy class generation tool. The exception is similar to the following:
electric.xml.io.schema.SchemaException: <complexContent> in type http://tempuri:null must currently be followed by <extension>
To work around this issue, modify the WSDL definition to remove the <xsd:complexContent> element. This change is illustrated in the following revised code fragment.
<xsd:element name="RetTypedXml">
 <xsd:complexType>
  <xsd:sequence>
   <xsd:element name="a" minOccurs="1" maxOccurs="1" nillable="true">
     <xsd:complexType sqltypes:xmlSchemaCollection="[Interop].[dbo].[SqlInterop]">
          <xsd:sequence>
           <xsd:any processContents="strict" namespace="http://Sqlsoap" /> 
          </xsd:sequence>
     </xsd:complexType>
   </xsd:element>
 </xsd:sequence>
</xsd:complexType>
</xsd:element>
To modify the WSDL definition to remove the <xsd:complexContent> element, use a custom WSDL generator with SQL Server 2005. For more information, see "Implementing Custom WSDL Support" in SQL Server 2005 Books Online.

If you want to create a Glue application that communicates with SQL Server 2005, we recommend that you use the simple WSDL document.

Modification Type:MajorLast Reviewed:3/11/2006
Keywords:kbtshoot kberrmsg kbinfo KB894710 kbAudDeveloper