Microsoft KB Archive/891386

= You may receive an unhandled exception error message when you try to consume a BizTalk Web service in BizTalk Server 2006 or in BizTalk Server 2004 =

Article ID: 891386

Article Last Modified on 8/7/2007

-

APPLIES TO


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

-



SYMPTOMS
In Microsoft BizTalk Server 2006 or in Microsoft BizTalk Server 2004, when you try to consume a BizTalk Web service from the client application, you may receive an unhandled exception error message that is similar to one of the following:

Error message 1

An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll

Additional information: Server was unable to process request. --> File or assembly name PP5dap.dll, or one of its dependencies, was not found.

Error message 2

SOAP Fault: [Receiver]: Server was unable to process request. ---> Unable to generate a temporary class (result=1). error CS0029: Cannot implicitly convert type 'string' to 'string[]'

If you enabled the compile time XmlSerialization.Compilation switch in the Web.config file, you may receive an error message that is similar to the following:

vax07a.0.cs(219,125): error CS0030: Cannot convert type 'string[]' to 'string'

vax07a.0.cs(715,147): error CS0029: Cannot implicitly convert type 'string' to 'string[]'



CAUSE
This problem occurs when the BizTalk Web Services Publishing Wizard uses the Web Services Description Language Tool (Wsdl.exe) to generate the client information. When you publish a schema that contains nested nodes that have the maxOccurs attribute set to the &quot;unbounded&quot; value, the Wsdl.exe tool creates multidimensional arrays in the generated datatypes.cs file. Therefore, the generated datatypes.cs file contains incorrect types for the nested nodes.

For example, in the generated datatypes.cs file, you notice generated data type declaration statements that are similar to the following. ... public class yourSchema {       ///         [System.Xml.Serialization.XmlElementAttribute(&quot;TextValue&quot;)] public string[] TextValue; ///        [System.Xml.Serialization.XmlElementAttribute(&quot;NumValue&quot;)] public string[] NumValue; ....   } .... Note In this example, the data types are incorrectly declared as multidimensional arrays.



WORKAROUND
To work around this problem, modify the datatypes.cs file that is generated by the BizTalk Web Services Publishing Wizard by removing the bracket ([ ]) array characters from the data type declaration statements.



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



MORE INFORMATION
For more information about the BizTalk Web Services Publishign Wizard in BizTalk Server 2006, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/aa578703.aspx

For more information about the BizTalk Web Services Publishing Wizard in BizTalk Server 2004, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms946997.aspx

For more information about how to enable the XmlSerialization.Compilation switch, click the following article number to view the article in the Microsoft Knowledge Base:

823196 You receive a &quot;System.IO.FileNotFoundException&quot; error when the client application calls a Web service

Additional query words: BTS2004 BTS2006 BizTalk2004 BizTalk2006

Keywords: kbtshoot kbbug kbnofix kbprb KB891386

-

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

© Microsoft Corporation. All rights reserved.