posts - 22, comments - 32, trackbacks - 0, articles - 73
            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          前一段時(shí)間在公司比較閑看了看CXF2.3 與SPRING 3.0.5集成,以前用XFire開(kāi)發(fā)東西,去XFire社區(qū)轉(zhuǎn)時(shí)候都說(shuō)建議換用CXF。哈哈不說(shuō)廢話了開(kāi)始吧:

          準(zhǔn)備:CXF2.3.0 所有jar 包,去官網(wǎng)下就可以了,如果為了測(cè)試建議把lib下所有jar包導(dǎo)入工程中(它里邊包含了spring所必需的jar包版本是spring3.0.5的,如果你不想使用CXF2.3.0中的spirng jar包可以不導(dǎo)入,導(dǎo)入自己的)。

          oracle 數(shù)據(jù)驅(qū)動(dòng)包:ojdbc14.jar
          spirng -jdbc 包: org.springframework.jdbc-3.0.5.RELEASE.jar(因?yàn)楸居美枰胹pring JDBC 做持久層測(cè)試)

          第一步:建立一個(gè)webproject ,把CXF包導(dǎo)入工程lib目錄下;

          接口代碼如下:
          import javax.jws.WebService;
          /*
           * @author zzz
           * @version 1.0
           * @ userservice接口;
           */

          @WebService 
          public interface UserService {
           public String getSomething(String data);
          }


          實(shí)現(xiàn)類(lèi):
          import java.sql.SQLException;
          import javax.jws.WebService;
          import org.springframework.jdbc.core.JdbcTemplate;
          import com.tchzt.demo.user.service.UserService;

          @WebService
          public class UserServiceImpl extends JdbcTemplate implements UserService{

           public String getSomething(String data) {
            System.out.println("this is server message :"+data);
            try {
             System.out.println("獲得數(shù)據(jù)庫(kù)連接:"+getDataSource().getConnection());
             //這里是用的spring 的JDBC,可以在這里寫(xiě)持久化代碼;
            } catch (SQLException e) {
             e.printStackTrace();
            }
            return data;
           }
           
          }

          在src目錄下建立一個(gè)applicationContext-client-beans.xml 這個(gè)名字可以自己定,但在web.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/schema/jaxws.xsd">
          <!-- 這是JNDI配置數(shù)據(jù)源方式

           <bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
            <property name="location">
             <value>classpath:com/chtt/cfg/dbconn/oracle_jndi.properties</value>
            </property>
           </bean>
           
           <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiName">
             <value>${oraconn.jndi}</value>
            </property>
           </bean>
          --> 
          <!-- 數(shù)據(jù)據(jù)源配置方式 -->
          <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
               <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
               <property name="url" value="jdbc:oracle:thin:@110.168.1.51:1521:pos"/>
               <property name="username" value="pos"/>
               <property name="password" value="pos"/>
          </bean>
          <!-- 配置DAO -->
          <bean id="daoTemplate" abstract="true">
           <property name="dataSource">
            <ref local="dataSource"/>
           </property>
          </bean> 
          <!-- dao引用 -->
          <bean id="userServiceImpl" class="com.tchzt.demo.user.serviceImpl.UserServiceImpl" parent="daoTemplate"/>

          <!-- webservice 發(fā)布配置 -->
          <bean id="client" class="com.test.Client" factory-bean="clientFactory" factory-method="create" />

          <bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean" >
           <!-- 服務(wù)發(fā)布供外部調(diào)用接口 -->
           <property name="serviceClass" value="com.tchzt.demo.user.service.UserService" />
           <property name="address" value="http://127.0.0.1:8080/WebServiceCXF/UserService" />
          </bean> 
          </beans>

          WEB-INF目錄下建立一個(gè)services.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 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" /> 
             <!-- webService發(fā)布地址 , #userServiceImpl引用bean方式,也可以寫(xiě)成類(lèi)的全路徑 -->
             <!--userServiceImpl 加入數(shù)據(jù)連接, 在此引用  -->
              <jaxws:endpoint id="userService" implementor="#userServiceImpl" address="/UserService"/>
             
           <!-- 第二種方式引用其它bean;
            <jaxws:endpoint id="userService"
                          implementorClass="demo.spring.HelloWorld"
                          address="/UserService">
                 <jaxws:implementor>
                    <bean ref="userServiceImpl"/>
                 </jaxws:implementor>
                
                 <jaxws:implementor>
                    <bean ref="userServiceImpl2"/>
                 </jaxws:implementor>
            </jaxws:endpoint>
            
            -->     
          </beans> 



          web.xml 文件內(nèi)容:

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
           http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
           <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:applicationContext-client-beans.xml,WEB-INF/services.xml</param-value>
           </context-param>

           <listener>
            <listener-class>
             org.springframework.web.context.ContextLoaderListener
            </listener-class>
           </listener>

           <servlet>
            <servlet-name>CXFServlet</servlet-name>
            <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
           </servlet>

           <servlet-mapping>
            <servlet-name>CXFServlet</servlet-name>
            <url-pattern>/*</url-pattern>
           </servlet-mapping>

           <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
           </welcome-file-list>
           <!-- 加載數(shù)據(jù)源
           <resource-ref>
            <res-ref-name>jdbc/cdbank</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
           </resource-ref>
           -->
          </web-app>

          測(cè)試類(lèi)內(nèi)容:
          package com.test;

          import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
          import org.springframework.context.ApplicationContext;
          import org.springframework.context.support.ClassPathXmlApplicationContext;
          import com.tchzt.demo.user.service.UserService;
          import com.tchzt.demo.user.serviceImpl.UserServiceImpl;

          public class Client {
              public static Client client = new Client();  
              private UserService userService=null;
              //這是spring得到服務(wù)實(shí)例構(gòu)造方法;
              private Client(){
               ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext-client-beans.xml");
               userService=(UserService) context.getBean("client");
              }
              //這是普通客戶端得到服務(wù)實(shí)例;
              private Client(UserService userService){
               this.userService=userService;
              }
              public String getText(String text) throws Exception {  
                  String data = userService.getSomething(text);  
                  return data;  
              }
             /*
              *單獨(dú)測(cè)試spring 加載數(shù)據(jù)連接;
              */
              public static void  getConnectTest(){
               ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext-client-beans.xml");
               UserServiceImpl userServiceImpl=(UserServiceImpl) context.getBean("userServiceImpl");
               System.out.println("數(shù)據(jù)庫(kù)連接測(cè)試:"+userServiceImpl.getSomething("adfasdf"));
              }
              /*
               * CXF 普通客戶端測(cè)試;
               */
              public static void testCxfClient()throws Exception{
               //這里不用Spring 得到bean實(shí)例;
            JaxWsProxyFactoryBean factory=new JaxWsProxyFactoryBean();
            //設(shè)置服務(wù)類(lèi)的名字;
            factory.setServiceClass(UserService.class);
            //設(shè)置服務(wù)的地址;
            factory.setAddress("http://127.0.0.1:8080/WebServiceCXF/UserService");
            
            //得到服務(wù)類(lèi)的實(shí)例;
            UserService userService=(UserService) factory.create();
            
            Client client=new Client(userService);
            
            System.out.println(client.getText("這是webserviceCXF測(cè)試數(shù)據(jù)"));
              }
              /*
               * spring 與CXF 集成發(fā)布測(cè)試;
               */
              public static void testSpringCxfClient()throws Exception{
               //這是用spring 得到服務(wù)實(shí)例;
            System.out.println(client.getText("這是webserviceCXF與 spring集成發(fā)布的測(cè)試數(shù)據(jù)!"));
              }
           public static void main(String[] args)throws Exception {
            //測(cè)試數(shù)據(jù)連接是否成功!
            //Client.getConnectTest();
            //普通測(cè)試;
            //Client.testCxfClient();
            //集成測(cè)試;
            Client.testSpringCxfClient();
           }

          }

          測(cè)試:把工程發(fā)布到tomcat上運(yùn)行測(cè)試類(lèi)出現(xiàn)下面結(jié)果:

          Client.testSpringCxfClient()方法測(cè)試:

           客戶端輸出:
              這是webserviceCXF與 spring集成發(fā)布的測(cè)試數(shù)據(jù)!

          服務(wù)器端的輸出:
          this is server message :這是webserviceCXF與 spring集成發(fā)布的測(cè)試數(shù)據(jù)!
          獲得數(shù)據(jù)庫(kù)連接:oracle.jdbc.driver.OracleConnection@7fb878



          Client.testCxfClient()測(cè)試:

          客戶端輸出:
          這是webserviceCXF測(cè)試數(shù)據(jù)

          服務(wù)器端的輸出:

          this is server message :這是webserviceCXF測(cè)試數(shù)據(jù)
          獲得數(shù)據(jù)庫(kù)連接:oracle.jdbc.driver.OracleConnection@6276e5

          Client.getConnectTest()數(shù)據(jù)庫(kù)連接測(cè)試:
          this is server message :adfasdf
          獲得數(shù)據(jù)庫(kù)連接:oracle.jdbc.driver.OracleConnection@c38157
          數(shù)據(jù)庫(kù)連接測(cè)試:adfasdf


          好了到此CXF+spring 集成完畢(不足這處沒(méi)有加入聲明式事物的管理,只加入了spring 連接數(shù)據(jù)庫(kù)和持久層JDBC,有時(shí)間在完善下),如果有什么問(wèn)題請(qǐng)聯(lián)系我:zzzlyr@163.com

          有時(shí)間更新這篇文章了,加入聲明式事物,這個(gè)很簡(jiǎn)單。在把項(xiàng)目里用的CXF細(xì)節(jié)和遇到問(wèn)題說(shuō)明下:

          把a(bǔ)ppcliatContext.xml 這個(gè)文件加入Spring包 自動(dòng)掃描,在你的業(yè)務(wù)層上加下面基于注解事物:
          開(kāi)起注解事物 在需要的方法上加入即可
            默認(rèn)Spring為每個(gè)方法開(kāi)啟一個(gè)事務(wù),如果方法發(fā)生運(yùn)行期錯(cuò)誤unchecked(RuntimeException),事務(wù)會(huì)進(jìn)行回滾
            如果發(fā)生checked Exception,事務(wù)不進(jìn)行回滾.
            @Transactional(propagation=Propagation.REQUIRED)
            @Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)

          重點(diǎn)說(shuō)下在項(xiàng)目中用CXF2.3 遇到問(wèn)題:
             第一個(gè):就是CXF命名空間問(wèn)題,在網(wǎng)上好多例子,就簡(jiǎn)單是一個(gè)例子。在項(xiàng)目中CXF發(fā)布webService ,一般做法是實(shí)現(xiàn)類(lèi)和接口沒(méi)有在一個(gè)包中;這是項(xiàng)目中要用到的:

          這是接口:
          package com.tchzt.service;

          import javax.jws.WebResult;
          import javax.jws.WebService;

          /*
           * @author zzz
           * @version 1.0
           * @ userservice接口;
           */
          /*
           * webService接口綁定;
           * com.tchzt.webService
           *
           */
          @WebService(targetNamespace="com.tchzt.seals.service")
          public interface SealHandOverService {
           /*
            * 反回值標(biāo)注,可以改變返回參數(shù)WSDL發(fā)布名字,還有參數(shù)名字;
            */
           public @WebResult(name="sealHandOverService") String getDocumentByBantchNo(String nantchNo)throws Exception;
           
          }



          實(shí)現(xiàn)類(lèi):
          package com.tchzt.service.imp;

          import java.util.LinkedList;
          import java.util.List;

          import javax.jws.WebService;

          import org.springframework.beans.factory.annotation.Autowired;
          import org.springframework.beans.factory.annotation.Qualifier;
          import org.springframework.stereotype.Service;

          import com.tchzt.dao.PrintlogDaoIf;
          import com.tchzt.dao.SealTypeDaoIf;
          import com.tchzt.dao.SealsDaoIf;
          import com.tchzt.po.AppSeals;
          import com.tchzt.po.AppSealtype;
          import com.tchzt.po.Printlog;
          import com.tchzt.service.SealHandOverService;
          import com.tchzt.util.Document4jUtils;

          @Service
          @WebService(targetNamespace="com.tchzt.seals.service",endpointInterface="com.tchzt.service.SealHandOverService")
          public class SealHandOverServiceImpl implements SealHandOverService {
           @Autowired
           @Qualifier("printlogDaoIfImpl")
           private PrintlogDaoIf printlogDao;
           
           @Autowired
           @Qualifier("sealsDaoIfImpl")
           private SealsDaoIf sealsDao;
           
           @Autowired
           @Qualifier("sealTypeDaoIfImpl")
           private SealTypeDaoIf sealTypeDao;
           
           @Override
           public String getDocumentByBantchNo(String banchno) throws Exception {
            List<Printlog> list=printlogDao.getPrintlogs(banchno);
            List<String> sealXML=new LinkedList<String>();
            for(Printlog p:list){
              AppSeals seal=sealsDao.getByIdx(AppSeals.class, p.getSealid());
              AppSealtype sealType=sealTypeDao.getByIdx(AppSealtype.class, seal.getSealtypeId());
              sealXML.add("id:"+seal.getId());
              sealXML.add("sealName:"+sealType.getSealName());
              sealXML.add("sealType:"+sealType.getId());
              sealXML.add("image:"+seal.getImage());
            }
            for(String s:sealXML){
             System.out.println(s);
            }
            return Document4jUtils.getHandOverScanXML(sealXML,banchno);
           }

          }

          上面注意一個(gè)就行targetNamespace="com.tchzt.seals.service"一要寫(xiě)上,接口和實(shí)現(xiàn)類(lèi)不在同一個(gè)包中,接口和實(shí)現(xiàn)類(lèi)一定要一致。但網(wǎng)上好多例子接口和實(shí)現(xiàn)類(lèi)在一包中targetNamespace這個(gè)東西默認(rèn)是一致的,所以不需要指定,如果接口和實(shí)現(xiàn)類(lèi)不在同一個(gè)包中,你查看WSDL的時(shí)候也可以看到,也不報(bào)錯(cuò),但就是發(fā)布WSDL少信息。
           第二客戶端問(wèn)題:網(wǎng)上好多例子就是一個(gè)工程,調(diào)自己工程發(fā)布的WebService的方法,以下是第二個(gè)JAVA工程調(diào)用第一個(gè)發(fā)布成功的webService 方法如下 :

          package com.tchzt.test;

          import org.apache.cxf.endpoint.Client;
          import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
          import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;

          import com.tchzt.service.SealHandOverService;

          public class WebServiceClientTest {
           
            /*
               * CXF 變通客戶端測(cè)試;
               */
              public static void testCxfClient()throws Exception{
               //這里不用Spring 得到bean實(shí)例;
            JaxWsProxyFactoryBean factory=new JaxWsProxyFactoryBean();
            //設(shè)置服務(wù)類(lèi)的名字;
            factory.setServiceClass(SealHandOverService.class);
            //設(shè)置服務(wù)的地址;
            factory.setAddress("http://127.0.0.1:8080/seal/ws/SealHandOverService");
            
            //得到服務(wù)類(lèi)的實(shí)例;
            SealHandOverService sealHandOverService=(SealHandOverService) factory.create();
            
            
            System.out.println("======="+sealHandOverService.getDocumentByBantchNo("67801100060039"));
              }
              /**
            * @Title: callService
            * @Description: 調(diào)用遠(yuǎn)程的webservice并返回?cái)?shù)據(jù)
            * @param wsUrl
            *            webservice地址
            * @param method
            *            調(diào)用的webservice方法名
            * @param arg
            *            參數(shù)
            * @return
            * @return:String
            * @throws
            */
              public static String callService(String wsUrl, String method, Object... arg)throws Exception {
                JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
               Client client = dcf.createClient(wsUrl);
                Object[]  res = client.invoke(method, arg); 
                return (String) res[0];
              }

           
           public static void main(String[] args)throws Exception {
            //URL 組成:http://110.168.1.121:8080/seal  ;第二部分:ws/這個(gè)是在web.xml配置的一個(gè)攔截地址; 第三部分: SealHandOverService?wsdl 是接口中發(fā)部的
            String s=WebServiceClientTest.callService("http://110.168.1.121:8080/seal/ws/SealHandOverService?wsdl", "getDocumentByBantchNo", new Object[]{"67801100060039"});
           System.out.println(s);
            WebServiceClientTest.testCxfClient();
           }

          }

          這個(gè)測(cè)試類(lèi)里有兩個(gè)方法,應(yīng)該差不多從注釋可以看明白什么意思。

          以上方法都在項(xiàng)目中正確調(diào)用通過(guò)。
           

          以下是網(wǎng)上的一此方法:

          由于我們通常不知道提供Web Service的服務(wù)器接口及其相關(guān)類(lèi)的代碼,我們也不可能從他人那里獲得。

          對(duì)此,CXF提供了一些命令行工具,在CXF_HOME/bin下(這里是你下載的CXF包下有目錄)。

          使用wsdl2java,可以根據(jù)從服務(wù)器返回的wsdl文件生成我們所需要的java接口和相關(guān)類(lèi)。

          在上面的工程中,我們可以用以下命令生成JAVA代碼,而不是從第一個(gè)工程中復(fù)制過(guò)來(lái)。

          wsdl2java -p client http://110.168.1.121:8080/seal/ws/SealHandOverService?wsdl (需要在cmd窗口中將路徑切換至CXF_HOME/bin下)
           例如:F:\apache-cxf-2.2.7\bin>wsdl2java -d E:\programFiles -client  http://127.0.0.1/services/AlarmInformationServices?wsdl

          (解釋?zhuān)簑sdljava    –p    包路徑    –d    目標(biāo)文件夾   wsdl 的url地址)

           -p  是指生成客戶端代碼存放位置;


          需要注意的是,對(duì)于接口類(lèi)和相關(guān)類(lèi)的包路徑,一定要和服務(wù)器的一樣, 即:如果服務(wù)接口包路徑和實(shí)現(xiàn)類(lèi)路徑,要和客戶端一致。

          否則,會(huì)出現(xiàn)org.apache.cxf.interceptor.Fault: Unexpected wrapper element {****}addResponse found.……錯(cuò)誤。




           


          評(píng)論

          # re: CXF2.3.0 +myEclipse 8.5 +tomcat 6.0 +sping 3.0.5 集成方案  回復(fù)  更多評(píng)論   

          2011-05-26 15:50 by wls
          運(yùn)行client文件的時(shí)候報(bào)
          log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
          log4j:WARN Please initialize the log4j system properly.
          2011-5-26 15:46:49 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
          信息: Creating Service {http://dao/}IUserServiceService from class dao.IUserService
          2011-5-26 15:46:50 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
          信息: Creating Service {http://dao/}IUserServiceService from class dao.IUserService
          this is the message:adfasdf
          獲得數(shù)據(jù)庫(kù)連接oracle.jdbc.driver.T4CConnection@1719f30
          數(shù)據(jù)庫(kù)連接測(cè)試:adfasdf
          2011-5-26 15:46:51 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
          信息: Creating Service {http://dao/}IUserServiceService from class dao.IUserService
          javax.xml.ws.soap.SOAPFaultException: Fault occurred while processing.
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
          at $Proxy31.getSomething(Unknown Source)
          at test.Client.getText(Client.java:24)
          at test.Client.testCxfClient(Client.java:52)
          at test.Client.main(Client.java:70)
          Caused by: org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing.
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
          at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:99)
          at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
          at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
          at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:759)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2337)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2195)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2039)
          at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
          at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
          at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:520)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:317)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:269)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
          ... 4 more
          找了很久沒(méi)有找到原因,您能給回復(fù)一下么

          # re: CXF2.3.0 +myEclipse 8.5 +tomcat 6.0 +sping 3.0.5 集成方案  回復(fù)  更多評(píng)論   

          2011-05-26 16:26 by wls
          使用的cxf2.3.4

          # re: CXF2.3.0 +myEclipse 8.5 +tomcat 6.0 +sping 3.0.5 集成方案  回復(fù)  更多評(píng)論   

          2011-08-05 09:50 by 淘寶女裝
          寫(xiě)的太長(zhǎng)了,

          # re: CXF2.3.0 +myEclipse 8.5 +tomcat 6.0 +sping 3.0.5 集成方案  回復(fù)  更多評(píng)論   

          2011-08-05 14:51 by 淘寶女裝
          郁悶,,,spring配置出錯(cuò)了

          # re: CXF2.3.0 +myEclipse 8.5 +tomcat 6.0 +sping 3.0.5 集成方案  回復(fù)  更多評(píng)論   

          2011-08-08 16:55 by vinsonnubo
          我也是用spring自動(dòng)掃描實(shí)現(xiàn)service注入,但是當(dāng)我調(diào)用ws方法時(shí)無(wú)法注入成功,請(qǐng)問(wèn)是什么原因呢?

          # re: CXF2.3.0 +myEclipse 8.5 +tomcat 6.0 +sping 3.0.5 集成方案  回復(fù)  更多評(píng)論   

          2011-08-16 17:41 by 張釗釗
          @vinsonnubo
          什么異常?service 層,是不是寫(xiě)上了@Service這個(gè)標(biāo)志了

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 陇西县| 来凤县| 松溪县| 汉川市| 南平市| 屏东县| 大新县| 澜沧| 翁牛特旗| 竹北市| 通许县| 光山县| 竹溪县| 永平县| 砚山县| 左贡县| 额敏县| 泽库县| 霍城县| 康定县| 大方县| 吉安市| 张家港市| 宁化县| 东阿县| 汤阴县| 阜城县| 黄平县| 汉源县| 余姚市| 乐至县| 虎林市| 富民县| 兴国县| 会理县| 元谋县| 疏附县| 陈巴尔虎旗| 罗江县| 大邑县| 年辖:市辖区|