I have a wsdl with various operations. I'm implementing using a single 
WebServiceProvider class. That's all working fine. However, I want to enable 
schema validation, so incoming requests are validated against the wsdl. If I 
try the obvious, like this:

        EndpointImpl ep = (EndpointImpl)Endpoint.create(new 
MyWebServiceProvider());
        ep.setWsdlLocation("test.wsdl");
        ep.publish(address);
        ep.getService().put("schema-validation-enabled", "true");

then the publish fails because it ends up in buildServiceFromWSDL(). If I try 
it this way:

        EndpointImpl ep = (EndpointImpl)Endpoint.create(new 
MyWebServiceProvider());
        ep.publish(address);
        ep.setWsdlLocation("test.wsdl");
        ep.getService().put("schema-validation-enabled", "true");

then the schema validation doesn't happen. I assume this is because 
setWsdlLocation doesn't really do anything useful *after* the endpoint is 
already published.

So, I'm thinking there must be a way to associate the wsdl (or at least its 
schema) with the endpoint, but not try to build the endpoint from the wsdl. Any 
suggestions?

Thanks,

Lee

Reply via email to