2010-12-22 92 views
1

有人可以幫助我爲以下OGC模式生成接口(c#)文件嗎?使用svcutil.exe生成接口時出錯

架構文件:Download Schema Files Link

我需要爲上述模式zip文件排序WSDL創建Web服務。我已經好幾天了,沒有運氣生成界面。我已經試過:

svcutil.exe thewsdl.wsdl /language:c# /out:ITheInterface.cs 

svcutil Order.wsdl /out:IOrder.cs 

svcutil Order.wsdl Order.xsd ..\ws-addressing\ws-addr.xsd /out:IOrder.cs 

svcutil Order.wsdl Order.xsd ws-addr.xsd /out:IOrder.cs 

,我也得到了以下錯誤:

Microsoft (R) Service Model Metadata Tool 
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.1] 
Copyright (c) Microsoft Corporation. All rights reserved. 

Error: Cannot read ws-addr.xsd. 

    Cannot load file D:\Documents\DEV\SARPilot\Docs\eoschema\schema\OrderSchema\ws-addr.xsd as an Assembly. Check the FusionLogs f 
or more Information. 

    Could not load file or assembly 'file:///D:\Documents\DEV\SARPilot\Docs\eoschema\schema\OrderSchema\ws-addr.xsd' or one of its 
dependencies. The module was expected to contain an assembly manifest. 

回答

0

好了,我已經得到過去的這個錯誤。 (我現在得到更多,但那些是另一個問題)。

我在VS2010中打開了ws-addr.xsd文件並查看了警告列表。一個說:

Warning 105 The XML editor tried to convert this DTD to XSD so it can provide validation and intellisense while you type, but it could not create a valid XSD schema. Perhaps this DTD uses constructs that do not map to XSD. You may be able to get more information about the problem by using the Create Schema command. D:\Documents\DEV\SARPilot\Docs\eoschema\schema\ws-addressing\ws-addr.xsd 3 11 D:...\schema\

所以我的男人去「http://www.w3.org/2005/08/addressing/ws-addr.xsd」並下載正確的一個,並取而代之。

我不再收到警告105,並且不再收到svcutil的「無法加載文件」錯誤