2013-03-20 4 views
4

.NET 웹 응용 프로그램에서 웹 서비스를 인스턴스화하려고합니다. 그러나이 줄에 도달하자마자 :.NET 웹 서비스에서 임시 클래스를 생성 할 수 없습니다.

registerService register = new registerService(); 

그런 다음 나는 다음과 같은 오류를 :

Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'Test.Website.ProxyTest.registerType[]' to 'Test.Website.ProxyTest.registerType'

나는 웹 서비스를 작성하지 않았다. 하지만 이것은 웹 서비스가 어딘가에 (XSD 또는 뭔가) 오류가 있다는 것을 의미합니까?

타사 개발자가이 웹 서비스를 수정해야한다는 의미입니까? 것 같다

+0

어쩌면이 도움이 될 http://stackoverflow.com/questions/6678934/unable-to-generate-a-temporary-class-result-1-error-cs0030-cannot -convert-ty – V4Vendetta

+0

@ V4Vendetta 감사합니다. 도움이되었습니다. 그러나 이것이 결국 웹 서비스를 만든 사람이 고쳐야 할 부분인지 궁금합니다. 그것에 대해 어떤 생각? – Vivendi

+0

나는 그것이 알려진 문제가 http://support.microsoft.com/kb/2486643, 아마도 어쩌면 해결 방법을 도울 수 있다고 생각합니다 – V4Vendetta

답변

8

는 알려진 문제가 될 및 세부 사항은 found here

Cause: A known issue with WSDL.EXE included in the .NET Framework can cause a proxy class to be generated incorrectly if an array of complex type includes an element that is also an array of complex type for which only one element exists

수 있습니다.

There is no resolution available at this time however there are three available workarounds:

Generate the proxy class manually using WSDL.EXE and then modify the proxy class where the datatype has been inappropriately created as a two-dimensional array (e.g. 'CustomType[][]') and correct it to be a single-dimensional array (e.g. 'CustomType[]'). Modify the datatype in the desired WSDL so that a second, optional element is included in the definition. This can be done by adding an element such as ''. Modify the complex type in the desired WSDL so that the boundary attributes are part of the complex type rather than the element (i.e. move the "minOccurs" and "maxOccurs" attributes to the complex type and remove them from the element).

유사한 stackoverflow question

관련 문제