SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
The Software Environment
       Writing WS Consumers
        Writing WS Providers




Consuming, Providing & Publishing WS

               Ioannis G. Baltopoulos

            Department of Computer Science
               Imperial College London


  Inverted CERN School of Computing, 2005
             Geneva, Switzerland




        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                 Writing WS Consumers
                  Writing WS Providers




    The Software Environment
1
      The tools
      Apache Axis

    Writing WS Consumers
2
     Using WSDL2Java

    Writing WS Providers
3
     Using Java2WSDL
     UDDI Overview
     Publishing Services on UDDI




                  Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                                              The tools
                    Writing WS Consumers
                                              Apache Axis
                     Writing WS Providers


The Software Environment

  For this tutorial we are going to use the following software
  environment.
      Java
      Producers and Consumers will be based on Java version 1.4.2.
      Eclipse
      THE IDE for writing Java code. Version used is 3.1M4
      Ant
      Build tool used for automating the development process.
      Tomcat
      The Web Application container hosting the WS.
      Axis
      An open source WS implementation for Java; currently in
      version 1.2RC2.

                     Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                                                     The tools
                           Writing WS Consumers
                                                     Apache Axis
                            Writing WS Providers


Apache Tomcat (5.0.28)
Installation and Notes




   Web Site
   http://jakarta.apache.org/tomcat/

   Step by step installation
          Download the required file from
      1

          http://jakarta.apache.org/site/binindex.cgi#tomcat
          Extract the downloaded file in a directory of your choice.
      2


          Start the server from tomcat/bin/startup
      3


          Validate installation by going to http://localhost:8080/
      4




                            Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                                                     The tools
                           Writing WS Consumers
                                                     Apache Axis
                            Writing WS Providers


Apache Axis
Installation and Notes


   Web Site
   http://ws.apache.org/axis/

   Step by step installation
          Download the required file from
      1

          http://ws.apache.org/axis/releases.html
          Extract the downloaded file in a directory of your choice.
      2


          Copy the axis/webapps directory to tomcat/webapps.
      3


          Restart the web server.
      4


          Validate installation by going to
      5

          http://localhost:8080/axis/happyaxis.jsp

                            Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                                                 The tools
                       Writing WS Consumers
                                                 Apache Axis
                        Writing WS Providers


Apache Axis
The Purpose of the Application


   Definition
   Axis is the means by which SOAP messages are taken from the
   transport layer and are handed to the Web Service and the means
   by which any response is formatted in SOAP messages and sent
   back to the requester.

                                                  Structure of a Webapp
     It is in itself a web application.
                                                  ROOT
     Comes with many useful tools
                                                      WEB-INF
          Java2WSDL
                                                         classes
          WSDL2Java
                                                         lib
          Administration Client
                                                         web.xml
          TCP Monitor
          SOAP Monitor                                   server-config.wsdd

                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                                                The tools
                      Writing WS Consumers
                                                Apache Axis
                       Writing WS Providers


Apache Axis
Architectural Components



        Axis Engine - The main entry point into the SOAP processor
        Handlers - The basic building blocks inside Axis that link
        Axis to existing back-end systems
        Chain - An ordered collection of handlers
        Transports - Mechanisms by which SOAP messages flow in
        and out of Axis
        Deployment/Configuration - Means through which Web
        Services are made available through Axis
        Serializers/Deserializers - Code that will convert native
        datatypes into XML and back.


                       Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                                          The tools
                Writing WS Consumers
                                          Apache Axis
                 Writing WS Providers


Axis Architectural Diagram




                 Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                       Writing WS Consumers      Using WSDL2Java
                        Writing WS Providers


WS Consumers
The process of writing a consumer




         Locate the wsdl file for the service you’re interested in.
         Use WSDL2Java to generate the stub classes.
         Writing the actual client code.




                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                      Writing WS Consumers      Using WSDL2Java
                       Writing WS Providers


WSDL2Java
Command line and options

   A tool for generating glue code in writing consumers and providers.
   Command Line
   java org.apache.axis.wsdl.WSDL2Java wsdl-file

Options                                                       NOTE
                     Used to specify the                      The following files must
  -o directory
                     output directory                         be on the CLASSPATH.
                                                                       axis.jar
                     Package specification
  -p package
                                                               commons-discovery.jar
                     for the output files
                                                                commons-logging.jar
                     Verbose output
  -v
                                                                      jaxrpc.jar
                     Generate test files
  -t
                                                                       saaj.jar
                     Generate server side
  -s
                                                                      wsdl4j.jar
                     code
                       Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                       Writing WS Consumers      Using WSDL2Java
                        Writing WS Providers


Example Usage
Using a public weather web service



   Capeclear offers a public weather service where given the location
   code of an airport (”LHR”,”LGW”, etc) it returns a complete
   weather report including temperature, humidity, wind direction.
   Example
   WSDL2Java.bat

   http://live.capescience.com/wsdl/GlobalWeather.wsdl
       -o %PROJECT BASE%srcjava
       -p ch.cern.it.csc
       -v



                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                      Writing WS Consumers      Using WSDL2Java
                       Writing WS Providers


