1

サードパーティから API 用に提供された xsd に問題があります。私が得るメッセージは次のとおりです:要素「メッセージ」の宣言が見つかりません

これが私のリクエストの最初の数行です。

<?xml version="1.0" encoding="UTF-8"?>
    <Message xmlns="http://www.surescripts.com/messaging" version="010" release="006" xmlns:xsi="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://aabrahams.staging.skycareehr.com/surescripts.xsd">
        <Header>
            --- more ---

そして、これが xsd の始まりです。

<?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns="http://www.surescripts.com/messaging" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.surescripts.com/messaging" elementFormDefault="qualified">
        <xs:element name="Message" type="MessageType"/>
            <xs:complexType name="MessageType">
                <xs:sequence>
                    <xs:element name="Header" type="HeaderType"/>
                        <xs:element name="Body" type="BodyType"/>
                    </xs:sequence>
                    --- More ---

助言がありますか?

4

1 に答える 1

1

(1)属性によって指定された XSDxsi:schemaLocationの形式が正しくありません: 1831 行目の終了タグ に文字/xs:element>がありません<。そこで修正するか、ローカルにコピーして修正します。

(2) XML ファイルで、次のように変更します。

xmlns:xsi="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

(3) XML ファイルでも、次のように変更します。

xsi:schemaLocation="http://aabrahams.staging.skycareehr.com/surescripts.xsd"

xsi:schemaLocation="http://www.surescripts.com/messaging surescripts.xsd"

http://aabrahams.staging.skycareehr.com/surescripts.xsd(または、直接修正できた場合は、これにすることができます:)

xsi:schemaLocation="http://www.surescripts.com/messaging http://aabrahams.staging.skycareehr.com/surescripts.xsd"

[これで解決するはずですが、他に問題がある場合は、以下にコメントしてください。対処します。]

于 2013-11-01T23:10:32.020 に答える