waterye

          XFire Quick Start

          XFire is a next-generation java SOAP framework. XFire makes service oriented development approachable through its easy to use API and support for standards. It is also highly performant since it is built on a low memory StAX based model.

          Quick Start

          1. download and unzip xfire-all-1.0-M6a.zip
          2. cd examples/book
          3. maven war
          小插曲1: 安裝Maven(第一次使用, 解壓后將bin目錄增加進PATH即可), maven 2.0不兼容1.x(沒進一步了解), 某些jar下載不到時, 將jar放進maven Repository(估計有方法disable download的)
          4. deploy xfire-demo.war to Tomcat

          Access the WSDL via: http://localhost:8080/xfire-demo/services/BookService?wsdl


          創建SOAP客戶端
          小插曲2: test case并沒有client測試程序(XFire找不到相關Util Class), 對于Hello World程序, copy paste是首選方法, wuyu的接觸xfire使用vs2005的J#, 自由的天空的web service 實踐(1)使用C#, 似乎使用MS的技術創建SOAP客戶端更簡單, 劉冬的應用AXIS開始Web 服務之旅(Java的, 可以參考)
          1. use WSDL2Java
          Java -Djava.ext.dirs=lib org.apache.axis.wsdl.WSDL2Java http://localhost:8080/xfire-demo/services/BookService?wsdl

          2. BookCilentTest.java

           1package org.codehaus.xfire;
           2
           3import org.codehaus.xfire.BookService.BookServiceLocator;
           4import org.codehaus.xfire.BookService.BookService;
           5import org.codehaus.xfire.BookService.BookServicePortType;
           6import org.codehaus.xfire.demo.Book;
           7
           8public class BookCilentTest {
           9 public static void main(String[] args) throws Exception{
          10  BookService service = new BookServiceLocator();
          11  BookServicePortType serviceType = service.getBookServiceHttpPort(); 
          12  Book[] books = serviceType.getBooks();
          13   
          14  for (int i = 0; i < books.length; i ++)
          15  {
          16            Book book = (Book) books[i];
          17            System.out.println("title:" + book.getTitle());
          18            System.out.println("isbn:" + book.getIsbn());
          19            System.out.println("author:" + book.getAuthor());
          20            System.out.println("");
          21        }

          22 }

          23}

          posted on 2005-12-05 23:25 waterye 閱讀(2236) 評論(7)  編輯  收藏 所屬分類: Web Services

          Feedback

          # re: XFire Quick Start 2005-12-06 16:13 胡子魚

          以后有什么新的JAVA方面技術,到這里就行了:)  回復  更多評論   

          # re: XFire Quick Start 2005-12-06 18:08 Water Ye

          現在還是1.0-M6a, 連examples/spring都有bug, 在項目中使用請謹慎

          <property name="service">
          <ref bean="echoBean"/>
          </property>
          改為
          <property name="serviceBean">
          <ref bean="echoBean"/>
          </property>

          XFireExporter暫時不支持no interface的Service  回復  更多評論   

          # re: XFire Quick Start 2005-12-08 18:29 Water Ye@ITO

          XFire也有客戶端測試: http://xfire.codehaus.org/Client+API
          在spring+hibernate的測試環境中還有bug, 等待新版本

          發現xfire完全copy spring的factory bean機制, 代碼風格看上去好像同一Team寫的  回復  更多評論   

          # re: XFire Quick Start 2005-12-14 17:46 yapex

          利用xfire Client API也能夠很容易完成任務,參考http://xfire.codehaus.org/Client+API  回復  更多評論   

          # re: XFire Quick Start 2006-02-28 10:40 Water Ye

          XFire 1.0 Released

          XFire 1.0 features include:
          * Support for WSDL 1.1, SOAP 1.1 and 1.2, WS-Addressing, WS-I Basic Profile 1.1
          * Pluggable bindings for POJOs, XMLBeans, JAXB 1.1, JAXB 2.0, and Castor support
          * Support for many different transports - HTTP, JMS, XMPP, In-JVM, etc.
          * Spring, Pico, Plexus, Loom, and Yan support
          * Embeddable and Intuitive API
          * Client and server stub generation
          * JSR 181 2.0 API to configure services via Java 5 and 1.4 (Commons attributes JSR 181 syntax)
            回復  更多評論   

          # re: XFire Quick Start 2006-09-14 13:35 hhe

          撩撩完事,很是不經心啊,看來又是轉貼  回復  更多評論   

          # re: XFire Quick Start 2007-01-11 08:09 ju french

          Hello everybody

          Someone has succesfully work with Xfire??
          I have problem with the example book :
          javax.servlet.ServletException: Error initializing XFireServlet.

          if you may help me, thank you very much

          +  回復  更多評論   


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 永善县| 新化县| 德钦县| 敦煌市| 绥德县| 富平县| 黑河市| 惠来县| 会理县| 麻江县| 长治县| 通化县| 科技| 安新县| 军事| 遵义县| 南宁市| 洞头县| 介休市| 宕昌县| 巧家县| 安达市| 井陉县| 华蓥市| 新干县| 金秀| 江陵县| 葵青区| 连江县| 阿图什市| 雷山县| 乾安县| 孟津县| 三江| 永年县| 繁昌县| 苍梧县| 井研县| 务川| 中卫市| 乐东|