Hi in openejb-jar.xml you can set as property of your bean the property called "cxf.jaxws.properties". The value will be an id of a Service in resources.xml.
-> openejb-jar.xml (in WEB-INF): <openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1"> <ejb-deployment ejb-name="MyService"> <properties> cxf.jaxws.properties = validProp </properties> </ejb-deployment> </openejb-jar> -> resources.xml (in WEB-INF): <resources> <Service id="validProp"> schema-validation-enabled = true </Service> </resources> Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2013/10/23 romych <[email protected]>: > I am using pure Tomee 1.5.2 to write EJB service with WS frontend.How i can > to configure "build-in" CXF to validate all incoming requests by original > WSDL/XSD schemas?Documentation on CXF recommend to do it with next > configuration part in beans.xml: > <beans xmlns="http://java.sun.com/xml/ns/javaee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:jaxws="http://cxf.apache.org/jaxws" > xmlns="http://www.springframework.org/schema/beans" > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/beans_1_0.xsd > http://cxf.apache.org/jaxws > http://cxf.apache.org/schemas/jaxws.xsd"><jaxws:endpoint > name="{http://mycompany.ru/svc/}MyService" > wsdlLocation="wsdl/MyService.wsdl" createdFromAPI="true"> > <jaxws:properties> <entry key="schema-validation-enabled" > value="true" /> </jaxws:properties></jaxws:endpoint> > But I think it is ignored. No any related messages on any log files. All > works, but without validation.My bean: > @Stateless@WebService(serviceName = "MyService", portName = > "MyServicePort", endpointInterface = "ru.mycompany.MyServiceWs", > targetNamespace = "http://mycompany.ru/svc/")@HandlerChain(file = > "handlers.xml")//@SchemaValidation(type = > SchemaValidation.SchemaValidationType.IN)public class MyService implements > MyServiceWs {...} > My WS interface: > @WebService(name = "ClientProfileService", targetNamespace = > "http://mycompany.ru/svc/")@SOAPBinding(parameterStyle = > SOAPBinding.ParameterStyle.BARE)@XmlSeeAlso({ ObjectFactory.class})public > interface MyServiceWs { ...} > May be I will place jaxws endpoint configuration somewhere else? > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/CXF-and-validation-by-schema-tp4665708.html > Sent from the OpenEJB User mailing list archive at Nabble.com.
