大网数据广告活动
启动与系统组件

Unable to generate a temporary class

· 52CE 我爱测

Fixes an issue where you receive the Unable to generate a temporary class (result=1) error when you execute the Invoke Web Services object.

This article helps you work around an issue where you receive the Unable to generate a temporary class (result=1) error when you execute the Invoke Web Services object.

Applies to:   All versions of Orchestrator
Original KB number:   2486643

Symptoms

When you execute the Invoke Web Services object in Microsoft System Center Orchestrator or Opalis Integration Server, you receive one or more of the following errors in the Error Summary Text published data:

Unable to generate a temporary class (result=1).
error CS0029: Cannot implicitly convert type 'Opalis.WebServices.DynamicProxy.CustomType' to 'Opalis.WebServices.DynamicProxy.CustomType[]'
error CS0030: Cannot implicitly convert type 'Opalis.WebServices.DynamicProxy.CustomType[]' to 'Opalis.WebServices.DynamicProxy.CustomType'

Cause

A known issue with WSDL.exe can cause a proxy class to be generated incorrectly if an array of complex type includes an element that's also an array of complex type and for which only one element exists.

Note: WSDL.exe is included in the Microsoft .NET Framework.

Workaround

There are three workarounds available:

  • You can generate the proxy class manually by using WSDL.exe and then change the proxy class in which the data type was inappropriately created as a two-dimensional array (for example, CustomType[][]) so that it's a single-dimensional array (for example, CustomType[]).

  • You can change the data type in the desired Web Services Description Language (WSDL) so that a second, optional element is included in the definition. You can do this by adding an element such as the following example:

    <xs:element minOccurs="0" name="dummyElement" nillable="true" type="xs:string"/>

  • You can change the complex type in the desired WSDL so that the boundary attributes are part of the complex type instead of being part of the element. (That is, you can move the minOccurs and maxOccurs attributes to the complex type and then remove them from the element.)

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 06/26/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。