问题:

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端借口类型找不到问题的更多相关文章

  1. Linux下的C Socket编程 -- 简介与client端的处理

    Linux下的C Socket编程(一) 介绍 Socket是进程间通信的方式之一,是进程间的通信.这里说的进程并不一定是在同一台机器上也有可能是通过网络连接的不同机器上.只要他们之间建立起了sock ...

  2. Redis:安装、配置、操作和简单代码实例(C语言Client端)

    Redis:安装.配置.操作和简单代码实例(C语言Client端) - hj19870806的专栏 - 博客频道 - CSDN.NET Redis:安装.配置.操作和简单代码实例(C语言Client端 ...

  3. 使用gRPC搭建Server端与Client端

    gRPC简介 gRPC是一种RPC框架技术,采用Protocal Buffers(协议缓存) 作为其接口定义的语言(就是Proto来写接口)和基础的消息交换格式. 在gRPC中,客户端应用程序可以直接 ...

  4. elasticsearch源码分析之search模块(client端)

    elasticsearch源码分析之search模块(client端) 注意,我这里所说的都是通过rest api来做的搜索,所以对于接收到请求的节点,我姑且将之称之为client端,其主要的功能我们 ...

  5. 基于Netty和SpringBoot实现一个轻量级RPC框架-Client端请求响应同步化处理

    前提 前置文章: <基于Netty和SpringBoot实现一个轻量级RPC框架-协议篇> <基于Netty和SpringBoot实现一个轻量级RPC框架-Server篇> & ...

  6. XFire客户端调用CXF服务端(四)

    前面章节:http://www.cnblogs.com/xiehongwei/p/8082337.html 已经开发出了CXF服务端,现在用XFire开发客户端调用CXF服务端,代码如下: impor ...

  7. Python自动化之rabbitmq rpc client端代码分析(原创)

    RPC调用client端解析 import pika import uuid # 建立连接 class FibonacciRpcClient(object): def __init__(self): ...

  8. 用C#基于WCF创建TCP的Service供Client端调用

    本文将详细讲解用C#基于WCF创建TCP的Service供Client端调用的详细过程 1):首先创建一个Windows Service的工程 2):生成的代码工程结构如下所示 3):我们将Servi ...

  9. cxf client在后台不通且chunk设置为false的时候不能在控制台输出请求日志

    场景: 服务编排框架支持编排webservice服务.call webservice的client是基于cxf做的.为了使用服务编排的开发者调试与定位问题方便,需要将webservice的请求与响应报 ...

随机推荐

  1. PHP网页显示乱码问题总结

    其实,乱码,都是因为编码不统一的问题导致的. 以UTF-8编码为例: 第一步,确定数据库字段的编码,字符集:urt8 第二部,PHP脚本设置编码:header('Content-Type: text/ ...

  2. Hibernate5.2之QBC查询

                                                         Hibernate5.2值QBC查询 一.简介  Hibenate的QBC查询个人认为是Hib ...

  3. C++中三种new的用法

    转载自:http://news.ccidnet.com/art/32855/20100713/2114025_1.html 作者: mt 1 new operator,也叫new表达式:new表达式比 ...

  4. Cookie实现商品浏览记录--方式一:Java实现

    方式一:Java代码方式实现:此种方式实现思路较为顺畅.难点在于,如何实现将最近浏览的产品显示在最前面:实现方式是借助LinkedList提供的remove()方法,先将此id从列表中移除,然后再借助 ...

  5. I'm an artist who loves linux (转)

    My father got me a computer for graduation with 512MB RAM and a Pentium processor. It came with Wind ...

  6. Unsupported major.minor version 51.0解决办法

    问题: 之前使用的是高版本的myeclipse2015ci,然后换成了myeclipse10.5,之前的workspace的内容没有改变,结果工程都出现了感叹号,运行时提示 Unsupported m ...

  7. beagleBone black 中QT的移植

    收到板子后默认是Debian系统.gcc -v 后发现其编译链是:arm-linux-gnueabihf http://pan.baidu.com/s/1pJrAvsn 有相关工具下载,里面有这个 解 ...

  8. 新做的一个基于OPENGL的gui库

    #include <BGE/All> ,text);     button->setName(name);     button->setSize(Vector2f(,)); ...

  9. [转]javascript eval函数解析json数据时为什加上圆括号eval("("+data+")")

    javascript eval函数解析json数据时为什么 加上圆括号?为什么要 eval这里要添加 “("("+data+")");//”呢?   原因在于: ...

  10. 来自 Thoughtram 的 Angular 2 系列资料

    Angular 2 已经正式 Release 了,Thoughtram 已经发布了一系列的文档,对 Angular 2 的各个方面进行深入的阐释和说明. 我计划逐渐将这个系列翻译出来,以便对大家学习 ...