Spring + JAX-WS : ‘xxx’ is an interface, and JAXB can’t handle interfaces

Spring + JAX-WS : ‘xxx’ is an interface, and JAXB can’t handle interfaces 错误解决方法

错误栈:
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
demo.order.dao.ParamDao is an interface, and JAXB can‘t handle interfaces.
        this problem is related to the following location:
                at demo.order.dao.ParamDao
                at private demo.order.dao.ParamDao demo.jaxrs.server.jaxws_asm.SetParamDao.arg0
                at demo.jaxrs.server.jaxws_asm.SetParamDao
demo.order.dao.ParamDao does not have a no-arg default constructor.
        this problem is related to the following location:
                at demo.order.dao.ParamDao ....

解决方法:标记该方法为非web method
    private ParamDao paramDao;
    
    @WebMethod(exclude = true)
        public void setParamDao(ParamDao paramDao) {
                this.paramDao = paramDao;
        }

ref: http://www.mkyong.com/webservices/jax-ws/spring-jax-ws-xxx-is-an-interface-and-jaxb-cant-handle-interfaces/

时间: 2024-08-05 21:39:02

Spring + JAX-WS : ‘xxx’ is an interface, and JAXB can’t handle interfaces的相关文章

spring+jax 出现java.io.Serializable is an interface, and JAXB can't handle interfaces

spring+jax 出现java.io.Serializable is an interface, and JAXB can't handle interfaces 原因是我的webservice方法中   有一个BaseEntity虚类 public abstract class BaseEntity<ID extends Serializable> { public abstract ID getId(); public abstract void setId(ID id); 其中get

Wireshark设置interface 时提示“There are no interfaces on which a capture can be done ”

Wireshark设置interface 时提示“There are no interfaces on which a capture can be done ” 解决方法: 今天在电脑上安装了WIRESHARK软件,在设置interface 时提示"There are no interfaces on which a capture can be done"  提示没有任何一个网络接口准备好.此提示明显是不对的, 我的网卡明明可以正常上网,网络接口怎么会没有准备好呢?  想着应该是和

CXF结合spring发布WS服务,含SOAP services、RESTful services

1.访问:http://localhost:8088/sniperWS/services/查看有哪些服务,包含Available SOAP services.Available RESTful services 2.客户端调用RESTful services:http://localhost:8088/sniperWS/services/address/getSuggestions.query 调用示例:$.ajax({    url: "http://ip:port/sniperWS/serv

Spring 中 用 ${xxx} 读取properties文件的说明

properties 如果在 spring 中通过 PropertyPlaceholderConfigurer 加载,当spring 中需要 用到 properties 中的一些 key 和value 值时可以 利用 PorpertyPlaceholderConfiger 提供的$ 直接 取得. PorpertyPlaceholderConfiger 有一些常用的属性,在一些高级应用中,可能会用到 locations fileEncoding 属性文件的编码格式 order 文件中定义了多个Pr

关于JAX-WS的Unable to create JAXBContext错误

参考: http://53873039oycg.iteye.com/blog/1979421 今天学了下Jax-Ws的一个简单的例子,刚开始发布时遇到如下错误: Java代码 com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class com.test.service.jaxws.add is not found. Have you run APT to generate

Spring常用注解总结

传统的Spring做法是使用.xml文件来对bean进行注入或者是配置aop.事物,这么做有两个缺点:1.如果所有的内容都配置在.xml文件中,那么.xml文件将会十分庞大:如果按需求分开.xml文件,那么.xml文件又会非常多.总之这将导致配置文件的可读性与可维护性变得很低.2.在开发中在.java文件和.xml文件之间不断切换,是一件麻烦的事,同时这种思维上的不连贯也会降低开发的效率.为了解决这两个问题,Spring引入了注解,通过"@XXX"的方式,让注解与Java Bean紧密

Spring框架文档与API(4.3.6版本)

http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/ Table of Contents I. Overview of Spring Framework 1. Getting Started with Spring 2. Introduction to the Spring Framework 2.1. Dependency Injection and Inversion of Contr

spring整合axis2(最小配置化)的示例

http://blog.csdn.net/xinhaoluan/article/details/3605234 环境配置: spring-framework-3.2.7 axis2-1.6.2 tomcat-7.0.64 实现步骤: 1.eclipse新建Dynamic Web Project,本例工程名为:ws-sample 2.将spring-framework和axis2的lib加入工程中 3.编写测试服务: IHello.java(interface) package com.lichm

WebService-06-CXF与Spring集成

前言 自3月份到一家快递公司之后,就极少有时间来写博客了,进去的第一个周末就加班,做公司的开放平台,协助一个小伙伴写WebService接口,用的就是CXF,正好这个东西以前使用过.现在快7月了,以前写的东西,还木有写完,今天继续,将以前未写完的东西,写完整. 准备工作 这次的样例,都是在以前的基础上写的,主要贴出主要的代码,服务端和客户端都与Spring集成,使用了拦截器.Map数据类型等 服务端 共计写了四个服务,第一个主要说明服务端有多种发布方式,第二和第三实现类是相同的,区别在于第三个有