从ServiceStack WSDL

时间:2015-05-04 12:26:08

标签: c# wsdl servicestack

我有一个REST& ServiceStack中的SOAP API实现,我在WSDL中摆脱Swagger时遇到了问题。

我安装了带有servicestack的swagger插件:

Plugins.Add(new SwaggerFeature());

我已经记录了我正在使用的所有休息方面,并且招摇正常。我在WSDL中得到了这样的东西:

<xs:complexType name="ArrayOfKeyValueOfstringSwaggerModelEdXdwojR">
<xs:annotation>
<xs:appinfo>
<IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary>
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="KeyValueOfstringSwaggerModelEdXdwojR">
<xs:complexType>
<xs:sequence>
<xs:element name="Key" nillable="true" type="xs:string"/>
<xs:element xmlns:q1="http://me.com/schemas/2015/05/API/" name="Value" nillable="true" type="q1:SwaggerModel"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>

我想删除它,因为我无法看到它的使用。谁知道用的是什么?还有如何删除?

1 个答案:

答案 0 :(得分:3)

您应该能够通过使用[Exclude(Feature.Soap)]属性注释请求DTO来从SOAP中排除服务。因为它们的内置服务可以使用运行时属性动态API,例如:

typeof (ResourceRequest)
    .AddAttributes(new ExcludeAttribute(Feature.Soap));