execption detail:

 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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1614)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
... 42 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)
... 51 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
类的两个属性具有相同名称 "appno"
this problem is related to the following location:
at public java.lang.String com.taiping.svc.bean.CardPasswardCheckMessageDTO.getAppno()
at com.taiping.svc.bean.CardPasswardCheckMessageDTO
at private com.taiping.svc.bean.CardPasswardCheckMessageDTO com.taiping.svc.webservice.jaxws_asm.CardPasswardCheck.cardPasswardCheckMessageDTO
at com.taiping.svc.webservice.jaxws_asm.CardPasswardCheck
this problem is related to the following location:
at protected java.lang.String com.taiping.svc.bean.CardPasswardCheckMessageDTO.appno
at com.taiping.svc.bean.CardPasswardCheckMessageDTO
at private com.taiping.svc.bean.CardPasswardCheckMessageDTO com.taiping.svc.webservice.jaxws_asm.CardPasswardCheck.cardPasswardCheckMessageDTO
at com.taiping.svc.webservice.jaxws_asm.CardPasswardCheck
类的两个属性具有相同名称 "password"
this problem is related to the following location:
at public java.lang.String com.taiping.svc.bean.CardPasswardCheckMessageDTO.getPassword()
at com.taiping.svc.bean.CardPasswardCheckMessageDTO
at private com.taiping.svc.bean.CardPasswardCheckMessageDTO com.taiping.svc.webservice.jaxws_asm.CardPasswardCheck.cardPasswardCheckMessageDTO
at com.taiping.svc.webservice.jaxws_asm.CardPasswardCheck
this problem is related to the following location:
at protected java.lang.String com.taiping.svc.bean.CardPasswardCheckMessageDTO.password
at com.taiping.svc.bean.CardPasswardCheckMessageDTO
at private com.taiping.svc.bean.CardPasswardCheckMessageDTO com.taiping.svc.webservice.jaxws_asm.CardPasswardCheck.cardPasswardCheckMessageDTO
at com.taiping.svc.webservice.jaxws_asm.CardPasswardCheck

解决方法:

com.taiping.svc.bean.CardPasswardCheckMessageDTO

该类本来是这么定义的:

 @XmlRootElement(name = "REQUEST")
public class CardPasswardCheckMessageDTO { @XmlElement(name = "app_no")
protected String appno; @XmlElement(name = "password")
protected String password; public String getAppno() {
return appno;
} public void setAppno(String appno) {
this.appno = appno;
} public String getPassword() {
return password;
} public void setPassword(String password) {
this.password = password;
}
}

改为:

 @XmlRootElement(name = "REQUEST")
public class CardPasswardCheckMessageDTO { protected String appno; protected String password; public String getAppno() {
return appno;
} @XmlElement(name = "app_no")
public void setAppno(String appno) {
this.appno = appno;
} public String getPassword() {
return password;
} @XmlElement(name = "password")
public void setPassword(String password) {
this.password = password;
}
}

马上OK!