Generated Files
What gets generated from the WSDL file


    WSDL clause                         Java class(es) generated
    For each <type>                     A java class.
                                        A holder if this type is used as an in-
                                        out/out parameter
    For each <portType>                 A java interface
    For each <binding>                  A stub class
    For each <service>                  A service interface.
                                        A service implementation (locator)
    For each <binding>                  A skeleton class
                                        An implementation template class
    For all <services>                  One deploy.wsdd file
                                        One undeploy.wsdd file


                       Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                       Writing WS Consumers      Using WSDL2Java
                        Writing WS Providers


Generated Files
Relationship & Location of generated files




                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment
                        Writing WS Consumers      Using WSDL2Java
                         Writing WS Providers


Client Code Example
Tying all the generated files together!


   Example
   import java.rmi.RemoteException;

   public class Client {
      public static void main(String[] args) {
          ServiceLocator locator = new ServiceLocator();
          ServicePort service = locator.getService();
          try {
              Report report = service.getReport(quot;Statusquot;);
          } catch (RemoteException e) {
              e.printStackTrace();
          }
      }
   }
                         Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                       Writing WS Consumers      UDDI Overview
                        Writing WS Providers     Publishing Services on UDDI


Writing Providers
The two approaches




        Instant Deployment
        Very simple way of providing a Web Service
        Customized Deployment
        More elaborate




                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                    Writing WS Consumers      UDDI Overview
                     Writing WS Providers     Publishing Services on UDDI


Instant Deployment

  Step by step
        Copy any Java source file that implements a web service into
    1

        the axis directory
            no special code is required
            all public, non-static methods are exposed
            if the class is in a package, copy it to the appropriate
            subdirectory
        Change the file extension from .java to .jws
    2


        Place all related .class files under WEB-INF/classes
    3


        View the WSDL of a JWS web service using the following
    4

        URL in a web browser
        http://host:port/axis/filename.jws?wsdl


                     Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                      Writing WS Consumers      UDDI Overview
                       Writing WS Providers     Publishing Services on UDDI


Example
An example using Instant Deployment



   A very simple banking web service. The bank allows the following
   four operations
        Create an Account
        Get the balance of an Account
        Withdraw a given amount from an Account
        Deposit a given amount to an Account
   To implement it we will use two basic classes
        A class Account
        A BankingService class



                       Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                 Writing WS Consumers      UDDI Overview
                  Writing WS Providers     Publishing Services on UDDI


The Account class

  public class Account {
       private String number;
       private String owner;
       private double balance;
       public void withdraw(double amount) {
            balance -= amount;
       }
       public void deposit(double amount) {
            balance += amount;
       }
       public double getBalance() {
            return balance;
       }
  }

                  Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                 Writing WS Consumers      UDDI Overview
                  Writing WS Providers     Publishing Services on UDDI


The BankingService class

  public class BankingService {
       public void withraw(Account ac, double amount) {
            ac.withdraw(amount);
       }
       public void deposit(Account ac, double amount) {
            ac.deposit(amount);
       }
       public Account createAccount(String owner) {
            return new Account();
       }
       public double getBalance(Account ac) {
            return ac.getBalance();
       }
  }

                  Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment      Using Java2WSDL
                         Writing WS Consumers        UDDI Overview
                          Writing WS Providers       Publishing Services on UDDI


The Result
A trivial banking service




    Step by step
          We’ve written the code.
      1


          Copy the BankingService file under axis.
      2


          Change the file extension from .java to .jws
      3


          Compile and copy the Account.class file under
      4

          WEB-INF/classes
          View the WSDL of the Banking Service using the following
      5

          URL in a web browser
          http://host:8080/axis/BankingService.jws?wsdl



                            Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                        Writing WS Consumers      UDDI Overview
                         Writing WS Providers     Publishing Services on UDDI


Limitations
The limitations of using instant deployment



   The use of instant deployment is only intended for simple web
   services. Here are some reasons why this is so
         You cannot use packages in the pages
         As the code is compiled at run time you can not find out
         about errors until after deployment.
         There is limited control over the serialization/deserialization
         process.
         The actual source code is placed on the web server
         Sometimes the source code is not available



                         Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                       Writing WS Consumers      UDDI Overview
                        Writing WS Providers     Publishing Services on UDDI


Using Custom Deployment
The process of creating a Web Service


   Step by step
          Write a Facade interface the subsystem you want to expose as
      1

          a Web Service.
          Create a WSDL file either manually or by using the
      2

          Java2WSDL tool that comes with Axis.
          Create Bindings using the WSDL2Java tool making sure to
      3

          activate the options for emitting server side code as well as
          deployment descriptors.
          Package all the files in a .jar file
      4


          Copy the file to the WEB-INF/lib
      5


          Use the AdminClient tool to deploy the Web Services to Axis.
      6




                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment       Using Java2WSDL
                      Writing WS Consumers         UDDI Overview
                       Writing WS Providers        Publishing Services on UDDI


