1 在maven项目中配置代理对象远程调用crm

1.1 在项目的pom.xml中引入CXF的依赖

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.0.1</version>
</dependency>

1.2 使用wsimport命令解析wsdl文件生成本地代码,只需要接口文件和实体类

命令为:wsimport -s . -p com.javaweb.crm http://ip:port/service/service?wsdl

其中-p表示命名一个文件包名

1.3 在spring配置文件中注册crm客户端代理对象

需要导入约束:

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:soap="http://cxf.apache.org/bindings/soap"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://cxf.apache.org/bindings/soap
http://cxf.apache.org/schemas/configuration/soap.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
<!-- 注册crm客户端代理对象 -->
<jaxws:client id="crmClient" serviceClass="com.javaweb.crm.ICustomerService" address="http://ip:prot/crm_javaweb/service/service" />

1.4 通过注解方式将代理对象注入action

在maven项目中 配置代理对象远程调用crm的更多相关文章

  1. JAVAEE——BOS物流项目08:配置代理对象远程调用crm服务、查看定区中包含的分区、查看定区关联的客户

    1 学习计划 1.定区关联客户 n 完善CRM服务中的客户查询方法 n 在BOS项目中配置代理对象远程调用crm服务 n 调整定区关联客户页面 n 实现定区关联客户 2.查看定区中包含的分区 n 页面 ...

  2. maven项目中配置mvn源

    在pom.xml中配置 <repositories> <!--for others--> <repository> <id>alimaven</i ...

  3. Maven项目中配置jdk版本

    <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> ...

  4. 在maven项目中解决第三方jar包依赖的问题

    在maven项目中,对于那些在maven仓库中不存在的第三方jar,依赖解决通常有如下解决方法: 方法1:直接将jar包拷贝到项目指定目录下,然后在pom文件中指定依赖类型为system,如: < ...

  5. Java项目和maven项目中如何获取&设置配置文件中的属性

    通常情况下,我们会在一些配置文件文件中配置一些属性.如: indexPath = E\:\\Tomcat_7.0\\webapps\\ipost_stage\\lucene\\index imgUpl ...

  6. Intellij IDEA 中如何查看maven项目中所有jar包的依赖关系图(转载)

    Intellij IDEA 中如何查看maven项目中所有jar包的依赖关系图 2017年04月05日 10:53:13 李学凯 阅读数:104997更多 所属专栏: Intellij Idea   ...

  7. Java采用RSA加密及解密技术的有关Maven项目的配置流程:

    第一步: 获得RSA公钥私钥(秘钥格式:PKCS#8 ,测试使用的是无私钥密码的) 公钥: -----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4G ...

  8. IDEA的maven项目中 静态文件编译的问题

    IDEA的maven项目中,默认源代码目录下的xml等资源文件并不会在编译的时候一块打包进classes文件夹,而是直接舍弃掉. 如果使用的是Eclipse,Eclipse的src目录下的xml等资源 ...

  9. 在Maven项目中,指定使用阿里云仓库下载jar包

    Maven项目中,在pom.xml的</project>标签之前加入一下标签,指定使用阿里云仓库下载jar包. <!-- 使用aliyun maven --> <repo ...

随机推荐

  1. linux日志守护进程 syslog

    几乎所有的网络设备都可以通过syslog协议,将日志信息以UDP的形式传送给远端服务器,远端接收日志服务器必须通过syslogd监听UDP端口514,并根据 syslog.conf 配置文件张的配置处 ...

  2. php微信公众号开发简单记录

    开发前准备:1.服务器 2.微信公众号测试号(有真实的账号更好) 测试号申请地址:https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/lo ...

  3. 关于unique去重

    嗯.... unique这个东西也是一个冷门知识..... 但是在有时候它还是比较好用的东西... 下面就在详细代码中看unique是如何实际应用的....它主要是用于数组去重 #include< ...

  4. Leetcode题解

    前言 Leetcode现在弄了一个Weekly Contest,然后题目又会作为新题目:感觉如果现在还不及时刷题的话可能真的赶不上它题目增长的速度了.......题目会在博客和Github上同步更新的 ...

  5. springboot和Druid整合配置数据源

    @Configuration public class DruidConfiguration { @ConfigurationProperties(prefix = "spring.data ...

  6. [Leetcode]011. Container With Most Water

    public class Solution { public int maxArea(int[] height) { int left = 0, right = height.length - 1; ...

  7. matplotlib 知识点11:绘制饼图(pie 函数精讲)

    饼图英文学名为Sector Graph,又名Pie Graph.常用于统计学模块. 画饼图用到的方法为:matplotlib.pyplot.pie( ) #!/usr/bin/env python # ...

  8. Linux重新挂载磁盘

    Linux下磁盘和目录的概念与WIN不同:比如,分了一个系统分区默认挂载了根(/)目录,根下还有其它目录,比如/user /lib等.如果系统分区不够用,可以再分出分支,把根下其它目录分别挂载出来,例 ...

  9. rancher中级(二)(rancher中添加证书及操作虚拟主机)

    制作一个ssl证书 首先了解关于ssl证书的背景知识:http://www.cnblogs.com/zxj015/p/4458066.html SSL证书包括: 1,CA证书,也叫根证书或者中间级证书 ...

  10. C - Watchmen

    题目链接:https://vjudge.net/contest/237394#problem/C Watchmen are in a danger and Doctor Manhattan toget ...