I am playing around with a simple webservice JAX-WS without using any fancy tools ( no usage of CXF or Metro etc )
I am using inbuilt support provided by JDK 1.6.x to create this web service ( JAX-WS RI 2.1.6 in JDK 6 )
My question - I would like to introduce validations in my web service so I thought I would use the "@SchemaValidation"
Tried importing it as well - but code fails to compile
Snapshot of my code:
package com.mkyong.ws;
import javax.jws.WebService;
**import com.sun.xml.ws.developer.SchemaValidation;**
@WebService(endpointInterface = "com.mkyong.ws.HelloWorld")
**@SchemaValidation()**
public class HelloWorldImpl implements HelloWorld{
While compiling I get the exception :
javac com\mkyong\ws\HelloWorldImpl.java
com\mkyong\ws\HelloWorldImpl.java:3: package com.sun.xml.ws.developer does not exist
import com.sun.xml.ws.developer.SchemaValidation;
^
com\mkyong\ws\HelloWorldImpl.java:8: cannot find symbol
symbol: class SchemaValidation
@SchemaValidation()
^
2 errors
So my question is : Can we not use this annotation with JDK1.6 implementation of RI ? Do I need to import any special jar's in my classpath ? Thanks, satish