gpt4 book ai didi

WCFExtras - 元素行为具有无效的子元素 'wsdlExtensions' ?

转载 作者:行者123 更新时间:2023-12-04 11:59:57 25 4
gpt4 key购买 nike

<endpointBehaviors>
<behavior name="singleFileEndpointBehavior">
<wsdlExtensions singleFile="True" />
</behavior>
</endpointBehaviors>

“wsdlExtensions”下方有一条蓝线,表示有问题。
The element 'behavior' has invalid child element 'wsdlExtensions' ...
有谁知道如何解决这一问题?

最佳答案

为行为扩展元素定义架构 wsdlExtensions .

<xs:complexType name="wsdlExtensions">
<xs:attribute name="singleFile" type="boolean_Type" use="optional" default="True" />
</xs:complexType>

在用于 Intellisense 的架构文件中包含新元素的架构

Visual Studio 通常使用 %VS_INSTALL_DIR%\xml\Schemas\DotNetConfig.xsd文件用于 Intellisense,除非 Visual Studio 配置为使用其他文件。

要检查哪些文件用于 Intellisense,请选择 XML->架构配置文件打开时。所有在 Use 中带有勾号的文件列用于智能感知。
<?xml version="1.0" encoding="us-ascii"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense"
elementFormDefault="qualified" attributeFormDefault="unqualified"
vs:helpNamespace="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<!-- Child elements omitted for brevity -->
</xs:schema>

在模式文件中的适当级别定义新元素
wsdlExtensions的合适级别行为扩展元素是 system.serviceModel/C/behaviors/C/endpointBehaviors/C/behavior/C哪里 CcomplexType/choice元素。
<?xml version="1.0" encoding="us-ascii"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense"
elementFormDefault="qualified" attributeFormDefault="unqualified"
vs:helpNamespace="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<!-- Omitted elements at various levels for brevity -->
<xs:element name="system.serviceModel" vs:help="configuration/system.serviceModel">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="behaviors" vs:help="configuration/system.serviceModel/behaviors">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="endpointBehaviors" vs:help="configuration/system.serviceModel/behaviors/endpointBehaviors">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="behavior" vs:help="configuration/system.serviceModel/behaviors/endpointBehaviors/behavior">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="wsdlExtensions" type="wsdlExtensions" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

关于WCFExtras - 元素行为具有无效的子元素 'wsdlExtensions' ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5560331/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com