WebService Client端

技术WebService Client端 WebService Client端pomxml version="1.0" encoding="UTF-8"
project xmlns="http://ma

网络服务客户端端

砰的一声

可扩展标记语言版本='1.0 '编码='UTF-8 '

项目xmlns=' http://aven。阿帕奇。org/POM/4。0 .0 ' xmlns : xsi=' http://www。w3。org/2001/XMLSchema-instance '

xsi : schema location=' http://aven。阿帕奇。org/POM/4。0 .0 https://maven.apache.org/xsd/maven-4.0.0.xsd'

模型版本4 .0 .0/模型版本

父母

groupIdorg.springframework.boot/groupId

artifactId弹簧-启动-启动-父/artifactId

版本2 .5 .6/版本

relativePath/!-从存储库中查找父项-

/家长

groupIdcn.itcast/groupId

artifactIdjaxws-客户端/artifactId

版本0 .0 .1-快照/版本

namejaxws-客户端/名称

描述Spring Boot的演示项目/描述

性能

java.version1.8/java.version

/properties

属国

属国

groupIdorg.springframework.boot/groupId

artifactIdspring-boot-starter-web/artifactId

/依赖性

属国

groupIdorg.springframework.boot/groupId

artifactId弹簧-启动-启动-测试/artifactId

示波器测试/示波器

/依赖性

!- apache cxf -

属国

groupIdorg.apache.cxf/groupId

artifactIdcxf-spring-boot-starter-jax ws/artifactId

版本3 .3 .9/版本

不包括的项目:如接受服务项目是由投保以前已患有的疾病或伤害引致的

排除

artifactIdasm/artifactId

groupIdorg.ow2.asm/groupId

/排除

/排除

/依赖性

/依赖项

建设

插件

插件

groupIdorg.springframework.boot/groupId

artifactIdspring-boot-maven-plugin/artifactId

/插件

/plugins

/build

/project

查看代码

客户

package com.test

导入组织。阿帕奇。cxf。端点。客户;

导入组织。阿帕奇。cxf。拦截者。日志记录接口;

导入组织。阿帕奇。cxf。拦截者。Loggingoutinterceptor

导入组织。阿帕奇。cxf。jax ws。端点。动态的。jaxwsdynamicclientfactory

公共类测试{

公共静态void main(字符串[]参数)引发异常(

JaxWsDynamicClientFactory工厂=JaxWsDynamicClientFactory。新实例();

客户端客户端=工厂。创建客户端(' http://localhost :8000/order/API wsdl ');

//打印发出的消息

client.getInInterceptors().添加(新的loggingingininterceptor());

//打印进入的消息

client.getOutInterceptors().添加(新的logging ingoutinterceptor());

对象[]RES=客户端。invoke(' yxczynotificienworkorder ',' test ');

系统。出去。println(' Echo response : ' RES[0]);

}

}

cxf不支持jdk11,目前只支持jdk1.8,官网有说明

内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/107437.html

(0)

相关推荐