-
idea+maven+spring+cxf创建webservice应用(二)生成客户端程序,以上一篇为基础"idea+maven+spring+cxf创建webservice应用"
- idea+maven+spring+cxf创建webservice客户端应用:和创建服务器端工程一样,如有疑问请查看上一篇《idea+maven+spring+cxf创建webservice应用》
创建好后的目录框架:添加了java和test相关目录。
2.生成webservice客户端代码:选中main下面的java目录,点击右键找到webService-》generate java code Wsdl...
2.1:然后点击进入设置界面:
2.2:设置好后点击OK:生成客户当代码,将不必要的class文件删除,删除后的目录结构如下,其中test目录下的code和配置文件是自己添加的。
3.编码联调客户端访问服务器代码(我们这里只看单元测试的代码):在test目录下编码,同前一篇样编写BaseJunit4Test类和TestBankTransaction类
3.1:pom.xml配置文件有所变动,添加了后续肯能用到的依赖
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.xzh.gdsbc_wcxf_client</groupId> <artifactId>gdsbc_wcxf_client</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>gdsbc_wcxf_client Maven Webapp</name> <url>http://maven.apache.org</url> <!-- ##########依赖属性参数配置 start############### --> <properties> <junit.version>4.11</junit.version> <cxf.version>2.2.3</cxf.version> <spring.version>3.2.3.RELEASE</spring.version> <slf4j.version>1.7.7</slf4j.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <!-- ##########依赖属性参数配置 end############### --> <dependencies> <!-- 单元测试依赖包 --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> </dependency> <!-- CXF Dependencies --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>${cxf.version}</version> </dependency> <!-- Jetty is needed if you're are not using the CXFServlet --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> <version>${cxf.version}</version> </dependency> <!-- End of CXF Dependencies --> <!-- Spring Dependencies ${spring.version} --> <!--Spring核心相关--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>${spring.version}</version> </dependency> <!--SpringMVC相关--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version> <type>jar</type> <scope>compile</scope> </dependency> <!--Spring数据库相关--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${spring.version}</version> </dependency> <!--MyBatis相关--> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.2.8</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.2.3</version> </dependency> <!--数据库相关--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.35</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.4.2</version> </dependency> <!--Servlet相关--> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <!--测试相关--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <!--Json处理--> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.12</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId> <version>1.9.13</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.13</version> </dependency> <!--七牛云文件上传--> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.3.1</version> </dependency> <dependency> <groupId>com.qiniu</groupId> <artifactId>qiniu-java-sdk</artifactId> <version>7.2.0</version> </dependency> <!--邮件发送--> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4.7</version> </dependency> <!-- 日志处理 --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> </dependencies> <build> <plugins> <!--tomcat插件--> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.0</version> </plugin> <!--编码配置--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <encoding>utf-8</encoding> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <!--编码配置--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> <forkMode>once</forkMode> <argLine>-Dfile.encoding=UTF-8</argLine> </configuration> </plugin> </plugins> </build> </project>
3.2:BaseJunit4Test类的代码没有做修改,请查看服务器端代码即可,TestBankTransaction的代码如下:
package gdsbcw_cxf_client; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.net.URL; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import com.xzh.gdsbc_wcxf_client.BankTransaction; /** * Created by xzh on 2017/8/22. */ public class TestBankTransaction extends BaseJunit4Test{ //创建构造函数 public TestBankTransaction(){ } @Test //远程访问,及将webservice应用程序发布到Tomcat服务器,客户端访问服务器接口程序 public void TestBankTransactionRemote(){ System.out.println("TestBankTransactionRemote........"); try{ ApplicationContext context = new ClassPathXmlApplicationContext("spring_cxf-client.xml"); BankTransaction bankTransaction = context.getBean("BankTransactionClient",BankTransaction.class); String a = bankTransaction.getAesSeed("a-"); String b = bankTransaction.synAesSeed("b-", "-b"); String c = bankTransaction.requestBank("c-", "<--xml格式>"); System.out.println(a); System.out.println(b); System.out.println(c); }catch(Exception e){ e.printStackTrace(); } } public static void main(String[] args){ } }
3.3测试:现在TestBankTransactionRemote()方法,点击右键运行Test方法
结果:
"C:Program FilesJavajdk1.8.0_60injava" -ea -Dfile.encoding=UTF-8 -Didea.test.cyclic.buffer.size=1048576 "-javaagent:D:IntelliJ IDEA 2017.1.3libidea_rt.jar=55769:D:IntelliJ IDEA 2017.1.3in" -classpath "D:IntelliJ IDEA 2017.1.3libidea_rt.jar;D:IntelliJ IDEA 2017.1.3pluginsjunitlibjunit-rt.jar;C:Program FilesJavajdk1.8.0_60jrelibcharsets.jar;C:Program FilesJavajdk1.8.0_60jrelibdeploy.jar;C:Program FilesJavajdk1.8.0_60jrelibextaccess-bridge-64.jar;C:Program FilesJavajdk1.8.0_60jrelibextcldrdata.jar;C:Program FilesJavajdk1.8.0_60jrelibextdnsns.jar;C:Program FilesJavajdk1.8.0_60jrelibextjaccess.jar;C:Program FilesJavajdk1.8.0_60jrelibextjfxrt.jar;C:Program FilesJavajdk1.8.0_60jrelibextlocaledata.jar;C:Program FilesJavajdk1.8.0_60jrelibext ashorn.jar;C:Program FilesJavajdk1.8.0_60jrelibextsunec.jar;C:Program FilesJavajdk1.8.0_60jrelibextsunjce_provider.jar;C:Program FilesJavajdk1.8.0_60jrelibextsunmscapi.jar;C:Program FilesJavajdk1.8.0_60jrelibextsunpkcs11.jar;C:Program FilesJavajdk1.8.0_60jrelibextzipfs.jar;C:Program FilesJavajdk1.8.0_60jrelibjavaws.jar;C:Program FilesJavajdk1.8.0_60jrelibjce.jar;C:Program FilesJavajdk1.8.0_60jrelibjfr.jar;C:Program FilesJavajdk1.8.0_60jrelibjfxswt.jar;C:Program FilesJavajdk1.8.0_60jrelibjsse.jar;C:Program FilesJavajdk1.8.0_60jrelibmanagement-agent.jar;C:Program FilesJavajdk1.8.0_60jrelibplugin.jar;C:Program FilesJavajdk1.8.0_60jrelib esources.jar;C:Program FilesJavajdk1.8.0_60jrelib t.jar;F:ideaprojectsworkplacegdsbc_wcxf_client arget est-classes;F:ideaprojectsworkplacegdsbc_wcxf_client argetclasses;C:Usershengliu.m2 epositoryjunitjunit4.11junit-4.11.jar;C:Usershengliu.m2 epositoryorghamcresthamcrest-core1.3hamcrest-core-1.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-frontend-jaxws2.2.3cxf-rt-frontend-jaxws-2.2.3.jar;C:Usershengliu.m2 epositoryxml-resolverxml-resolver1.2xml-resolver-1.2.jar;C:Usershengliu.m2 epositoryorgapachegeronimospecsgeronimo-jaxws_2.1_spec1.0geronimo-jaxws_2.1_spec-1.0.jar;C:Usershengliu.m2 epositoryorgapachegeronimospecsgeronimo-activation_1.1_spec1.0.2geronimo-activation_1.1_spec-1.0.2.jar;C:Usershengliu.m2 epositoryorgapachegeronimospecsgeronimo-ws-metadata_2.0_spec1.1.2geronimo-ws-metadata_2.0_spec-1.1.2.jar;C:Usershengliu.m2 epositoryasmasm2.2.3asm-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-api2.2.3cxf-api-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-common-utilities2.2.3cxf-common-utilities-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachegeronimospecsgeronimo-stax-api_1.0_spec1.0.1geronimo-stax-api_1.0_spec-1.0.1.jar;C:Usershengliu.m2 epositorywsdl4jwsdl4j1.6.2wsdl4j-1.6.2.jar;C:Usershengliu.m2 epositorycommons-langcommons-lang2.4commons-lang-2.4.jar;C:Usershengliu.m2 epositoryorgapachewscommonsschemaXmlSchema1.4.5XmlSchema-1.4.5.jar;C:Usershengliu.m2 epositoryorgapachegeronimospecsgeronimo-annotation_1.0_spec1.1.1geronimo-annotation_1.0_spec-1.1.1.jar;C:Usershengliu.m2 epositoryorgcodehauswoodstoxwstx-asl3.2.8wstx-asl-3.2.8.jar;C:Usershengliu.m2 epositoryorgapache eethi eethi2.0.4 eethi-2.0.4.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-common-schemas2.2.3cxf-common-schemas-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-core2.2.3cxf-rt-core-2.2.3.jar;C:Usershengliu.m2 epositorycomsunxmlindjaxb-impl2.1.12jaxb-impl-2.1.12.jar;C:Usershengliu.m2 epositoryorgapachegeronimospecsgeronimo-javamail_1.4_spec1.6geronimo-javamail_1.4_spec-1.6.jar;C:Usershengliu.m2 epositorycomsunxmlfastinfosetFastInfoset1.2.7FastInfoset-1.2.7.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-bindings-soap2.2.3cxf-rt-bindings-soap-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-tools-common2.2.3cxf-tools-common-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-databinding-jaxb2.2.3cxf-rt-databinding-jaxb-2.2.3.jar;C:Usershengliu.m2 epositoryjavaxxmlindjaxb-api2.1jaxb-api-2.1.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-bindings-xml2.2.3cxf-rt-bindings-xml-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-frontend-simple2.2.3cxf-rt-frontend-simple-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-ws-addr2.2.3cxf-rt-ws-addr-2.2.3.jar;C:Usershengliu.m2 epositoryjavaxxmlsoapsaaj-api1.3saaj-api-1.3.jar;C:Usershengliu.m2 epositorycomsunxmlmessagingsaajsaaj-impl1.3.2saaj-impl-1.3.2.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-transports-http2.2.3cxf-rt-transports-http-2.2.3.jar;C:Usershengliu.m2 epositoryorgapachecxfcxf-rt-transports-http-jetty2.2.3cxf-rt-transports-http-jetty-2.2.3.jar;C:Usershengliu.m2 epositoryorgmortbayjettyjetty6.1.19jetty-6.1.19.jar;C:Usershengliu.m2 epositoryorgmortbayjettyjetty-util6.1.19jetty-util-6.1.19.jar;C:Usershengliu.m2 epositoryorgslf4jslf4j-jdk141.5.8slf4j-jdk14-1.5.8.jar;C:Usershengliu.m2 epositoryorgapachegeronimospecsgeronimo-servlet_2.5_spec1.2geronimo-servlet_2.5_spec-1.2.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-core3.2.3.RELEASEspring-core-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositorycommons-loggingcommons-logging1.1.1commons-logging-1.1.1.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-beans3.2.3.RELEASEspring-beans-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-context3.2.3.RELEASEspring-context-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-context-support3.2.3.RELEASEspring-context-support-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-expression3.2.3.RELEASEspring-expression-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-aop3.2.3.RELEASEspring-aop-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryaopallianceaopalliance1.0aopalliance-1.0.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-aspects3.2.3.RELEASEspring-aspects-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgaspectjaspectjweaver1.7.2aspectjweaver-1.7.2.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-web3.2.3.RELEASEspring-web-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-webmvc3.2.3.RELEASEspring-webmvc-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgslf4jslf4j-log4j121.7.7slf4j-log4j12-1.7.7.jar;C:Usershengliu.m2 epositoryorgslf4jslf4j-api1.7.7slf4j-api-1.7.7.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-jdbc3.2.3.RELEASEspring-jdbc-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-tx3.2.3.RELEASEspring-tx-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-orm3.2.3.RELEASEspring-orm-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositoryorgmybatismybatis3.2.8mybatis-3.2.8.jar;C:Usershengliu.m2 epositoryorgmybatismybatis-spring1.2.3mybatis-spring-1.2.3.jar;C:Usershengliu.m2 epositorymysqlmysql-connector-java5.1.35mysql-connector-java-5.1.35.jar;C:Usershengliu.m2 epositorycommons-dbcpcommons-dbcp1.4commons-dbcp-1.4.jar;C:Usershengliu.m2 epositorycommons-poolcommons-pool1.5.4commons-pool-1.5.4.jar;C:Usershengliu.m2 epository edisclientsjedis2.4.2jedis-2.4.2.jar;C:Usershengliu.m2 epositoryorgapachecommonscommons-pool22.0commons-pool2-2.0.jar;C:Usershengliu.m2 epositoryjavaxservletjavax.servlet-api3.1.0javax.servlet-api-3.1.0.jar;C:Usershengliu.m2 epositoryjavaxservletjsp-api2.0jsp-api-2.0.jar;C:Usershengliu.m2 epositoryjavaxservletservlet-api2.4servlet-api-2.4.jar;C:Usershengliu.m2 epositoryjavaxservletjstl1.2jstl-1.2.jar;C:Usershengliu.m2 epositoryorgspringframeworkspring-test3.2.3.RELEASEspring-test-3.2.3.RELEASE.jar;C:Usershengliu.m2 epositorycomalibabafastjson1.2.12fastjson-1.2.12.jar;C:Usershengliu.m2 epositoryorgcodehausjacksonjackson-core-asl1.9.13jackson-core-asl-1.9.13.jar;C:Usershengliu.m2 epositoryorgcodehausjacksonjackson-mapper-asl1.9.13jackson-mapper-asl-1.9.13.jar;C:Usershengliu.m2 epositorycommons-fileuploadcommons-fileupload1.3.1commons-fileupload-1.3.1.jar;C:Usershengliu.m2 epositorycommons-iocommons-io2.2commons-io-2.2.jar;C:Usershengliu.m2 epositorycomqiniuqiniu-java-sdk7.2.0qiniu-java-sdk-7.2.0.jar;C:Usershengliu.m2 epositorycomsquareupokhttp3okhttp3.3.1okhttp-3.3.1.jar;C:Usershengliu.m2 epositorycomsquareupokiookio1.8.0okio-1.8.0.jar;C:Usershengliu.m2 epositorycomgooglecodegsongson2.6.2gson-2.6.2.jar;C:Usershengliu.m2 epositorycomqiniuhappy-dns-java .1.4happy-dns-java-0.1.4.jar;C:Usershengliu.m2 epositoryjavaxmailmail1.4.7mail-1.4.7.jar;C:Usershengliu.m2 epositoryjavaxactivationactivation1.1activation-1.1.jar;C:Usershengliu.m2 epositorylog4jlog4j1.2.17log4j-1.2.17.jar" com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 gdsbcw_cxf_client.TestBankTransaction,TestBankTransactionRemote INFO - Refreshing org.springframework.context.support.GenericApplicationContext@7f9a81e8: startup date [Wed Aug 23 17:10:26 CST 2017]; root of context hierarchy INFO - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5bfbf16f: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy TestBankTransactionRemote........ INFO - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@45afc369: startup date [Wed Aug 23 17:10:27 CST 2017]; root of context hierarchy INFO - Loading XML bean definitions from class path resource [spring_cxf-client.xml] INFO - Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml] INFO - Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml] INFO - Loading XML bean definitions from class path resource [META-INF/cxf/cxf-servlet.xml] INFO - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5a955565: defining beans [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.servlet.ServletTransportFactory,BankTransactionClient.proxyFactory,BankTransactionClient]; root of factory hierarchy 八月 23, 2017 5:10:30 下午 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass 信息: Creating Service {http://gdsbcw_cxf/}BankTransactionService from class com.xzh.gdsbc_wcxf_client.BankTransaction a- b-,-b c-,<--xml格式> INFO - Closing org.springframework.context.support.GenericApplicationContext@7f9a81e8: startup date [Wed Aug 23 17:10:26 CST 2017]; root of context hierarchy INFO - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5bfbf16f: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy Process finished with exit code 0
客户端简单的搭建完毕,业务逻辑请关注第三篇