Web services JAX-wwweb服务中的模式验证

Web services JAX-wwweb服务中的模式验证,web-services,Web Services,我正在使用jax-ws和apachecxf以代码优先的方式开发web服务。我想在我的服务中启用架构验证。为此,我配置了cxf配置文件,如下所示 <jaxws:endpoint id="testService" implementorClass="com.test.impl.TestServiceImpl" implementor="#testServiceImpl" address="/testService"> <jaxws:serviceFactory> <r

我正在使用jax-ws和apachecxf以代码优先的方式开发web服务。我想在我的服务中启用架构验证。为此,我配置了cxf配置文件,如下所示

<jaxws:endpoint id="testService"
implementorClass="com.test.impl.TestServiceImpl"
implementor="#testServiceImpl"
 address="/testService">
<jaxws:serviceFactory>
<ref bean="jaxws-and-aegis-service-factory"/>
 </jaxws:serviceFactory>
<jaxws:properties>
 <entry key="schema-validation-enabled" value="true"/>
 </jaxws:properties>
 </jaxws:endpoint>

Service,

@WebService
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT,use=SOAPBinding.Use.LITERAL)

  public interface TestService {



 @WebMethod
String test(MyVo myVo) ;

}

但是在部署服务之后,wsdl看起来像

      <xsd:complexType name="MyVo">
     <xsd:sequence>
     <xsd:element minOccurs="0" name="name" nillable="true" type="xsd:string" />

     </xsd:sequence>
       </xsd:complexType>

根据文档,minOccurs应为1(因为required=true)

此外,我能够调用服务,而无需在MyVo对象中设置name属性。没有来自服务器的错误

我已经在jre\lib文件夹和jdk\lib文件夹中创建了一个认可的目录,并将jaxb-api-2.2.jar和jaxws-api-2.2.1.jar放在那里。仍然面临同样的问题。我正在使用jdk1.6.0_11

谢谢


请给我一些建议

有人能提供解决方案吗?
      <xsd:complexType name="MyVo">
     <xsd:sequence>
     <xsd:element minOccurs="0" name="name" nillable="true" type="xsd:string" />

     </xsd:sequence>
       </xsd:complexType>