0

SOAPリクエストからデータを取得するために(WSDL内に)xsdファイルを作成しようとしています。私は期待される石鹸のリクエストを持っています:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
    <m:upsertEntity xmlns:m="http://www.boomi.com/connector/wss">
        <eTimeRequest>
            <ObjectType>String</ObjectType>
            <Action>String</Action>
            <eTimeID>String</eTimeID>
            <OperativeID>String</OperativeID>
        </eTimeRequest>
    </m:upsertEntity>
</SOAP-ENV:Body>

これが私が試したことです。あなたは<xs:ComplexType>別のものの中に持つことはできません。参照アプローチを試しましたが、どうやらそれを使ってSOAPリクエストを実行しようとすると、無効でした。私に何ができる?

WSDL内のXSDは次のとおりです。

    <xs:schema elementFormDefault="qualified" targetNamespace="http://www.boomi.com/connector/wss">
        <xs:element name="eTimeRequest" type="eTimeRequest"/>
        <xs:complexType name="eTimeRequest">
            <xs:sequence>
                <xs:element maxOccurs="1" minOccurs="0" name="ObjectType" type="xs:string"/>
                <xs:element maxOccurs="1" minOccurs="0" name="Action" type="xs:string"/>
                <xs:element maxOccurs="1" minOccurs="0" name="eTimeID" type="xs:string"/>
                <xs:element maxOccurs="1" minOccurs="0" name="OperativeID" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>

        <xs:element name="upsertEntity" type="tns:upsertEntity"/>
        <xs:complexType name="upsertEntity">
            <xs:sequence>
                <xs:element minOccurs="0" type="eTimeRequest"/> <!-- These should be the ObjectType, Action, eTimeID and OperativeID in here -->
            </xs:sequence>
        </xs:complexType>

    </xs:schema>

編集 私がリンクしたコードで私が気付いたもう一つのことは、私がではType="eTimeRequest"なくを使用したことでしref="eTimeRequest"た。とはいえ、それでも無効です。検証時に表示されるエラーメッセージは次のとおりです。

無効なXMLスキーマ:「eTimeRequest」は既存の要素を参照する必要があります。

4

1 に答える 1

0

これを読んだ方はごめんなさい。私は明らかにXSDコードに間違いを犯し、そうすることで時間を無駄にしました。

それは本当です、では <xs:ComplexType>許可されていません<xs:ComplexType><xs:Element>含む<xs:ComplexType> ことはで許可されてい<xs:ComplexType>ます。したがって、生成された元のSOAP要求は無効でした。私は私たちのシステムを通して新しいバージョンを実行しました、そしてそれは働きました。

WSDLの正しいXSDスキーマは次のようになっているはずです。

<xs:schema elementFormDefault="qualified" targetNamespace="http://www.boomi.com/connector/wss">
    <xs:element name="upsertEntity" type="tns:upsertEntity"/>           
    <xs:complexType  name="upsertEntity">
        <xs:sequence>
            <xs:element name="eTimeRequest">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element maxOccurs="1" minOccurs="0" name="ObjectType" type="xs:string"/>
                        <xs:element maxOccurs="1" minOccurs="0" name="Action" type="xs:string"/>
                        <xs:element maxOccurs="1" minOccurs="0" name="eTimeID" type="xs:string"/>
                        <xs:element maxOccurs="1" minOccurs="0" name="OperativeID" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>           
</xs:schema>
于 2013-01-16T12:37:16.890 に答える