简体   繁体   English

svcutil.exe和多个XSD文件

[英]svcutil.exe and multiple XSD files

I'm new to SOAP and I'm trying to use svcutil.exe generate C# classes from a .WSDL file which references multiple XSD files to define the various types 我是SOAP新手,正在尝试使用svcutil.exe.WSDL文件生成C#类,该文件引用多个XSD文件来定义各种类型

My file structure is this: 我的文件结构是这样的:

service.wsdl
type$a.xsd
type$b.xsd
etc..
type$z.xsd

I've tried running the command: 我试过运行命令:

svcutil.exe service.wsdl *.xsd  /t:code /l:c#

but I get the following error: 但我收到以下错误:

Error: There was an error verifying some XML Schemas generated during export:
Undefined complexType 'http://[...censored...]/bo:xmloutT' is used as a base for complex type extension.

The type bo:xmloutT is correctly defined in one of the XSD files, so I don't understand what I'm doing wrong. 在一个XSD文件中正确定义了类型bo:xmloutT ,所以我不明白我在做什么错。 Any ideas? 有任何想法吗?

In the end, I used xsd.exe instead of svcutil.exe 最后,我使用xsd.exe而不是svcutil.exe

They have a similar syntax for generating code, but xsd.exe worked correctly where the other one didn't, for some reason. 它们具有类似的语法来生成代码,但是由于某种原因,xsd.exe可以正常工作,而另一个则不能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM