Developing a Web Service from a WSDL Description (Top down approach)

  1. Download Addition.wsdl
  2. Define the following directory/file structure:
      - Addition
        - META-INF
          - Addition.wsdl
  1. Generate the Java files on the server side using the following command:
    wsdl2java.bat -uri META-INF/Addition.wsdl -p addition -d adb -s -ss -sd -ssi
    
    or 
    
    wsdl2java.bat -uri META-INF/Addition.wsdl -p addition -d adb -s -ss -sd -ssi .
    
       
  2. Add service processing logic to the server implementation class (AdditionServiceSkeleton.java):
    int a = additionner0.getEntier1();
    int b = additionner0.getEntier2();
    calculette.AdditionnerResponse resp = new calculette.AdditionnerResponse();	
    resp.setResultat1(a+b);
    return resp;
  3. start an axis server with the service by running ant start.server.
  4. Deploy the service on Axis by copying build/lib/AdditionService.aar to /repository/services directory of axis.
  5. Write a client to query this service (by running wsdl2java.sh -uri http://localhost:8080/axis2/services/AdditionService?wsdl -d adb)
teaching_assistant/web_services/web_service_top_down.txt · Last modified: 2023/09/19 12:00 by IT Courses (NNC)
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0