2010-10-20 56 views
0

我想驗證此wsdl中針對模式的soap請求。驗證wsdl中針對模式的jaxws 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> 

加載的架構驗證反對< thecomp:submitFormRequest>元素不工作javax.xml.validation.Validator,同樣沒有嘗試加載WSDL作爲模式。

想法請? (使用JAX-WS,was7)

乾杯

回答

0

我提取的請求/響應到它自己的模式文件:

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

驗證對新架構命名空間/ XSD的要求工作。