package at.gv.egovernment.moa.spss.server.webservice.impl; import javax.servlet.ServletConfig; import javax.xml.ws.Endpoint; import org.apache.cxf.Bus; import org.apache.cxf.BusFactory; import org.apache.cxf.transport.servlet.CXFNonSpringServlet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SimpleCXFNonSpringServlet extends CXFNonSpringServlet { private static final Logger logger = LoggerFactory.getLogger(SimpleCXFNonSpringServlet.class); /** * */ private static final long serialVersionUID = 8564433272673970611L; @Override public void loadBus(ServletConfig servletConfig) { super.loadBus(servletConfig); try { Bus bus = getBus(); bus.getInInterceptors().add(new PlainInputInterceptor()); BusFactory.setDefaultBus(bus); Endpoint signatureCreationEndpoint = Endpoint.publish("/SignatureCreation", new SignatureCreationServiceImpl()); if (signatureCreationEndpoint instanceof org.apache.cxf.endpoint.Endpoint) { org.apache.cxf.endpoint.Endpoint cxfSignatureCreationEndpoint = (org.apache.cxf.endpoint.Endpoint) signatureCreationEndpoint; cxfSignatureCreationEndpoint.getInInterceptors().add(new PlainInputInterceptor()); } signatureCreationEndpoint.getProperties().put("schema-validation-enabled", "true"); Endpoint signatureVerificationEndpoint = Endpoint.publish("/SignatureVerification", new SignatureVerificationServiceImpl()); if (signatureVerificationEndpoint instanceof org.apache.cxf.endpoint.Endpoint) { org.apache.cxf.endpoint.Endpoint cxfSignatureVerificationEndpoint = (org.apache.cxf.endpoint.Endpoint) signatureVerificationEndpoint; cxfSignatureVerificationEndpoint.getInInterceptors().add(new PlainInputInterceptor()); } //signatureVerificationEndpoint.getProperties().put("schema-validation-enabled", "true"); } catch (Throwable e) { logger.error("Failed to setup CXF", e); } } }