title: org.w3c.dom.Document is an interface, and JAXB can't handle interfaces
body: <p>How should i fix this issue. I have been struggling with this for a day now and haven't made any progress. Any help would be appreciated.
  Thanks.</p>
  
  <p>StackTrace: 
  <code>12-Dec-2013 13:34:15.645 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mipStatus': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:388)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
      at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:369)
      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:537)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
      ... 26 more
      Caused by: org.apache.cxf.service.factory.ServiceConstructionException
      at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:332)
      at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:478)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:540)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
      at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
      at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
      at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
      at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:454)
      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
      ... 35 more
      Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
      org.w3c.dom.Document is an interface, and JAXB can't handle interfaces.
      this problem is related to the following location:
          at org.w3c.dom.Document
          at private org.w3c.dom.Document com.abc.webservice.jaxws_asm.TakeXmlDoc.xmlDoc
          at com.abc.webservice.jaxws_asm.TakeXmlDoc
      at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:106)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:466)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.&lt;init&gt;(JAXBContextImpl.java:298)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.&lt;init&gt;(JAXBContextImpl.java:141)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1163)
      at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:145)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:248)
      at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:235)
      at javax.xml.bind.ContextFinder.find(ContextFinder.java:432)
      at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637)
      at org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:267)
      at org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:265)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.cxf.common.jaxb.JAXBContextCache.createContext(JAXBContextCache.java:265)
      at org.apache.cxf.common.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:172)
      at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:464)
      at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:330)
      ... 46 more</code></p>
  
  <p>Code: </p>
  
  <pre><code>    package com.abc.webservice.impl;
  import javax.jws.WebService;
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.w3c.dom.Document;
  import com.abc.model.Agent;
  import com.abc.model.AuthHeader;
  import com.abc.webservice.MipStatusWebService;
  import com.abc.webservice.ProducerWebService;
  @WebService(endpointInterface="com.abc.webservice.MipStatusWebService",
      targetNamespace="http://tempuri.org")
  public class MipStatusWebServiceImpl implements MipStatusWebService {
  
    public static final Log log = LogFactory.getLog(MipStatusWebServiceImpl.class);
  
    public Document TakeXmlDoc(AuthHeader authHeader, Document xmlDoc) throws Exception {
      log.info("Inside TakeXmlDoc() with authHeader:-"+authHeader+" xmlDoc:-"+xmlDoc);
      return producerWebService.SyncScreeningStatus(Agent.MIP_NAME, xmlDoc);
    }
  
    private ProducerWebService producerWebService;
    public void setProducerWebService(ProducerWebService producerWebService){
      this.producerWebService = producerWebService;
    }  
  }
  </code></pre>
  
  <p>springcontext file:</p>
  
  <pre><code>    &lt;bean id="mipStatusWebService"
          class="com.abc.webservice.impl.MipStatusWebServiceImpl"&gt;
          &lt;property name="producerWebService" ref="producerWebService" /&gt;
      &lt;/bean&gt;
      &lt;jaxws:endpoint id="mipStatus"
          implementorClass="com.abc.webservice.MipStatusWebService"
          implementor="#mipStatusWebService" address="/MipStatusService"&gt;
          &lt;!--jaxws:serviceFactory&gt;
              &lt;ref bean="jaxws-and-aegis-service-factory" /&gt;
          &lt;/jaxws:serviceFactory--&gt;
      &lt;/jaxws:endpoint&gt;
  </code></pre>
  
  <p>That's what i have.
  Trying to deploy it using tomcat but it is failing with the mentioned error.
  NOTE: Updated content.</p>