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目錄增加進(jìn)PATH即可), maven 2.0不兼容1.x(沒進(jìn)一步了解), 某些jar下載不到時(shí), 將jar放進(jìn)maven Repository(估計(jì)有方法disable download的)
          4. deploy xfire-demo.war to Tomcat

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


          創(chuàng)建SOAP客戶端
          小插曲2: test case并沒有client測試程序(XFire找不到相關(guān)Util Class), 對于Hello World程序, copy paste是首選方法, wuyu的接觸xfire使用vs2005的J#, 自由的天空的web service 實(shí)踐(1)使用C#, 似乎使用MS的技術(shù)創(chuàng)建SOAP客戶端更簡單, 劉冬的應(yīng)用AXIS開始Web 服務(wù)之旅(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方面技術(shù),到這里就行了:)  回復(fù)  更多評論   

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

          現(xiàn)在還是1.0-M6a, 連examples/spring都有bug, 在項(xiàng)目中使用請謹(jǐn)慎

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

          XFireExporter暫時(shí)不支持no interface的Service  回復(fù)  更多評論   

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

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

          發(fā)現(xiàn)xfire完全copy spring的factory bean機(jī)制, 代碼風(fēng)格看上去好像同一Team寫的  回復(fù)  更多評論   

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

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

          # 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)
            回復(fù)  更多評論   

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

          撩撩完事,很是不經(jīng)心啊,看來又是轉(zhuǎn)貼  回復(fù)  更多評論   

          # 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

          +  回復(fù)  更多評論   


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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 平湖市| 泸定县| 邵东县| 庐江县| 昆明市| 凌海市| 延寿县| 石家庄市| 旬邑县| 神池县| 仙居县| 临颍县| 襄樊市| 油尖旺区| 肥乡县| 应用必备| 连城县| 玉环县| 叙永县| 北海市| 五华县| 丽水市| 汤原县| 平凉市| 内江市| 鹤岗市| 石河子市| 织金县| 九江市| 贵阳市| 建瓯市| 东乡族自治县| 永善县| 南安市| 白水县| 右玉县| 莱西市| 万盛区| 辉南县| 宁津县| 淮滨县|