webservice cxf error:类的两个属性具有相同名称 "password"的更多相关文章

  1. JAXB "有两个名为 "**" 的属性,类的两个属性具有相同名称 "**""解决方案

    这里说的名称冲突指的是: JavaBean 属性名称与字段名称之间的名称冲突.在pojo类中的setter和getter方法会导致运行报错:Exception in thread "main ...

  2. srping mvc 集成CXF 导致类初始化两遍

    cxf依赖于spring的ContextLoaderListener,而spring mvc 则依赖于DispatcherServlet. 初始化DispatcherServlet的时候会依赖初始化一 ...

  3. webservice cxf error:org.apache.cxf.interceptor.Fault: Unmarshalling Error: 意外的元素 (uri:"", local:"ca

    服务器端webservice接口 需要定义@WebParam,如: public ReturnDTO cardBatchSyn(@WebParam(name = "cardBatchSynM ...

  4. webservice cxf error:java.lang.IllegalArgumentException: Argument(s) "type" can't be null.

    客户端请求DTO和服务器端的DTO定义不一样,客户端必须定义@XmlAccessorType和@XmlType,如: @XmlAccessorType(XmlAccessType.FIELD) @Xm ...

  5. 定义一个复数(z=x+iy)类Complex,包含: 两个属性:实部x和虚部y 默认构造函数 Complex(),设置x=0,y=0 构造函数:Complex(int i,int j) 显示复数的方法:showComp()将其显示为如: 5+8i或5-8i 的形式。 求两个复数的和的方法:(参数是两个复数类对象,返回值是复数类对象)public Complex addComp(Compl

    因标题框有限,题目未显示完整,以下再放一份: 定义一个复数(z=x+iy)类Complex,包含: 两个属性:实部x和虚部y 默认构造函数 Complex(),设置x=0,y=0 构造函数:Compl ...

  6. webservice(CXF)基于3.1.1版本实例

    引言 有没有一种办法可以实现跨应用程序进行通信和跨平台进行通信呢? 换句话说,就是有什么办法可以实现我的应用程序 A 可以和应用程序 B 进行通信呢? 或者说是,我用 Java 写的应用程序和用 . ...

  7. webservice -- cxf客户端调用axis2服务端

    背景: 有个项目, 需要由第三方提供用户信息, 实现用户同步操作, 对方给提供webservice接口(axis2实现)并也使用axis2作主客户端调用我方提供的webservice接口 起初, 由于 ...

  8. 3.3 C++改变基类成员在派生类中的访问属性

    参考:http://www.weixueyuan.net/view/6360.html 总结: 使用using声明可以改变基类成员在派生类中的访问属性. private: using book::se ...

  9. WebService—CXF—实现接口发布和客户端调用

    (一)接口发布的几种方式 定义接口: @WebService(targetNamespace="http://www.itfad.net/queryUser") public in ...

随机推荐

  1. 项目重新部署后报The attribute required is undefined for the annotation type XmlElementRef

    在另外一台机器上部署项目,项目导进Eclipse中发现有异常 public class BooleanFeatureType extends FeatureBaseType{ @XmlElementR ...

  2. Apache配置文件httpd.conf内容翻译

      本文已经废弃,现在apache2不依靠httpd.conf来配置. Ubuntu下默认的配置文件是/etc/apache2/sites-available/default 可以修改上面文件来修改a ...

  3. SLAM学习笔记(1)基本概念

    SLAM (simultaneous localization and mapping),也称为CML (Concurrent Mapping and Localization), 即时定位与地图构建 ...

  4. postgresql 死锁处理

    缘起 遇到一个奇怪的现象,select和delete表时正常执行,但truncate和drop表时会一直运行,也不报错. 原因 "drop table " 和 "trun ...

  5. PostgreSQL中字符串相关问题

    PostgreSQL的字符串类型有character.character varying和text的值.在使用character类型的时候, 它有自动填充空白的潜在影响,特别是在其它数据库(MySQL ...

  6. Lintcode: Minimum Subarray

    Given an array of integers, find the subarray with smallest sum. Return the sum of the subarray. Hav ...

  7. Lintcode: Maximum Subarray III

    Given an array of integers and a number k, find k non-overlapping subarrays which have the largest s ...

  8. HDU 1890 区间反转

    http://acm.hdu.edu.cn/showproblem.php?pid=1890 Robotic Sort Problem Description Somewhere deep in th ...

  9. yii中sphinx,Ajax搜索分页

    效果图: 控制器: <?phpnamespace backend\controllers; use Yii;use yii\web\Controller;use yii\data\Paginat ...

  10. bzoj3192 [JLOI2013]删除物品

    用数组表示两个栈,将两个栈的栈顶并在一起,用树状数组维护一下操作即可. 代码 #include<cstdio> #include<algorithm> #include< ...