Java2WSDL
Command line and options



   A tool for generating a WSDL file from existing Java code
   Command Line
   java org.apache.axis.wsdl.Java2WSDL wsdl-file

   Options
                                                Specifies the output filename
       -o   filename
                                                Specifies the URI of the service
       -l   uri
                                                Target namespace of the wsdl
       -n   namespace
                                                Generate test files
       -p   package namespace
                                                Verbose output
       -v



                       Ioannis G. Baltopoulos      Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                    Writing WS Consumers      UDDI Overview
                     Writing WS Providers     Publishing Services on UDDI


Generate Server Side Bindings
Using WSDL2Java




   The next step in the process is generating the server side bindings
   and the deployment descriptors (deploy.wsdd, undeploy.wsdd).
       Run the WSDL2Java tool using the -s and -S options (see
       earlier slides for consumer generation).
       Discard the client specific files
       Package all the .class files in a .jar file. Use
                      jar cvf filename.jar file(s)
       Copy the generated file into the WEB-INF/lib directory.




                     Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                       Writing WS Consumers      UDDI Overview
                        Writing WS Providers     Publishing Services on UDDI


Service Deployment
Using the AdminClient tool and the .wsdd files

   Deployment Descriptor Files
         End with .wsdd (usually named deploy.wsdd and
         undeploy.wsdd)
         Specifies Axis components to be deployed or undeployed
         Specifies special type mappings between XML and Java

   Command Line
   java org.apache.axis.client.AdminClient filename.wsdd

   Options
                                       Specifies the host
           -h host
                                       Specifies the port
           -p port
                                       Sets the path to the Axis Servlet
           -s servletPath
                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                       Writing WS Consumers      UDDI Overview
                        Writing WS Providers     Publishing Services on UDDI


Web Services at CERN
How to structure your projects


      The structure of a new Web
      Services project is exactly the                Structure of a Webapp
      same as a Web Application.                     ROOT
      To start, you can copy the axis                    WEB-INF
      web application to your                               classes
      workspace,                                            lib
                                                            web.xml
      remove the axis-specific files
                                                            server-config.wsdd
     and you have an empty Web
     Services project!
   NOTE: The server-config.wsdd file was extracted from the
   axis.jar. This is the file that needs to be updated with the contents
   of deploy.wsdd.

                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                     Writing WS Consumers      UDDI Overview
                      Writing WS Providers     Publishing Services on UDDI


Web Services at CERN
Where and how to deploy them


   Step by step deployment
         Edit the server-config.wsdd file and copy the contents of
     1

         the deploy.wsdd file that was created by WSDL2Java.
         Edit the web.xml file so that it reflects the name of your
     2

         application and the URL you want to use.
         Pack application in a .war file using the following command:
     3


                       jar cvf filename.jar file(s)
         Go to the URL:
     4


                         http://lxb0752.cern.ch/jps
         Point file field to your .war file and you’re done!
     5



   For more information about this specific service talk to Michal Kwiatek.
                      Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                       Writing WS Consumers      UDDI Overview
                        Writing WS Providers     Publishing Services on UDDI


UDDI Overview
Universal Description, Discovery and Integration (UDDI)


   Definition
   UDDI is a specification for creating distributed Web-based
   registries of Web services. It defines
         A UDDI registry which stores information on businesses, the
         services offered by these businesses, and technical information
         about these services.
         The data model and programming API that provides a way
         to publish and locate all kinds of services.

   Specifically, UDDI is said to support three kinds of registry data
         White Pages (organizing businesses by name)
         Yellow Pages (organizing businesses by category)
         Green Pages (organizing businesses by service)
                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                       Writing WS Consumers      UDDI Overview
                        Writing WS Providers     Publishing Services on UDDI


The Colored Papers
White, yellow and green pages


White Pages
                                                 Yellow Pages
They contain information on a
                                                 Yellow pages contain categorized
business itself, including
                                                 information about the services
      A name,                                    provided by a business.
      Contact details                                   Categorization is done by
                                                        assigning one or more
      Location of the business
                                                        taxonomies to the business.
      Unique identifiers

   Green Pages
   Green pages contain technical information about a service which a
   business offers. You can find information like
         Service location
         the category to which this service belongs
                        Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                         Writing WS Consumers      UDDI Overview
                          Writing WS Providers     Publishing Services on UDDI


UDDI Data structures
Specifying entries in the Registry

    UDDI defines five data type structures to specify an entry in the
    registry. Each of these data structures is represented by an XML
    document, containing both technical and descriptive information.
    These are:



       <businessEntity>
       <businessService>
       <bindingTemplate>
       <tModel>
       <publisherAssertion>


                          Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                   Writing WS Consumers      UDDI Overview
                    Writing WS Providers     Publishing Services on UDDI


Data Structure Details I
  <businessEntity>
  The businessEntity structure contains all descriptive information
  about the business and the services it offers. Information includes
  name and description of the business as well as contact
  information, categorization, and relationships to other businesses.
  This structure can be seen as the top-level structure of the service
  in the registry.

  <businessService>
  Each businessEntity structure contains one or more businessService
  structures. A businessService structure describes a categorized set
  of services a business offers. A businessService element is not
  owned by one businessEntity element, but can be shared among
  multiple businesses.
                    Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                   Writing WS Consumers      UDDI Overview
                    Writing WS Providers     Publishing Services on UDDI


