webservice
来源:互联网 发布:如何查看java字节码 编辑:程序博客网 时间:2024/05/09 13:00
在最近的项目中需要做一个webservice的客户端,为了方便,我使用cxf工具自动生成客户端。
1,首先,我从官网上下载了cxf的工具包。解压之后,从cmd进入cxf的bin目录,运行以下命令
结果报路径找不到,经过研究发现,是JDK版本问题,CXF生成工具需要JDK1.5的运行环境,而我的是JDK1.7。更换JDK版本后重新执行以上命令成功的生成了客户端代码。
2,将生成的代码放到工程下,结果发现super相关代码编译报错。开始以为是缺包,结果试着添加了很多的包也没能好使。
- //This
constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 -
jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 -
code instead. -
IcpBusinessService(WebServiceFeature ... features) { -
SERVICE, features); -
} -
-
constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 -
jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 -
code instead. -
IcpBusinessService(URL wsdlLocation, WebServiceFeature ... features) { -
SERVICE, features); -
} -
-
constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 -
jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 -
code instead. -
IcpBusinessService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) { -
serviceName, features); -
}
最后发现,其不能正常编译通过是由于jax-ws2.2规约与java6冲突。但程序又不能仅以java5来编译,故需要降低jax-ws规约版本,可以这样处理:
wsdl2java -frontend jaxws21 -client *.xml
在最近的项目中需要做一个webservice的客户端,为了方便,我使用cxf工具自动生成客户端。
1,首先,我从官网上下载了cxf的工具包。解压之后,从cmd进入cxf的bin目录,运行以下命令
结果报路径找不到,经过研究发现,是JDK版本问题,CXF生成工具需要JDK1.5的运行环境,而我的是JDK1.7。更换JDK版本后重新执行以上命令成功的生成了客户端代码。
2,将生成的代码放到工程下,结果发现super相关代码编译报错。开始以为是缺包,结果试着添加了很多的包也没能好使。
- //This
constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 -
jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 -
code instead. -
IcpBusinessService(WebServiceFeature ... features) { -
SERVICE, features); -
} -
-
constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 -
jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 -
code instead. -
IcpBusinessService(URL wsdlLocation, WebServiceFeature ... features) { -
SERVICE, features); -
} -
-
constructor requires JAX-WS API 2.2. You will need to endorse the 2.2 -
jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1 -
code instead. -
IcpBusinessService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) { -
serviceName, features); -
}
最后发现,其不能正常编译通过是由于jax-ws2.2规约与java6冲突。但程序又不能仅以java5来编译,故需要降低jax-ws规约版本,可以这样处理:
wsdl2java -frontend jaxws21 -client *.xml
- WebService
- WebService
- webservice
- webservice
- WebService
- webservice
- webService
- WebService
- WebService
- webService
- WEBService
- webService
- WebService
- [WebService]
- webservice
- WebService
- webservice
- WebService
- MySQL外键:数据库新手入门之MySQL中如何定义外键
- CCLableTTF 文字描边
- 关于商业的视频聊天开发SDK包
- Android Broadcast机制深入解析
- 往数据库里面写blob字段数据
- webservice
- Extjs之Combobox两级联动使用
- poj2299
- ORACLE11G用户密码过期问题,解决方法
- android strings.xml转义字符, 注意细节解决
- 鲶鱼效应
- wpf2样式(3)
- 从oracle中读取blob字段
- 关于getchar()