-
idea+maven+spring+cxf创建webservice应用:
- idea+maven+spring+cxf创建webservice应用:
创建maven+webapp工程:点击Next
输入相关信息:
2.创建的工程目录如下:按照标准的webapp开发应用目录少了一个java目录
3.既然少了一个我们想办法添加一个:添加java目录如下
3.1.解决之前项目结构如上图
3.2.选择File->Project Structure...
3.3.选择Modules选项卡下面的Sources项,在main文件夹上右键,选择New Folder...并点击OK
3.4.输入要创建的文件夹名称java,并点击OK继续
3.5.在创建好的java文件夹上右键选择Sources项将该文件夹标记为源文件夹
3.6.我们发现java文件夹已经由黄色变成了蓝色,我们点击OK按钮表示设置完成。
3.7.设置完成后的项目结构如下:
这正是我们标准Maven项目的结构,完美!至此我们就解决了Idea创建maven-archetype-webapp项目无java目录的问题。
4.修改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.gdsbcw-cxf</groupId> <artifactId>gdsbcw-cxf</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>gdsbcw-cxf 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> </properties> <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} --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</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> </dependencies> <!-- #####Project Build ###--> <build> <!-- ###########给出构建过程中所用到的插件start######## --> <plugins> <!-- 由于maven默认使用的jdk与工程配置的jdk版本不一致,导致无法编译通过,通过该插件指定jdk版本 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> <!-- maven-surefire-plugin 是maven里执行测试用例的插件,不显示配置就会用默认配置。这个插件的 surefire:test 命令会默认绑定maven执行的 test 阶段 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <!-- 跳过测试单元 true:跳过测试,false不跳过(默认)--> <skip>true</skip> </configuration> </plugin> </plugins> <!-- ###########给出构建过程中所用到的插件end######## --> </build> </project>
5.编码:编写java代码和相关配置文件
5.1:创建包:package:gdsbcw_cxf,并在gdsbcw_cxf下要发布的接口:BankTransaction.java
package gdsbcw_cxf; import javax.jws.WebParam; import javax.jws.WebService; /** * Created by xzh on 2017/8/21. */ @WebService(name="BankTransaction")//@WebService:将该接口发布成WebService服务器 public interface BankTransaction { public String getAesSeed( @WebParam( name="sid") String sid); public String synAesSeed( @WebParam( name="sid") String sid, @WebParam(name="seed") String seed); public String requestBank(@WebParam( name="sid") String sid, @WebParam(name="xml") String xml); }
5.2:创建实现BankTransaction的class:BankTransactionIMplementation.java
package gdsbcw_cxf; /** * Created by hengliu on 2017/8/21. */ import javax.jws.WebService; @WebService(targetNamespace="http://gdsbcw_cxfxzh/") public class BankTransactionIMplementation implements BankTransaction { @Override public String getAesSeed(String sid) { // TODO Auto-generated method stub return null; } @Override public String synAesSeed(String sid, String seed) { // TODO Auto-generated method stub return null; } @Override public String requestBank(String sid, String xml) { // TODO Auto-generated method stub return null; } }
5.3:配置wsdl用来发布WebService:beanRefServer_gd.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <!-- Import Apache CXF Bean Definition --> <import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> <!-- SurveyService --> <bean id="BankTransaction" class="gdsbcw_cxf.BankTransactionIMplementation"></bean> <!-- Expose SurveyWebService http://localhost:8080/sbcw_cxf/web_bank_transaction?wsdl--> <jaxws:server id="WebBankTransaction" serviceClass="gdsbcw_cxf.BankTransaction" address="/web_bank_transaction"> <jaxws:serviceBean> <ref bean="BankTransaction"/> <!-- 要暴露的 bean 的引用 --> </jaxws:serviceBean> </jaxws:server> </beans>
5.4:配置web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <display-name>gdsbcw-cxf</display-name> <!-- 在启动Web项目时,容器(比如Tomcat)会读web.xml配置 将参数名和参数值以键值对的形式加载到容器--> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/classes/beanRefServer_gd.xml</param-value> </context-param> <!-- 容器创建<listener>中的类实例,创建监听器。 --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- 用来声明一个servlet,CXFServlet是 --> <servlet> <servlet-name>cxf</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>cxf</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <!-- 会话超时配置(单位为分钟) --> <session-config> <session-timeout>60</session-timeout> </session-config> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> </web-app>
6.将工程打包成war包并发布到Tomcat服务器端
6.1:idea配置tomcat服务:select Run/Debug Configration下的Eedit Configurations
6.2:服务器运行应用工程:Rrn 'gdsbcw_cxf'(Shift+F10)
运行成功后在工程目录下F:\ideaprojectsworkplace\gdsbc-wcxf\target会生成一个gdsbcw-cxf-1.0-SNAPSHOT.war包,将该包拷贝到Tomcat服务器安装目录下的 webapp目录下(发布web应用:C:\Program Files\Tomcat 7.0\webapps)。
6.3::启动Tomcat服务器:gdsbcw-cxf-1.0-SNAPSHOT.war在启动服务器的时候回自动解压
6.4:检查webservice发布是否成功:在浏览器地址栏中输入 http://localhost:8080/gdsbcw-cxf-1.0-SNAPSHOT/ ,出现如下结果说明发布成功。
点击链接:{http://gdsbcw_cxf/}BankTransactionService 查看wsdl的内容
<?xml version="1.0" encoding="UTF-8"?> -<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://gdsbcw_cxf/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" targetNamespace="http://gdsbcw_cxf/" name="BankTransactionService"> -<wsdl:types> -<xs:schema xmlns:tns="http://gdsbcw_cxf/" targetNamespace="http://gdsbcw_cxf/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" elementFormDefault="unqualified"> <xs:element name="getAesSeed" type="tns:getAesSeed"/> <xs:element name="getAesSeedResponse" type="tns:getAesSeedResponse"/> <xs:element name="requestBank" type="tns:requestBank"/> <xs:element name="requestBankResponse" type="tns:requestBankResponse"/> <xs:element name="synAesSeed" type="tns:synAesSeed"/> <xs:element name="synAesSeedResponse" type="tns:synAesSeedResponse"/> -<xs:complexType name="getAesSeed"> -<xs:sequence> <xs:element name="sid" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> -<xs:complexType name="getAesSeedResponse"> -<xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> -<xs:complexType name="requestBank"> -<xs:sequence> <xs:element name="sid" type="xs:string" minOccurs="0"/> <xs:element name="xml" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> -<xs:complexType name="requestBankResponse"> -<xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> -<xs:complexType name="synAesSeed"> -<xs:sequence> <xs:element name="sid" type="xs:string" minOccurs="0"/> <xs:element name="seed" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> -<xs:complexType name="synAesSeedResponse"> -<xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types> -<wsdl:message name="requestBank"> <wsdl:part name="parameters" element="tns:requestBank"> </wsdl:part> </wsdl:message> -<wsdl:message name="requestBankResponse"> <wsdl:part name="parameters" element="tns:requestBankResponse"> </wsdl:part> </wsdl:message> -<wsdl:message name="synAesSeed"> <wsdl:part name="parameters" element="tns:synAesSeed"> </wsdl:part> </wsdl:message> -<wsdl:message name="getAesSeed"> <wsdl:part name="parameters" element="tns:getAesSeed"> </wsdl:part> </wsdl:message> -<wsdl:message name="getAesSeedResponse"> <wsdl:part name="parameters" element="tns:getAesSeedResponse"> </wsdl:part> </wsdl:message> -<wsdl:message name="synAesSeedResponse"> <wsdl:part name="parameters" element="tns:synAesSeedResponse"> </wsdl:part> </wsdl:message> -<wsdl:portType name="BankTransaction"> -<wsdl:operation name="getAesSeed"> <wsdl:input name="getAesSeed" message="tns:getAesSeed"> </wsdl:input> <wsdl:output name="getAesSeedResponse" message="tns:getAesSeedResponse"> </wsdl:output> </wsdl:operation> -<wsdl:operation name="requestBank"> <wsdl:input name="requestBank" message="tns:requestBank"> </wsdl:input> <wsdl:output name="requestBankResponse" message="tns:requestBankResponse"> </wsdl:output> </wsdl:operation> -<wsdl:operation name="synAesSeed"> <wsdl:input name="synAesSeed" message="tns:synAesSeed"> </wsdl:input> <wsdl:output name="synAesSeedResponse" message="tns:synAesSeedResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType> -<wsdl:binding name="BankTransactionServiceSoapBinding" type="tns:BankTransaction"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> -<wsdl:operation name="getAesSeed"> <soap:operation style="document" soapAction=""/> -<wsdl:input name="getAesSeed"> <soap:body use="literal"/> </wsdl:input> -<wsdl:output name="getAesSeedResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> -<wsdl:operation name="requestBank"> <soap:operation style="document" soapAction=""/> -<wsdl:input name="requestBank"> <soap:body use="literal"/> </wsdl:input> -<wsdl:output name="requestBankResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> -<wsdl:operation name="synAesSeed"> <soap:operation style="document" soapAction=""/> -<wsdl:input name="synAesSeed"> <soap:body use="literal"/> </wsdl:input> -<wsdl:output name="synAesSeedResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> -<wsdl:service name="BankTransactionService"> -<wsdl:port name="BankTransactionPort" binding="tns:BankTransactionServiceSoapBinding"> <soap:address location="http://localhost:8080/gdsbcw-cxf-1.0-SNAPSHOT/web_bank_transaction"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
7:配置客户端进行测试:使用junit4进行测试,编写测试代码和测试相关的配置文件
7.1:本地测试,按照之前创建目录的方式创建测试程序存放目录和资源目录:test/java和test/resources
7.2:编写测试程序,在test相关目录下创建gdsbcw_cxf包和class,创建测试基础类BaseJunit4Test,作为测试的基类,子类继承基类就会实现父类的注解。
package gdsbcw_cxf; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * Created by xzh on 2017/8/22. */ @RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试 //@ContextConfiguration({"classpath:bean*.xml","spring*:bean*.xml"}) //加载配置文件 //加载配置文件 @ContextConfiguration({"classpath:bean*.xml"}) //加载配置文件 //------------如果加入以下代码,所有继承该类的测试类都会遵循该配置,也可以不加,在测试类的方法上///控制事务,参见下一个实例 //这个非常关键,如果不加入这个注解配置,事务控制就会完全失效! //@Transactional //这里的事务关联到配置文件中的事务控制器(transactionManager = "transactionManager"),同时//指定自动回滚(defaultRollback = true)。这样做操作的数据才不会污染数据库! //@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) //------------ public class BaseJunit4Test { }
7.3:编写自己的测试类:TestBankTransaction,这样就可以在测试类中添加单元测试方法,实现单元测试。
7.3-1:本地测试方法:TestBankTransactionLocal()
package gdsbcw_cxf; 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; /** * Created by xzh on 2017/8/22. */ public class TestBankTransaction extends BaseJunit4Test{ //创建构造函数 public TestBankTransaction(){ } @Test //测试方法一: 本地测试,服务器程序不需要发布到Tomcat服务器上,单纯的本地调用 public void TestBankTransactionLocal(){ System.out.println("TestBankTransactionLocal........"); BankTransaction bankTransaction = new BankTransactionIMplementation(); 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); } @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(); } } //测试方法三:用工具测试 @Test //测试方法四HttpURLConnection,模拟soap协议发送请求 /*任何网络连接都需要经过socket才能连接,HttpURLConnection不需要设置socket, 所以,HttpURLConnection并不是底层的连接,而是在底层连接上的一个请求。 这就是为什么HttpURLConneciton只是一个抽象类,自身不能被实例化的原因。 HttpURLConnection只能通过URL.openConnection()方法创建具体的实例。 虽然底层的网络连接可以被多个HttpURLConnection实例共享,但每一个HttpURLConnection实例只能发送一个请求。 请求结束之后,应该调用HttpURLConnection实例的InputStream或OutputStream的close()方法以释放请求的网络资源, 不过这种方式对于持久化连接没用。对于持久化连接,得用disconnect()方法关闭底层连接的socket。*/ public void TestBankTransactionSoap(){ String fs="0"; //控制标志 String addr="http://192.168.4.77:8080/gdsbcw-cxf-1.0-SNAPSHOT/web_bank_transaction";//webservice服务地址 URL wsUrl = null;//URL对象 try{ wsUrl = new URL(addr);//创建URL }catch(MalformedURLException e){ e.printStackTrace(); } try{ HttpURLConnection conn = (HttpURLConnection) wsUrl.openConnection(); conn.setDoInput(true);//设置是否从httpUrlConnection读入,默认情况下是true; conn.setDoOutput(true);//http正文内,因此需要设为true,默认情况下是false; conn.setRequestMethod("POST");//设定请求的方法为"POST",默认是GET conn.setRequestProperty("Content-Type","text/xml;charset=UTF-8");//如果不设此项,在传送序列化对象时,当WEB服务默认的不是这种类型时可能抛java.io.EOFException OutputStream os = conn.getOutputStream(); String soap="";//请求体 if ( fs.equals("1") ) { soap = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" "+ "xmlns:q0=\"http://websvc.cpab.psbc.com/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" "+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n" + " <soapenv:Body> \n"+ " <q0:sayHello>\n"+ " <userName>ftpuser</userName>\n"+ " <passWd>good</passWd>\n"+ " </q0:sayHello>\n"+ " </soapenv:Body>\n"+ "</soapenv:Envelope>"; } else { soap="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" "+ "xmlns:gds=\"http://gdsbcw_cxf/\"> \n"+ " <soapenv:Header/>\n"+ " <soapenv:Body>\n"+ " <gds:getAesSeed>\n"+ " <!--Optional:-->\n"+ " <sid>eHpo</sid>\n"+ " </gds:getAesSeed>\n"+ " </soapenv:Body>\n"+ "</soapenv:Envelope>"; } System.out.println(soap); os.write(soap.getBytes()); InputStream is = conn.getInputStream(); byte[] b = new byte[1024]; int len = 0; String s = ""; while((len = is.read(b)) != -1) { String ss = new String(b,0,len,"UTF-8"); s += ss; } System.out.println("返回报:"+s); is.close(); os.close(); conn.disconnect(); } catch(IOException e){ e.printStackTrace(); } } public static void main(String[] args){ } }
7.3-2:远程测试方法(前提条件是将应用部署到tomcat服务器上并启动tomcat):TestBankTransactionRemote(),测试远程测试时需要配置客户端F:\ideaprojectsworkplace\gdsbc-wcxf\src\test\resources\spring_cxf-client.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <!-- serviceClass:要访问的接口,address:接口地址 --> <!-- <jaxws:client id="BankTransactionClient" serviceClass="gdsbcw_cxf.BankTransaction" address="http://localhost:8080/gdsbcw-cxf-01/web_bank_transaction" /> --> <jaxws:client id="BankTransactionClient" serviceClass="gdsbcw_cxf.BankTransaction" address="http://192.168.4.77:8080/gdsbcw-cxf-1.0-SNAPSHOT/web_bank_transaction" /> </beans>
说明:address="http://192.168.4.77:8080/gdsbcw-cxf-1.0-SNAPSHOT/web_bank_transaction"
http://192.168.4.77:8080/gdsbcw-cxf-1.0-SNAPSHOT:tomcat 应用
/*:此路径在web.xml里面配置的,在gdsbcw-cxf-1.0-SNAPSHOT工程名后面可以配置mapping的地址,/*表示任意访问
/web_bank_transaction:此路径在服务端的beanRefServer_gd.xml里配置的。
7.3-3:通过soapUI工具测试(前提条件是将应用部署到tomcat服务器上并启动tomcat):File->New soapUI Project(下载安装就略)
命名工程名:gdsbcw-cxf(名字可以随便取);
Initial WSDL/WADL:http://localhost:8080/gdsbcw-cxf-1.0-SNAPSHOT/web_bank_transaction?wsdl 或
Initial WSDL/WADL:http://192.168.4.77:8080/gdsbcw-cxf-1.0-SNAPSHOT/web_bank_transaction?wsdl
点击OK导入wsdl如下:可以看到服务器提供的3个接口以及一个接口测试的结果。
7.3-4:测试方法四HttpURLConnection,模拟soap协议发送请求(前提条件是将应用部署到tomcat服务器上并启动tomcat):运行结果如下
INFO - Refreshing org.springframework.context.support.GenericApplicationContext@2d3fcdbd: startup date [Wed Aug 23 10:54:00 CST 2017]; root of context hierarchy INFO - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@76f2b07d: 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 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:gds="http://gdsbcw_cxf/"> <soapenv:Header/> <soapenv:Body> <gds:getAesSeed> <!--Optional:--> <sid>eHpo</sid> </gds:getAesSeed> </soapenv:Body> </soapenv:Envelope> 返回报<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getAesSeedResponse xmlns:ns2="http://gdsbcw_cxf/"><return>eHpo</return></ns2:getAesSeedResponse></soap:Body></soap:Envelope> INFO - Closing org.springframework.context.support.GenericApplicationContext@2d3fcdbd: startup date [Wed Aug 23 10:54:00 CST 2017]; root of context hierarchy INFO - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@76f2b07d: 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