Microsoft KB Archive/899550

= You may receive an &quot;Index was outside the bounds of the array&quot; error message when you have specified multiple schemas in the Document schemas collection of a receive pipeline in BizTalk Server 2004 =

Article ID: 899550

Article Last Modified on 7/5/2005

-

APPLIES TO


 * Microsoft BizTalk Server 2004 Enterprise Edition
 * Microsoft BizTalk Server 2004 Standard Edition
 * Microsoft BizTalk Server 2004 Developer Edition
 * Microsoft BizTalk Server 2004 Partner Edition

-





SYMPTOMS
Consider the following scenario. You have specified multiple schemas in the Document schemas collection of a receive pipeline in Microsoft BizTalk Server 2004. Some of the schemas do not have a Target Namespace property specified. When you try to receive an XML document by using a Web service, you may receive the following error message:

Index was outside the bounds of the array.

Note This problem occurs in both the XML disassembler and the BizTalk Framework disassembler.



CAUSE
This problem occurs when the code that the BizTalk Web Services Publishing Wizard generates does not contain the root element of the schema.



WORKAROUND
To work around this problem, you must change the code that the BizTalk Web Services Publishing Wizard generates. To change the code, follow these steps:  Start Microsoft Visual Studio .NET 2003, and then open the Web project. In Solution Explorer, right-click the  .asmx file, and then click View Code.

Note  is the name of the Web service that you are using.  Locate the source code line that is similar to the following code. string bodyTypeAssemblyQualifiedName = &quot;.Reference, , Version=1.0.0.0, Culture=neutral, PublicKeyToken= &quot;; Note  is the schema. is the public key token.   Change the line by appending the root element of the schema to the schema reference as in the following code. string bodyTypeAssemblyQualifiedName = &quot;.Reference+, <WebServiceSchema>, Version=1.0.0.0, Culture=neutral, PublicKeyToken= &quot;; Note  is the .NET type name of the nested class that represents the root element of the multi-root schema. The identifier name might be different from the actual XML Schema (XSD) root element name. </li> On the Build menu, click Build Solution.</li></ol>

Note You may have to reset Microsoft Internet Information Services (IIS) if the earlier .dll file is still in the ASPNET worker process.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: BTS2004

Keywords: kbtshoot kbbtsmessaging kbbug kbprb KB899550

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.