I have a java class that has a java.sql.Date attribute in it.
My web service is returning an array of these objects with java.sql.Date attribute.
When I try to create my web service definition file it says that the method cannot be exposed as java.sql.Date is not supported. In the SAP development manual it says it is supported.
Please help and let me know how I can get the object with java.sql.Date to be exposed in a web service.
java.sql.Date can't really be supported by the Web Service infrastructure, because it has no default constructor (parameterless constructor).
Each complex type needs not only to be serializable (including its inner members - except they are primitive types), but they also must have a default constructor, so that they can be constructed during unmashalling of the request/response, i.e. whenever a parameter is unmashalled in the request or a return value is unmashalled in the response, the default constructor of the complex type is called and then the getters/setters are called to fill in the members of the complex type.
java.sql.Date does not have a default constructor, hence it can't be supported by the Web Service infrastructure.