Data Structure Details II
  <bindingTemplate>
  The bindingTemplate structure contains a technical description of
  a service. Each bindingTemplate belongs to a single
  businessService element.

  <tModel>
  One of the key elements of UDDI is the tModel. A tModel
  describes the specification, the behavior, the concept, or even the
  shared design to which a service complies. It provides specific
  information about how to interact with this service. The content
  of a tModel structure consists of a key, a name, an optional
  description, and a URL element. The URL, in most cases, points
  to a location where you can find more information about this
  particular tModel. Two conventions have been applied for using
  tModels.
                    Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                   Writing WS Consumers      UDDI Overview
                    Writing WS Providers     Publishing Services on UDDI


Data Structure Details III


  <publisherAssertion>
  The publisherAssertion structure contains information about a
  relationship between two parties asserted by one or both. Many
  businesses, such as large corporations or marketplaces, are not
  effectively represented by a single businessEntity. A
  publisherAssertion can be used to denote the relationship between
  the businesses. The content of a publisherAssertion structure
  consists of a key (fromKey) for the first business, a key (toKey) of
  the second business, and a reference (keyedReference) that
  designates the asserted relationship in terms of a keyName,
  keyValue pair within a tModel.



                    Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                      Writing WS Consumers      UDDI Overview
                       Writing WS Providers     Publishing Services on UDDI


Publishing Services on UDDI
The manual way of doing things




   Step by step installation
          Logon to http://www.uddi.org/
      1


          Select a registry from IBM, Microsoft, SAP or NTT
      2


          Obtain login and password
      3


          Follow the step by step instructions on the website
      4




                       Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS
The Software Environment    Using Java2WSDL
                   Writing WS Consumers      UDDI Overview
                    Writing WS Providers     Publishing Services on UDDI


Concluding Remarks


  In this lecture we saw
      the software environment for developing and deploying Web
      Services in Java
      how to write Web Service consumers
      how to write Web Service providers using instant and custom
      deployment deployment.
      what UDDI is and how to manually publish Web Services to
      the Registry.




                    Ioannis G. Baltopoulos   Consuming, Providing & Publishing WS

Weitere ähnliche Inhalte

Was ist angesagt?

Moving a Windows environment to the cloud - DevOps Galway Meetup
Moving a Windows environment to the cloud - DevOps Galway MeetupMoving a Windows environment to the cloud - DevOps Galway Meetup
Moving a Windows environment to the cloud - DevOps Galway MeetupGiulio Vian
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09Michael Neale
 
Deploying a Kubernetes App with Amazon EKS
Deploying a Kubernetes App with Amazon EKSDeploying a Kubernetes App with Amazon EKS
Deploying a Kubernetes App with Amazon EKSLaura Frank Tacho
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platformAlfresco Software
 
Configuring was webauth
Configuring was webauthConfiguring was webauth
Configuring was webauthnagesh1003
 
JBoss started guide
JBoss started guideJBoss started guide
JBoss started guidefranarayah
 
Sql server 2012 ha and dr sql saturday boston
Sql server 2012 ha and dr sql saturday bostonSql server 2012 ha and dr sql saturday boston
Sql server 2012 ha and dr sql saturday bostonJoseph D'Antoni
 
Microservices and containers for the unitiated
Microservices and containers for the unitiatedMicroservices and containers for the unitiated
Microservices and containers for the unitiatedKevin Lee
 
(ATS4-APP03) Top 10 things every Notebook administrator should know
(ATS4-APP03) Top 10 things every Notebook administrator should know(ATS4-APP03) Top 10 things every Notebook administrator should know
(ATS4-APP03) Top 10 things every Notebook administrator should knowBIOVIA
 
Sql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday RichmondSql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday RichmondJoseph D'Antoni
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell Youelliando dias
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Arun Gupta
 
Sql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampaSql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampaJoseph D'Antoni
 
IBM Monitoring and Diagnostics Tools - Health Center 3.0.2
IBM Monitoring and Diagnostics Tools - Health Center 3.0.2IBM Monitoring and Diagnostics Tools - Health Center 3.0.2
IBM Monitoring and Diagnostics Tools - Health Center 3.0.2Chris Bailey
 
Sql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dcSql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dcJoseph D'Antoni
 
