我想发布一个方法,它返回List<Cookie>,Cookie不是我自定义的对象,而是apache的httpclinet组件里的一个接口:org.apache.http.cookie.Cookie
我使用Endpoint.publish()来发布我的webservice时,报如下错误:
Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
org.apache.http.cookie.Cookie is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at org.apache.http.cookie.Cookie
at public org.apache.http.cookie.Cookie
at public java.util.List com.afk.weibo.webservice.jaxws.GetUserCookieResponse._return
at com.afk.weibo.webservice.jaxws.GetUserCookieResponse
org.apache.http.cookie.Cookie does not have a no-arg default constructor.
this problem is related to the following location:
at org.apache.http.cookie.Cookie
at public org.apache.http.cookie.Cookie com.afk.weibo.webservice.CookieDto.getCookie()
at com.afk.weibo.webservice.CookieDto
at public java.util.List com.afk.weibo.webservice.jaxws.GetUserCookieResponse._return
at com.afk.weibo.webservice.jaxws.GetUserCookieResponse
at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:91)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:436)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:277)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1100)
at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:143)
at com.sun.xml.internal.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:95)
at com.sun.xml.internal.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:97)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:148)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:140)
... 18 more
我在网上搜了下,没啥解决办法,这种问题改如何解决啊。。。
相关推荐
基于jax-ws 实现的web service client和server端的demo程序。 注:如果使用的是 myeclipse 时 server 部署到tomcat 启动的时候会报错 解决办法:找到myeclipse安装目录下的 plugins 目录里 查找 webservices-rt.jar,...
MyEclipse8_0中使用 JAX-WS 部署 WebService 实例 - 外衣 - 博客频道 - CSDN_NET.mht
使用JAX-WS(JWS)发布WebService 使用myeclipse开发java的webservice的两种方式 方式一: (此方式只能作为调试,有以下bug:jdk1.6u17?以下编译器不支持以Endpoint.publish方式发布document方式的soap,必须在...
JAX-WS使用教程 1、JAX-WS概述 2、创建Web Service 2.1 从java开始 2.1.1 运行wsgen 2.1.2 生成的WSDL和XSD 2.1.3 目录结构 2.2 从WSDL开始 2.2.1 运行wsimport 2.2.2 生成的java代码 2.3发布Web ...
JAX-WS 2.2 RI 所包含的JAR包集合,包含25个JAR包,列表如下: FastInoset.jar gmbal-api-only.jar ha-api.jar javax.annotation.jar javax.mail_1.4.jar jaxb-api.jar jaxb-impl.jar jaxb-xjc.jar jaxws-api...
rar中包含整个项目的源码和数据库生成脚本,采用jax-ws发布Web Service服务,支持java客户端和.Net客户端调用,数据库采用oracle10g,里面有创建数据库脚本文件createTable_Oracle10g.sql,由于Hibernate映射表中会...
亲测可用,Jax-ws所需要的JAR包,拷贝到tomcat安装路径的lib里,实现了webservice发布到tomcat,赞!
webService部署tomcat需要的jax-ws 的完整jar包
The Java API for XML Web Services (JAX-WS) is a Java programming language API for creating web services, particularly SOAP services. JAX-WS is one of the Java XML programming APIs. It's a part of the ...
JAX-WS方式开发和部署webservice应用,JAX-WS方式开发和部署webservice应用,JAX-WS方式开发和部署webservice应用,JAX-WS方式开发和部署webservice应用,JAX-WS方式开发和部署webservice应用
JAX-WS2.0 API
javax.xml.ws.Service 报错需要的包,亲测可以用,直接下载在ide里buildpath一下就可以,四个jar包 ,整合了其他的jar所以配置简单
以jdk1.6以上自带的jax-ws来发布webservice,压缩包里包含服务端和客户端,下载导入即可启动运行测试,有疑问的话欢迎咨询哈
Jax-WS的简单实例 Jax-WS的简单实例
jax-ws webservice完整demo,包含所有jax-ws 2.2jar包。
JAX-WS在Tomcat中发布服务实例,同时在Handler中实现简单的授权校验。
JAX-WS 2.2 RI 所包含的JAR包集合,包含25个JAR包,列表如下: FastInoset.jar gmbal-api-only.jar ha-api.jar javax.annotation.jar javax.mail_1.4.jar jaxb-api.jar jaxb-impl.jar jaxb-xjc.jar jaxws-api...
如果基于一个JAX-WS进行WebService开发,有很多教程,但是具体怎么更自动地生成一些文件,实现客户端与服务端的交互,都讲得不大清楚,为了让大家更方便地部署,我将服务端、客户端文件的生成与部署全过程以及测试...
使用 Eclipse JavaEE 开发 WebService 时,若选择手动创建原生的JAX-WS服务,需要导入此jar资源(教程详见我的博文https://blog.csdn.net/weixin_50604409/article/details/116399530)。 如果您同时装有 IntelliJ ...
JAX-WS发布webservice例子,基于http://blog.csdn.net/yy_love_my/article/details/44938329所说的做的一个简单且能运行的列子,基于maven工程,如果使用servlet发布方式,执行命令:mvn tomcat7:run