0

この wsdl 内のスキーマに対して SOAP 要求を検証したいと考えています。

<wsdl:types >
    <xsd:schema targetNamespace="http://ws.thecompany.com/FormSubmissionService20100824" 
                xmlns:request="http://xmlschema.thecompany.com/generic/FormHeader20100824" xmlns:response="http://xmlschema.thecompany.com/generic/FormResponse20100824">

        <xsd:import namespace="http://xmlschema.thecompany.com/generic/FormHeader20100824" schemaLocation="../schema/generic/FormHeader20100824.xsd"/>
        <xsd:import namespace="http://xmlschema.thecompany.com/generic/FormResponse20100824" schemaLocation="../schema/generic/FormResponse20100824.xsd"/>

        <xsd:element name="submitFormRequest" type="request:FormHeader"/>
        <xsd:element name="submitFormResponse" type="response:FormResponse"/>

        </xsd:schema>
</wsdl:types>

<!-- Message Definition -->
<wsdl:message name="submitFormRequest">
    <wsdl:part element="thecomp:submitFormRequest" name="request" />
</wsdl:message> 

javax.xml.validation.Validator要素に対して検証するスキーマのロードは< thecomp:submitFormRequest>機能せず、wsdl をスキーマとしてロードしようとしても機能しません。

アイデアをお願いします。(jax-ws、was7 を使用)

乾杯

4

1 に答える 1

0

リクエスト/レスポンスを独自のスキーマ ファイルに抽出しました。

    <wsdl:types > 
    <xsd:schema>
        <xsd:import namespace="http://ws.acc.co.nz/ACCFormSubmissionService20100824" 
                schemaLocation="../schema/ws/ACCFormSubmissionService20100824.xsd" />
    </xsd:schema>               
</wsdl:types>

新しいスキーマの名前空間/xsd に対する検証は、必要に応じて機能します。

于 2010-11-01T01:57:14.310 に答える