(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...
(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...
(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...BIOVIA
 
JBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingJBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingAlexandre Cavalcanti
 

Was ist angesagt? (19)

Moving a Windows environment to the cloud - DevOps Galway Meetup
Moving a Windows environment to the cloud - DevOps Galway MeetupMoving a Windows environment to the cloud - DevOps Galway Meetup
Moving a Windows environment to the cloud - DevOps Galway Meetup
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09
 
Deploying a Kubernetes App with Amazon EKS
Deploying a Kubernetes App with Amazon EKSDeploying a Kubernetes App with Amazon EKS
Deploying a Kubernetes App with Amazon EKS
 
Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platform
 
Configuring was webauth
Configuring was webauthConfiguring was webauth
Configuring was webauth
 
J boss
J bossJ boss
J boss
 
JBoss started guide
JBoss started guideJBoss started guide
JBoss started guide
 
Sql server 2012 ha and dr sql saturday boston
Sql server 2012 ha and dr sql saturday bostonSql server 2012 ha and dr sql saturday boston
Sql server 2012 ha and dr sql saturday boston
 
Microservices and containers for the unitiated
Microservices and containers for the unitiatedMicroservices and containers for the unitiated
Microservices and containers for the unitiated
 
(ATS4-APP03) Top 10 things every Notebook administrator should know
(ATS4-APP03) Top 10 things every Notebook administrator should know(ATS4-APP03) Top 10 things every Notebook administrator should know
(ATS4-APP03) Top 10 things every Notebook administrator should know
 
PHP Con09: SVN Advanced
PHP Con09: SVN AdvancedPHP Con09: SVN Advanced
PHP Con09: SVN Advanced
 
Sql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday RichmondSql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday Richmond
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell You
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)
 
Sql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampaSql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampa
 
IBM Monitoring and Diagnostics Tools - Health Center 3.0.2
IBM Monitoring and Diagnostics Tools - Health Center 3.0.2IBM Monitoring and Diagnostics Tools - Health Center 3.0.2
IBM Monitoring and Diagnostics Tools - Health Center 3.0.2
 
Sql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dcSql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dc
 
(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...
(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...
(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...
 
JBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingJBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 Troubleshooting
 

Ähnlich wie Consuming, providing and publishing Web Services

Jasper report dependencies [by sc]
Jasper report dependencies [by sc]Jasper report dependencies [by sc]
Jasper report dependencies [by sc]santi caltabiano
 
How to generate a rest application - DevFest Vienna 2016
How to generate a rest application - DevFest Vienna 2016How to generate a rest application - DevFest Vienna 2016
How to generate a rest application - DevFest Vienna 2016johannes_fiala
 
Java Build Tools
Java Build ToolsJava Build Tools
Java Build Tools­Avishek A
 
Running Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic BeanstalkRunning Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic BeanstalkAmazon Web Services
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Amazon Web Services
 
Jcon 2017 How to use Swagger to develop REST applications
Jcon 2017 How to use Swagger to develop REST applicationsJcon 2017 How to use Swagger to develop REST applications
Jcon 2017 How to use Swagger to develop REST applicationsjohannes_fiala
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technologysshhzap
 
Jasper report dependencies [santi caltabiano]
Jasper report dependencies [santi caltabiano]Jasper report dependencies [santi caltabiano]
Jasper report dependencies [santi caltabiano]santi caltabiano
 
Intoduction to java
Intoduction to javaIntoduction to java
Intoduction to javajalinder123
 
Dr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to javaDr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to javaDrRajeshreeKhande
 
Rohit yadav cloud stack internals
Rohit yadav   cloud stack internalsRohit yadav   cloud stack internals
Rohit yadav cloud stack internalsShapeBlue
 
AWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and DockerAWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and DockerAmazon Web Services
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questionspraveen_guda
 
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...Amazon Web Services
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantMitchell Hashimoto
 

Ähnlich wie Consuming, providing and publishing Web Services (20)

Jasper report dependencies [by sc]
Jasper report dependencies [by sc]Jasper report dependencies [by sc]
Jasper report dependencies [by sc]
 
How to generate a rest application - DevFest Vienna 2016
How to generate a rest application - DevFest Vienna 2016How to generate a rest application - DevFest Vienna 2016
How to generate a rest application - DevFest Vienna 2016
 
Java Build Tools
Java Build ToolsJava Build Tools
Java Build Tools
 
Running Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic BeanstalkRunning Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic Beanstalk
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
 
JAVA CORE
JAVA COREJAVA CORE
JAVA CORE
 
Jcon 2017 How to use Swagger to develop REST applications
Jcon 2017 How to use Swagger to develop REST applicationsJcon 2017 How to use Swagger to develop REST applications
Jcon 2017 How to use Swagger to develop REST applications
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Docker
DockerDocker
Docker
 
Jasper report dependencies [santi caltabiano]
Jasper report dependencies [santi caltabiano]Jasper report dependencies [santi caltabiano]
Jasper report dependencies [santi caltabiano]
 
Java
JavaJava
Java
 
Bn1005 demo ppt core java
Bn1005 demo ppt core javaBn1005 demo ppt core java
Bn1005 demo ppt core java
 
Intoduction to java
Intoduction to javaIntoduction to java
Intoduction to java
 
Dr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to javaDr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to java
 
Docker in production
Docker in productionDocker in production
Docker in production
 
Rohit yadav cloud stack internals
Rohit yadav   cloud stack internalsRohit yadav   cloud stack internals
Rohit yadav cloud stack internals
 
AWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and DockerAWS Elastic Beanstalk - Running Microservices and Docker
AWS Elastic Beanstalk - Running Microservices and Docker
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing Vagrant
 

Mehr von Ioannis Baltopoulos

Advanced Issues and Future Trends
Advanced Issues and Future TrendsAdvanced Issues and Future Trends
Advanced Issues and Future TrendsIoannis Baltopoulos
 
The 7 Sins of Software Engineers in HEP
The 7 Sins of Software Engineers in HEPThe 7 Sins of Software Engineers in HEP
The 7 Sins of Software Engineers in HEPIoannis Baltopoulos
 
Secure Compilation of a Multi-Tier Web Language (TLDI)
Secure Compilation of a Multi-Tier Web Language (TLDI)Secure Compilation of a Multi-Tier Web Language (TLDI)
Secure Compilation of a Multi-Tier Web Language (TLDI)Ioannis Baltopoulos
 
Secure Compilation of a Multi-Tier Web Language (Semantics Lunch)
Secure Compilation of a Multi-Tier Web Language (Semantics Lunch)Secure Compilation of a Multi-Tier Web Language (Semantics Lunch)
Secure Compilation of a Multi-Tier Web Language (Semantics Lunch)Ioannis Baltopoulos
 

Mehr von Ioannis Baltopoulos (6)

Advanced Issues and Future Trends
Advanced Issues and Future TrendsAdvanced Issues and Future Trends
Advanced Issues and Future Trends
 
Introduction to Web Services
Introduction to Web ServicesIntroduction to Web Services
Introduction to Web Services
 
The 7 Sins of Software Engineers in HEP
The 7 Sins of Software Engineers in HEPThe 7 Sins of Software Engineers in HEP
The 7 Sins of Software Engineers in HEP
 
Secure Compilation of a Multi-Tier Web Language (TLDI)
Secure Compilation of a Multi-Tier Web Language (TLDI)Secure Compilation of a Multi-Tier Web Language (TLDI)
Secure Compilation of a Multi-Tier Web Language (TLDI)
 
Secure Compilation of a Multi-Tier Web Language (Semantics Lunch)
Secure Compilation of a Multi-Tier Web Language (Semantics Lunch)Secure Compilation of a Multi-Tier Web Language (Semantics Lunch)
Secure Compilation of a Multi-Tier Web Language (Semantics Lunch)
 
Audio Walks
Audio WalksAudio Walks
Audio Walks
 

Kürzlich hochgeladen

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Kürzlich hochgeladen (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Consuming, providing and publishing Web Services

  • 1. The Software Environment Writing WS Consumers Writing WS Providers Consuming, Providing & Publishing WS Ioannis G. Baltopoulos Department of Computer Science Imperial College London Inverted CERN School of Computing, 2005 Geneva, Switzerland Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 2. The Software Environment Writing WS Consumers Writing WS Providers The Software Environment 1 The tools Apache Axis Writing WS Consumers 2 Using WSDL2Java Writing WS Providers 3 Using Java2WSDL UDDI Overview Publishing Services on UDDI Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 3. The Software Environment The tools Writing WS Consumers Apache Axis Writing WS Providers The Software Environment For this tutorial we are going to use the following software environment. Java Producers and Consumers will be based on Java version 1.4.2. Eclipse THE IDE for writing Java code. Version used is 3.1M4 Ant Build tool used for automating the development process. Tomcat The Web Application container hosting the WS. Axis An open source WS implementation for Java; currently in version 1.2RC2. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 4. The Software Environment The tools Writing WS Consumers Apache Axis Writing WS Providers Apache Tomcat (5.0.28) Installation and Notes Web Site http://jakarta.apache.org/tomcat/ Step by step installation Download the required file from 1 http://jakarta.apache.org/site/binindex.cgi#tomcat Extract the downloaded file in a directory of your choice. 2 Start the server from tomcat/bin/startup 3 Validate installation by going to http://localhost:8080/ 4 Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 5. The Software Environment The tools Writing WS Consumers Apache Axis Writing WS Providers Apache Axis Installation and Notes Web Site http://ws.apache.org/axis/ Step by step installation Download the required file from 1 http://ws.apache.org/axis/releases.html Extract the downloaded file in a directory of your choice. 2 Copy the axis/webapps directory to tomcat/webapps. 3 Restart the web server. 4 Validate installation by going to 5 http://localhost:8080/axis/happyaxis.jsp Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 6. The Software Environment The tools Writing WS Consumers Apache Axis Writing WS Providers Apache Axis The Purpose of the Application Definition Axis is the means by which SOAP messages are taken from the transport layer and are handed to the Web Service and the means by which any response is formatted in SOAP messages and sent back to the requester. Structure of a Webapp It is in itself a web application. ROOT Comes with many useful tools WEB-INF Java2WSDL classes WSDL2Java lib Administration Client web.xml TCP Monitor SOAP Monitor server-config.wsdd Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 7. The Software Environment The tools Writing WS Consumers Apache Axis Writing WS Providers Apache Axis Architectural Components Axis Engine - The main entry point into the SOAP processor Handlers - The basic building blocks inside Axis that link Axis to existing back-end systems Chain - An ordered collection of handlers Transports - Mechanisms by which SOAP messages flow in and out of Axis Deployment/Configuration - Means through which Web Services are made available through Axis Serializers/Deserializers - Code that will convert native datatypes into XML and back. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 8. The Software Environment The tools Writing WS Consumers Apache Axis Writing WS Providers Axis Architectural Diagram Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 9. The Software Environment Writing WS Consumers Using WSDL2Java Writing WS Providers WS Consumers The process of writing a consumer Locate the wsdl file for the service you’re interested in. Use WSDL2Java to generate the stub classes. Writing the actual client code. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 10. The Software Environment Writing WS Consumers Using WSDL2Java Writing WS Providers WSDL2Java Command line and options A tool for generating glue code in writing consumers and providers. Command Line java org.apache.axis.wsdl.WSDL2Java wsdl-file Options NOTE Used to specify the The following files must -o directory output directory be on the CLASSPATH. axis.jar Package specification -p package commons-discovery.jar for the output files commons-logging.jar Verbose output -v jaxrpc.jar Generate test files -t saaj.jar Generate server side -s wsdl4j.jar code Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 11. The Software Environment Writing WS Consumers Using WSDL2Java Writing WS Providers Example Usage Using a public weather web service Capeclear offers a public weather service where given the location code of an airport (”LHR”,”LGW”, etc) it returns a complete weather report including temperature, humidity, wind direction. Example WSDL2Java.bat http://live.capescience.com/wsdl/GlobalWeather.wsdl -o %PROJECT BASE%srcjava -p ch.cern.it.csc -v Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 12. The Software Environment Writing WS Consumers Using WSDL2Java Writing WS Providers Generated Files What gets generated from the WSDL file WSDL clause Java class(es) generated For each <type> A java class. A holder if this type is used as an in- out/out parameter For each <portType> A java interface For each <binding> A stub class For each <service> A service interface. A service implementation (locator) For each <binding> A skeleton class An implementation template class For all <services> One deploy.wsdd file One undeploy.wsdd file Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 13. The Software Environment Writing WS Consumers Using WSDL2Java Writing WS Providers Generated Files Relationship & Location of generated files Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 14. The Software Environment Writing WS Consumers Using WSDL2Java Writing WS Providers Client Code Example Tying all the generated files together! Example import java.rmi.RemoteException; public class Client { public static void main(String[] args) { ServiceLocator locator = new ServiceLocator(); ServicePort service = locator.getService(); try { Report report = service.getReport(quot;Statusquot;); } catch (RemoteException e) { e.printStackTrace(); } } } Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 15. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Writing Providers The two approaches Instant Deployment Very simple way of providing a Web Service Customized Deployment More elaborate Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 16. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Instant Deployment Step by step Copy any Java source file that implements a web service into 1 the axis directory no special code is required all public, non-static methods are exposed if the class is in a package, copy it to the appropriate subdirectory Change the file extension from .java to .jws 2 Place all related .class files under WEB-INF/classes 3 View the WSDL of a JWS web service using the following 4 URL in a web browser http://host:port/axis/filename.jws?wsdl Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 17. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Example An example using Instant Deployment A very simple banking web service. The bank allows the following four operations Create an Account Get the balance of an Account Withdraw a given amount from an Account Deposit a given amount to an Account To implement it we will use two basic classes A class Account A BankingService class Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 18. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI The Account class public class Account { private String number; private String owner; private double balance; public void withdraw(double amount) { balance -= amount; } public void deposit(double amount) { balance += amount; } public double getBalance() { return balance; } } Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 19. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI The BankingService class public class BankingService { public void withraw(Account ac, double amount) { ac.withdraw(amount); } public void deposit(Account ac, double amount) { ac.deposit(amount); } public Account createAccount(String owner) { return new Account(); } public double getBalance(Account ac) { return ac.getBalance(); } } Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 20. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI The Result A trivial banking service Step by step We’ve written the code. 1 Copy the BankingService file under axis. 2 Change the file extension from .java to .jws 3 Compile and copy the Account.class file under 4 WEB-INF/classes View the WSDL of the Banking Service using the following 5 URL in a web browser http://host:8080/axis/BankingService.jws?wsdl Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 21. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Limitations The limitations of using instant deployment The use of instant deployment is only intended for simple web services. Here are some reasons why this is so You cannot use packages in the pages As the code is compiled at run time you can not find out about errors until after deployment. There is limited control over the serialization/deserialization process. The actual source code is placed on the web server Sometimes the source code is not available Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 22. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Using Custom Deployment The process of creating a Web Service Step by step Write a Facade interface the subsystem you want to expose as 1 a Web Service. Create a WSDL file either manually or by using the 2 Java2WSDL tool that comes with Axis. Create Bindings using the WSDL2Java tool making sure to 3 activate the options for emitting server side code as well as deployment descriptors. Package all the files in a .jar file 4 Copy the file to the WEB-INF/lib 5 Use the AdminClient tool to deploy the Web Services to Axis. 6 Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 23. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Java2WSDL Command line and options A tool for generating a WSDL file from existing Java code Command Line java org.apache.axis.wsdl.Java2WSDL wsdl-file Options Specifies the output filename -o filename Specifies the URI of the service -l uri Target namespace of the wsdl -n namespace Generate test files -p package namespace Verbose output -v Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 24. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Generate Server Side Bindings Using WSDL2Java The next step in the process is generating the server side bindings and the deployment descriptors (deploy.wsdd, undeploy.wsdd). Run the WSDL2Java tool using the -s and -S options (see earlier slides for consumer generation). Discard the client specific files Package all the .class files in a .jar file. Use jar cvf filename.jar file(s) Copy the generated file into the WEB-INF/lib directory. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 25. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Service Deployment Using the AdminClient tool and the .wsdd files Deployment Descriptor Files End with .wsdd (usually named deploy.wsdd and undeploy.wsdd) Specifies Axis components to be deployed or undeployed Specifies special type mappings between XML and Java Command Line java org.apache.axis.client.AdminClient filename.wsdd Options Specifies the host -h host Specifies the port -p port Sets the path to the Axis Servlet -s servletPath Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 26. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Web Services at CERN How to structure your projects The structure of a new Web Services project is exactly the Structure of a Webapp same as a Web Application. ROOT To start, you can copy the axis WEB-INF web application to your classes workspace, lib web.xml remove the axis-specific files server-config.wsdd and you have an empty Web Services project! NOTE: The server-config.wsdd file was extracted from the axis.jar. This is the file that needs to be updated with the contents of deploy.wsdd. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 27. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Web Services at CERN Where and how to deploy them Step by step deployment Edit the server-config.wsdd file and copy the contents of 1 the deploy.wsdd file that was created by WSDL2Java. Edit the web.xml file so that it reflects the name of your 2 application and the URL you want to use. Pack application in a .war file using the following command: 3 jar cvf filename.jar file(s) Go to the URL: 4 http://lxb0752.cern.ch/jps Point file field to your .war file and you’re done! 5 For more information about this specific service talk to Michal Kwiatek. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 28. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI UDDI Overview Universal Description, Discovery and Integration (UDDI) Definition UDDI is a specification for creating distributed Web-based registries of Web services. It defines A UDDI registry which stores information on businesses, the services offered by these businesses, and technical information about these services. The data model and programming API that provides a way to publish and locate all kinds of services. Specifically, UDDI is said to support three kinds of registry data White Pages (organizing businesses by name) Yellow Pages (organizing businesses by category) Green Pages (organizing businesses by service) Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 29. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI The Colored Papers White, yellow and green pages White Pages Yellow Pages They contain information on a Yellow pages contain categorized business itself, including information about the services A name, provided by a business. Contact details Categorization is done by assigning one or more Location of the business taxonomies to the business. Unique identifiers Green Pages Green pages contain technical information about a service which a business offers. You can find information like Service location the category to which this service belongs Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 30. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI UDDI Data structures Specifying entries in the Registry UDDI defines five data type structures to specify an entry in the registry. Each of these data structures is represented by an XML document, containing both technical and descriptive information. These are: <businessEntity> <businessService> <bindingTemplate> <tModel> <publisherAssertion> Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 31. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Data Structure Details I <businessEntity> The businessEntity structure contains all descriptive information about the business and the services it offers. Information includes name and description of the business as well as contact information, categorization, and relationships to other businesses. This structure can be seen as the top-level structure of the service in the registry. <businessService> Each businessEntity structure contains one or more businessService structures. A businessService structure describes a categorized set of services a business offers. A businessService element is not owned by one businessEntity element, but can be shared among multiple businesses. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 32. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Data Structure Details II <bindingTemplate> The bindingTemplate structure contains a technical description of a service. Each bindingTemplate belongs to a single businessService element. <tModel> One of the key elements of UDDI is the tModel. A tModel describes the specification, the behavior, the concept, or even the shared design to which a service complies. It provides specific information about how to interact with this service. The content of a tModel structure consists of a key, a name, an optional description, and a URL element. The URL, in most cases, points to a location where you can find more information about this particular tModel. Two conventions have been applied for using tModels. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 33. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Data Structure Details III <publisherAssertion> The publisherAssertion structure contains information about a relationship between two parties asserted by one or both. Many businesses, such as large corporations or marketplaces, are not effectively represented by a single businessEntity. A publisherAssertion can be used to denote the relationship between the businesses. The content of a publisherAssertion structure consists of a key (fromKey) for the first business, a key (toKey) of the second business, and a reference (keyedReference) that designates the asserted relationship in terms of a keyName, keyValue pair within a tModel. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 34. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Publishing Services on UDDI The manual way of doing things Step by step installation Logon to http://www.uddi.org/ 1 Select a registry from IBM, Microsoft, SAP or NTT 2 Obtain login and password 3 Follow the step by step instructions on the website 4 Ioannis G. Baltopoulos Consuming, Providing & Publishing WS
  • 35. The Software Environment Using Java2WSDL Writing WS Consumers UDDI Overview Writing WS Providers Publishing Services on UDDI Concluding Remarks In this lecture we saw the software environment for developing and deploying Web Services in Java how to write Web Service consumers how to write Web Service providers using instant and custom deployment deployment. what UDDI is and how to manually publish Web Services to the Registry. Ioannis G. Baltopoulos Consuming, Providing & Publishing WS