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的请求与响应报 ...
随机推荐
- 数据绑定时(<%#Eval)单引号双引号嵌套问题
期望得到的HTML如下: onclick='edit("10000001")' 或者 onclick="edit('10000001')" 实际ASP.NET前 ...
- 自己修改的两个js文件
sea-base.js /** * Sea.js 2.2.3 | seajs.org/LICENSE.md */ (function(global, undefined) { // Avoid con ...
- 简单的聊天室代码php+swoole
php swoole+websocket 客户端代码 <!DOCTYPE html> <html> <head> <title></title&g ...
- 右键添加 CMD 命令提示符
# 右键添加 CMD 命令提示符 当然是修改注册表 - 打开注册表编辑器(按下Win+R打开运行对话框,输入regedit),找到[HKEY_CLASSES_ROOT/Folder/shell] ...
- R安装包
提取安装的报的版本号 installed.packages()[,c("Package","Version")] 查询按住哪个报的描述 library()
- codeforces 645 E. Intellectual Inquiry
一个字符串,由前k个字母组成,长度为m + n,其中前m个字符已经确定,后面n个由你自由选择, 使得这个串的不同的子序列的个数最多,空串也算一个子序列. 1 <= m <= 10^6,0 ...
- codeforces 练习
codeforces 627 D. Preorder Test 二分 + 树dp 做logn次树dp codeforces 578D.LCS Again 给出一个字符串str,长度n<=10^6 ...
- C# 自动部署之附加数据库
转自心存善念 原文 C# 自动部署之附加数据库 看着别人的网站能够自动安装,数据库自动附加,觉得很神奇很向往,但是始终米有去手动实践. 网上找了下资料,发现实现起来其实很简单 直接code priva ...
- Disruptor 极速体验
已经不记得最早接触到 Disruptor 是什么时候了,只记得发现它的时候它是以具有闪电般的速度被介绍的.于是在脑子里, Disruptor 和"闪电"一词关联了起来,然而却一直没 ...
- DevExpress TreeList 全选和反选 z
/// <summary> /// 全选树 /// </summary> /// <param name="tree">树控件</para ...