WebServiceException
在用cxf做webservice的时候,在写客户端程序的时候,出现以下异常:
Could not find wsdl:binding operation info for web method test
Exception in thread "main" javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info for web method test.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:113)
at $Proxy29.test(Unknown Source)
at com.abc.test.UserTest.main(UserTest.java:10)
原因:无法接收(绑定)返回的类型
解决办法:在接受的类文件(接口)的上面加上一个annotation注解。
import javax.jws.WebService;
@WebService//很重要
public interface UserService {
public String test(String userName);
}
然后就OK了,有的webservice的方法上面还要添加“@WebMethod”注解才可以!
WebServiceException的更多相关文章
- WebService - [Debug] javax.xml.ws.WebServiceException: Undefined port type
背景: 使用JDK来开发java web service (Create a SOAP-based RPC style web service endpoint by using JAX-WS). 具 ...
- javax.xml.ws.webserviceexception class do not have a property of the name
我是用wsimport生成webservice 的客户端,放到工程里,调用,出现这个异常, 后来发现,是没有把package-info.java这个文件一起放到包里的缘故 解决: 连同package- ...
- cxf client端借口类型找不到问题
问题: log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.Exception in ...
- Java Classloader详解
一.Java中的class加载机制有以下三个特性: 1.全盘负责制 “全盘负责”是指当一个ClassLoader装载一个类时,除非显示地使用另一个ClassLoader,则该类所依赖及引用的类也由这 ...
- [WebService] the namespace on the "definitions" element, is not a valid SOAP version
公司对外通过webservice访问别人接口,对方webservice IP地址发生变化,切换过去之后,始终报错,在网上搜索了各种办法之后,暂时总结该问题几种可能解决办法,待真正解决时用的到. 异常详 ...
- WS调用的时候报错
报错内容javax.xml.ws.WebServiceException: Method recognizeIdentityCardByFilePath is exposed as WebMethod ...
- Java--RuntimeException(运行时异常)
[转载自]:http://blog.csdn.net/qq7342272/article/details/7940741 java运行时异常是可能在java虚拟机正常工作时抛出的异常. java提供了 ...
- java 小知识点
1.转Java中Vector和ArrayList的区别 首先看这两类都实现List接口,而List接口一共有三个实现类,分别是ArrayList.Vector和LinkedList.List用于存 ...
- webservice cxf error:类的两个属性具有相同名称 "password"
execption detail: Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.Servic ...
随机推荐
- Ajax缓存解决办法
解决办法有如下几种: 1.在服务端加 header("Cache-Control: no-cache, must-revalidate");(如php中) 2.在aja ...
- Android操作系统服务(Context.getSystemService() )
getSystemService是Android很重要的一个API,它是Activity的一个方法,根据传入的NAME来取得对应的Object,然后转换成相应的服务对象.下面介绍系统相应的服务: 传入 ...
- Android消息机制——时钟显示和异步处理工具类(AsyncTask)
1. 时钟显示 定义布局文件——activity_my_analog_clock_thread_demo.xml <?xml version="1.0" encoding=& ...
- Golang学习 - fmt 包
------------------------------------------------------------ // Print 将参数列表 a 中的各个参数转换为字符串并写入到标准输出中. ...
- Javascript操纵Cookie--转
引用地址:http://www.imkevinyang.com/2009/06/javascript%E6%93%8D%E7%BA%B5cookie.html 在讲如何使用Javascript操纵Co ...
- ubuntu thrift 0.9.3编译安装
Table of Contents 1. 下载thrift源代码 2. 编译并安装 3. 运行测试程序 4. 安装 1 下载thrift源代码 git clone https://git-wip-us ...
- docker 中运行 sshd 服务
创建Dockerfile # sshd # # VERSION 0.0.2 FROM ubuntu:14.04 MAINTAINER admln <admln@docker.com> RU ...
- C# 自定义重绘TextBox
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...
- Triangular Sums
描述 The nth Triangular number, T(n) = 1 + … + n, is the sum of the first n integers. It is the number ...
- js中的命名规范
在实际开发中规范的命名,不仅方便自己查看,理解变量的实际意义,而且在团队开发中也能提高开发效率. 下面将介绍javascript中的变量的命名规范: 1)首先,变量名要有实际意义,不建议使用单个的字母 ...