cxf client端借口类型找不到问题
问题:
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not find portType named {http://service.cxfc.com/}ITest
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:345)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:338)
at javax.xml.ws.Service.getPort(Service.java:188)
at com.cxfc.controller.MyTest.main(MyTest.java:23)
解决方法:
将消费端的接收接口@WebService改成@WebService(targetNamespace = "http://service.cxfs.com/", name = "ITest"),targetNamespace对应的就是出错显示上面蓝色的那段,不过这个targetNamespace并不对应服务提供端的targetNamespace,而是在下边服务提供端里边我全出来红色的那段
消费端的接收借口:
package com.cxfc.service; import java.util.List; import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style; import com.cxfc.entity.User; @WebService(targetNamespace = "http://service.cxfs.com/", name = "ITest")
@SOAPBinding(style = Style.RPC)
public interface ITest { public List<User> selectAllUser(); public java.lang.String selectString();
}
提供方服务端wsdl:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://impl.service.cxfs.com/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://schemas.xmlsoap.org/soap/http"
xmlns:ns1="http://service.cxfs.com/" name="TestImplService" targetNamespace="http://impl.service.cxfs.com/">
<wsdl:import location="http://192.168.3.53:8080/cxfservice/cxfservice/testServiceImpl?wsdl=ITest.wsdl" namespace="http://service.cxfs.com/"></wsdl:import>
<wsdl:binding name="TestImplServiceSoapBinding" type="ns1:ITest">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="selectAllUser">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="selectAllUser">
<soap:body namespace="http://service.cxfs.com/" use="literal"/>
</wsdl:input>
<wsdl:output name="selectAllUserResponse">
<soap:body namespace="http://service.cxfs.com/" use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="selectString">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="selectString">
<soap:body namespace="http://service.cxfs.com/" use="literal"/>
</wsdl:input>
<wsdl:output name="selectStringResponse">
<soap:body namespace="http://service.cxfs.com/" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestImplService">
<wsdl:port binding="tns:TestImplServiceSoapBinding" name="TestImplPort">
<soap:address location="http://192.168.3.53:8080/cxfservice/cxfservice/testServiceImpl"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
cxf client端借口类型找不到问题的更多相关文章
- Linux下的C Socket编程 -- 简介与client端的处理
Linux下的C Socket编程(一) 介绍 Socket是进程间通信的方式之一,是进程间的通信.这里说的进程并不一定是在同一台机器上也有可能是通过网络连接的不同机器上.只要他们之间建立起了sock ...
- Redis:安装、配置、操作和简单代码实例(C语言Client端)
Redis:安装.配置.操作和简单代码实例(C语言Client端) - hj19870806的专栏 - 博客频道 - CSDN.NET Redis:安装.配置.操作和简单代码实例(C语言Client端 ...
- 使用gRPC搭建Server端与Client端
gRPC简介 gRPC是一种RPC框架技术,采用Protocal Buffers(协议缓存) 作为其接口定义的语言(就是Proto来写接口)和基础的消息交换格式. 在gRPC中,客户端应用程序可以直接 ...
- elasticsearch源码分析之search模块(client端)
elasticsearch源码分析之search模块(client端) 注意,我这里所说的都是通过rest api来做的搜索,所以对于接收到请求的节点,我姑且将之称之为client端,其主要的功能我们 ...
- 基于Netty和SpringBoot实现一个轻量级RPC框架-Client端请求响应同步化处理
前提 前置文章: <基于Netty和SpringBoot实现一个轻量级RPC框架-协议篇> <基于Netty和SpringBoot实现一个轻量级RPC框架-Server篇> & ...
- XFire客户端调用CXF服务端(四)
前面章节:http://www.cnblogs.com/xiehongwei/p/8082337.html 已经开发出了CXF服务端,现在用XFire开发客户端调用CXF服务端,代码如下: impor ...
- Python自动化之rabbitmq rpc client端代码分析(原创)
RPC调用client端解析 import pika import uuid # 建立连接 class FibonacciRpcClient(object): def __init__(self): ...
- 用C#基于WCF创建TCP的Service供Client端调用
本文将详细讲解用C#基于WCF创建TCP的Service供Client端调用的详细过程 1):首先创建一个Windows Service的工程 2):生成的代码工程结构如下所示 3):我们将Servi ...
- cxf client在后台不通且chunk设置为false的时候不能在控制台输出请求日志
场景: 服务编排框架支持编排webservice服务.call webservice的client是基于cxf做的.为了使用服务编排的开发者调试与定位问题方便,需要将webservice的请求与响应报 ...
随机推荐
- 15、java中的内部类介绍
内部类顾名思义就是定义在类中的类,下面做一个简单介绍: 内部类的访问规则:1,内部类可以直接访问外部类中的成员,包括私有. 之所以可以直接访问外部类中的成员,是因为内部类中持有了一个外部类的引用,格式 ...
- go 版本 gRPC 环境搭建(3.0正式版)
之前装过 gRPC 的各个测试版本,有些残余的文件,正式版的安装和之前残留的清除整理如下: 安装 go 版本的 gRPC go 的安装略过.需要 go 1.5 以上版本. $ go version ...
- jQuery中关于height,innerWidth与outerWidth的区别
jQuery width() 和 height() 方法 width() 方法设置或返回元素的宽度(不包括内边距.边框或外边距). height() 方法设置或返回元素的高度(不包括内边距.边框或外边 ...
- oracle并发请求异常,运行时间超长(一般情况下锁表)
1.如果前台无法取消请求出现错误: 则后台更新 update fnd_concurrent_requests set status_code = 'X', phase_code = 'C' w ...
- Java 2D API - 1. 基本概念
Java 2D API扩展AWT包,对二维图形.文本及成像功能提供了支持,可用于开发复杂的界面.绘图软件和图像编辑器.Java 2D对象位于用户坐标空间(User coordinate space), ...
- Geodatabase数据模型
1 Geodatabase概念 Geodatabase是ArcInfo8引入的一种全新的面向对象的空间数据模型,是建立在DBMS之上的统一的.智能的空间数据模型.“统一”是指,Geodatabase ...
- Android工作学习第5天之TabHost实现菜单栏底部显示
TabHost是一个装载选项卡窗口的容器,实现分模块显示的效果.像新浪微博客户端.微信客户端都是使用tabehost组件来开发的. TabHost的组成: |---TabWidget:实现标签栏,可供 ...
- 《JavaScript高级程序设计》学习笔记(3)——变量、作用域和内存问题
欢迎关注本人的微信公众号"前端小填填",专注前端技术的基础和项目开发的学习. 本节内容对应<JavaScript高级程序设计>的第四章内容. 1.函数:通过函数可以封装 ...
- css3动画3
1.transition过渡动画 2.@keyframes关键帧动画,配合transform.animation使用
- clientWidth、offsetWidth和scrollWidth的区分
scrollWidth:对象的实际内容的宽度,不包边线宽度,会随对象中内容超过可视区后而变大. clientWidth:对象内容的可视区的宽度,不包滚动条等边线,会随对象显示大小的变化而改变. off ...