views:

39

answers:

1

I am trying to get schema validation working for a JAX-WS Web Service deployed on Weblogic 10.3.3.

According to the documentation, this should be as simple as adding the annotation "@SchemaValidation" to the endpoint class. However when I try this the following exception is thrown when the application is deployed:

Caused by: javax.xml.ws.WebServiceException: 
[email protected] 
(handler=class com.sun.xml.internal.ws.server.DraconianValidationErrorHandler)
is not recognizable, 
atleast one constructor of class com.sun.xml.internal.ws.developer.SchemaValidationFeature 
should be marked with @FeatureConstructor
at com.sun.xml.ws.binding.WebServiceFeatureList.getWebServiceFeatureBean(WebServiceFeatureList.java:169)
at com.sun.xml.ws.binding.WebServiceFeatureList.parseAnnotations(WebServiceFeatureList.java:141)

The error message is complaining that "com.sun.xml.internal.ws.developer.SchemaValidationFeature" does not have a constructor annotated with @FeatureConstructor. When I look at that class, it sure seems to have one:

  @com.sun.xml.internal.ws.api.FeatureConstructor(value={"handler"})
  public SchemaValidationFeature(java.lang.Class arg0);

I have googled around but cannot find any reference to this more than this fellow unfortunate soul who did not get any answers. It would be great if someone could point me in the right direction because at this moment I am stuck.

A: 

I have faced the same problem recently.

To overcome this, I added the tag

<validation-request>true</validation-request>

to the file weblogic-webservices.xml

This enabled SOAP request validation on the app-server.

XML Structure of weblogic-webservices.xml

Note : I have not been able to use the @SchemaValidation tag successfully, but the above way - works as expected.

Nishant