First i created a webservice for simple get and set method and published that web service successfully. After that i created a websevice which have methods to insert and search data from oracle database using jdbc connection but when i am trying to publish this web service i am getting following error
Exception in thread "main" Server Runtime Error: javax.xml.ws.WebServiceException
at com.sun.xml.internal.ws.transport.http.server.HttpEndpoint.publish(Unknown Source)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(Unknown Source)
at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(Unknown Source)
at javax.xml.ws.Endpoint.publish(Unknown Source)
at com.bizmonks.services.BizMonksWSPublish.main(BizMonksWSPublish.java:10)
Caused by: javax.xml.ws.WebServiceException
at com.sun.xml.internal.ws.model.RuntimeModel.createJAXBContext(Unknown Source)
at com.sun.xml.internal.ws.model.RuntimeModel.postProcess(Unknown Source)
at com.sun.xml.internal.ws.modeler.RuntimeModeler.buildRuntimeModel(Unknown Source)
at com.sun.xml.internal.ws.server.RuntimeEndpointInfo.createSEIModel(Unknown Source)
at com.sun.xml.internal.ws.server.RuntimeEndpointInfo.init(Unknown Source)
at com.sun.xml.internal.ws.transport.http.server.HttpEndpoint.publish(Unknown Source)
... 5 more
Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.sql.Connection is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at java.sql.Connection
at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(Unknown Source)
at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.xml.internal.bind.api.JAXBRIContext.newInstance(Unknown Source)
at com.sun.xml.internal.ws.model.RuntimeModel$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 11 more
Could you please help me? I am not able to find out where i am doing wrong. thanks in advance.