资源简介

利用Myeclipse+axis2+mysql实现的一个简单的webservice,这是一个简单的图书管理程序,有添加图书,删除图书和查询图书,还有简单的管理权限控制,是最为基础的一个webservice实例。

资源截图

代码片段和文件信息


/**
 * MyServiceStub.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis2 version: 1.6.2  Built on : Apr 17 2012 (05:33:49 IST)
 */
        package myclient;

        

        /*
        *  MyServiceStub java implementation
        */

        
        public class MyServiceStub extends org.apache.axis2.client.Stub
        {
        protected org.apache.axis2.description.AxisOperation[] _operations;

        //hashmaps to keep the fault mapping
        private java.util.HashMap faultExceptionNameMap = new java.util.HashMap();
        private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap();
        private java.util.HashMap faultMessageMap = new java.util.HashMap();

        private static int counter = 0;

        private static synchronized java.lang.String getUniqueSuffix(){
            // reset the counter if it is greater than 99999
            if (counter > 99999){
                counter = 0;
            }
            counter = counter + 1; 
            return java.lang.Long.toString(java.lang.System.currentTimeMillis()) + “_“ + counter;
        }

    
    private void populateAxisService() throws org.apache.axis2.AxisFault {

     //creating the Service with a unique name
     _service = new org.apache.axis2.description.AxisService(“MyService“ + getUniqueSuffix());
     addAnonymousOperations();

        //creating the operations
        org.apache.axis2.description.AxisOperation __operation;

        _operations = new org.apache.axis2.description.AxisOperation[6];
        
                   __operation = new org.apache.axis2.description.OutInAxisOperation();
                

            __operation.setName(new javax.xml.namespace.QName(“http://service“ “queryBookAll“));
    _service.addOperation(__operation);
    

    
    
            _operations[0]=__operation;
            
        
                   __operation = new org.apache.axis2.description.OutInAxisOperation();
                

            __operation.setName(new javax.xml.namespace.QName(“http://service“ “queryBook“));
    _service.addOperation(__operation);
    

    
    
            _operations[1]=__operation;
            
        
                   __operation = new org.apache.axis2.description.OutInAxisOperation();
                

            __operation.setName(new javax.xml.namespace.QName(“http://service“ “administor“));
    _service.addOperation(__operation);
    

    
    
            _operations[2]=__operation;
            
        
                   __operation = new org.apache.axis2.description.OutInAxisOperation();
                

            __operation.setName(new javax.xml.namespace.QName(“http://service“ “deleteBook“));
    _service.addOperation(__operation);
    

    
    
            _operations[3]=__operation;
            
        
                   __operation = new org.apache.axis2.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-04-24 22:38  图书馆\
     文件          54  2014-04-24 22:35  图书馆\admin.sql
     文件         403  2014-04-24 22:35  图书馆\book.sql
     目录           0  2014-04-25 09:18  图书馆\bookclient\
     文件        7371  2014-04-25 09:18  图书馆\bookclient\.classpath
     文件         386  2014-04-25 09:18  图书馆\bookclient\.project
     目录           0  2014-04-25 09:18  图书馆\bookclient\.settings\
     文件         629  2014-04-25 09:18  图书馆\bookclient\.settings\org.eclipse.jdt.core.prefs
     目录           0  2014-04-24 22:31  图书馆\bookclient\bin\
     目录           0  2014-04-25 09:18  图书馆\bookclient\bin\myclient\
     文件        3462  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$Administor$Factory.class
     文件        8079  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$Administor.class
     文件        3367  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$AdministorResponse$Factory.class
     文件        7529  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$AdministorResponse.class
     文件        3256  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$DeleteBook$Factory.class
     文件        7542  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$DeleteBook.class
     文件        3388  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$DeleteBookResponse$Factory.class
     文件        7550  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$DeleteBookResponse.class
     文件        1006  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$ExtensionMapper.class
     文件        2799  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$GetGreeting$Factory.class
     文件        6926  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$GetGreeting.class
     文件        3324  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$GetGreetingResponse$Factory.class
     文件        7613  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$GetGreetingResponse.class
     文件        4200  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$InsertBook$Factory.class
     文件        9764  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$InsertBook.class
     文件        3388  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$InsertBookResponse$Factory.class
     文件        7550  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$InsertBookResponse.class
     文件        3249  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$QueryBook$Factory.class
     文件        7536  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$QueryBook.class
     文件        2806  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$QueryBookAll$Factory.class
     文件        6932  2014-04-25 09:18  图书馆\bookclient\bin\myclient\MyServiceStub$QueryBookAll.class
............此处省略58个文件信息

评论

共有 条评论