2010-12-22 90 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的“无法加载文件”错误