根据 wsdl:types 内的架构验证 jaxws Soap 请求
我想要根据此 wsdl 内的模式验证肥皂请求。
<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
来针对 进行模式验证。 comp:submitFormRequest>
元素不起作用,尝试加载 wsdl 作为架构也不起作用。
请问有什么想法吗? (使用 jax-ws、was7)
干杯
I'm wanting to validate a soap request against the schema inside this wsdl.
<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>
Loading a javax.xml.validation.Validator
for the schema validating against a < thecomp:submitFormRequest>
element doesn't work, neither does attempting to load the wsdl as the schema.
Ideas please?
(using jax-ws, was7)
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将请求/响应提取到其自己的架构文件中:
根据新架构命名空间/xsd 进行验证按要求工作。
I extracted the request/response into its own schema file:
Validating against the new schema namespace/xsd works as required.