WSDL 文件中的 XML 命名空间错误

发布于 2024-09-19 19:21:27 字数 1160 浏览 2 评论 0原文

我有以下服务定义(不完整,但演示了错误。 Visual Studio 告诉我(从德语翻译)“在此架构命名空间中 http://schemas.xmlsoap.org/wsdl / 不可用”,位于我定义 OffertXML 的行。

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="TestOffertverwaltung"
 targetNamespace="urn:TestOffertverwaltung"
 xmlns:tns="urn:TestOffertverwaltung"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:types="urn:Test/types"
 xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
 xmlns="http://schemas.xmlsoap.org/wsdl/">

    <wsdl:types>

        <xsd:schema targetNamespace="urn:Test/types">

            <xsd:element name="OffertXML" type="string"/>
            <xsd:element name="OffertPDF" xmime:expectedContentTypes='image/jpeg' type="xmime:base64Binary"/>
            <xsd:element name="OffertMeta" type="string"/>
            <xsd:element name="OffertId" type="string"/>

        </xsd:schema>

    </wsdl:types>

<!-- ... -->
</wsdl:definitions>

I have the following service definition (incomplete, but demonstrates the error.
Visual Studio tells me (translated from german) "In this Schema Namespace http://schemas.xmlsoap.org/wsdl/ is not available" at the line where I define OffertXML.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="TestOffertverwaltung"
 targetNamespace="urn:TestOffertverwaltung"
 xmlns:tns="urn:TestOffertverwaltung"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:types="urn:Test/types"
 xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
 xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
 xmlns="http://schemas.xmlsoap.org/wsdl/">

    <wsdl:types>

        <xsd:schema targetNamespace="urn:Test/types">

            <xsd:element name="OffertXML" type="string"/>
            <xsd:element name="OffertPDF" xmime:expectedContentTypes='image/jpeg' type="xmime:base64Binary"/>
            <xsd:element name="OffertMeta" type="string"/>
            <xsd:element name="OffertId" type="string"/>

        </xsd:schema>

    </wsdl:types>

<!-- ... -->
</wsdl:definitions>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

黑白记忆 2024-09-26 19:21:27

您需要使用

type="xsd:string"

当前使用的类型将类型设置为默认命名空间中的字符串,即 http:// /schemas.xmlsoap.org/wsdl/string,因此这是一种不可用的类型。

You need to set your type with

type="xsd:string"

Currently use are setting the type to string in the default namespace which is http://schemas.xmlsoap.org/wsdl/string, hence which is a type which is not available.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文