Java Data Objects _JDO_ by dandanhuanghuang

VIEWS: 5 PAGES: 15

									Publishing services
UDDI
FS 2009




                      Thursday, 19 March 2009
Overview

 Install jUDDI on the Tomcat Server
 Publishing services using Eclipse
 Use the an UDDI API to access services and
      test the functionality




Thursday, 19 March 2009   Department of Computer Science
Prerequisits
 Database server: MySQL (recommended)
      http://dev.mysql.com/downloads/mysql/5.1.html
 Or one of the following:
             DB2
             HSQLdb (HypersonicSQL)
             Sybase
             PostreSQL
             Oracle
             TotalXML
             JDataStore (Borland)
Thursday, 19 March 2009      Department of Computer Science
Setting up the DBMS

 Create a database named juddi
 Create a user named juddi and grant access to
      the juddi database
 GRANT ALL PRIVILEGES ON ‘juddi'.* TO
      'juddi'@'localhost' IDENTIFIED BY
      PASSWORD 'password‘ WITH GRANT
      OPTION

Thursday, 19 March 2009    Department of Computer Science
Configure Eclipse and Tomcat
 By now you should be able to launch Tomcat
      Server from eclipse
 Here is how we configure it double click on the
      server name to start the server editor




Thursday, 19 March 2009   Department of Computer Science
Configure Eclipse and Tomcat (2)

 Make sure that Eclipse is
     using the tomcat installation
     configuration


 The server configuration files
     are located on the left side
     under the server folder

Thursday, 19 March 2009     Department of Computer Science
Configure the Tomcat instance
 Add Tomcat users
             Open the tomcat-users.xml file and add the users you
              want the manager role allows access to the
              management console
             Example
       <tomcat-users>
       <role rolename="tomcat"/>
         <role rolename="manager"/>
         <user username="tomcat" password="tomcat"
           roles="tomcat, manager"/>
       </tomcat-users>




Thursday, 19 March 2009        Department of Computer Science
Add the resource to MySQL server
 Add the Mysql Connector jar to the Tomcat/lib
      folder
 Open the context.xml file
 Before the </Context> add the following
        <Resource name="jdbc/juddiDB" auth="Container"
      type="javax.sql.DataSource" maxActive="10" maxIdle="30"

      maxWait="10000" username="juddi" password="juddi"
      driverClassName="com.mysql.jdbc.Driver"
      url="jdbc:mysql://IP_ADDRESS:3306/juddi?autoReconnect=true"/>



Thursday, 19 March 2009           Department of Computer Science
Deploying jUDDI

 Get jUDDi from
      http://www.apache.org/dist/ws/juddi/2_0RC6/jud
      di-distribution-2.0rc6-bin.zip
 Add the juddi-web war file to your
      Tomcat/webapps directory
 Test the installation
             http://localhost:8080/juddi-web/happyjuddi.jsp
             No database connection errors ? Then all is fine
Thursday, 19 March 2009         Department of Computer Science
Adding users to jUDDI
 You need to have a user to allow publishing of
      services so we are going to insert one to the
      database like this:
INSERT INTO PUBLISHER
(PUBLISHER_ID,PUBLISHER_NAME,EMAIL_ADDRESS,IS_ENABLE
  D,IS_ADMIN)
VALUES (‘juddi','John
  Doe','john.doe@apache.org','true','true');

 Where juddi is going to be my user name
Thursday, 19 March 2009   Department of Computer Science
  Publishing services
 The UDDI repository consists of 3
  components:
        White Pages - Businesses
             - address, contact, and known
                identifiers;
        Yellow Pages - Services
                 - industrial categorizations
        Green Pages – Service Interfaces
             - technical information about
               services exposed by the
               business.

   Thursday, 19 March 2009              Department of Computer Science
Browsing and publishing to UDDI using Eclipse


 Open the Web Service Explorer
 Add the inquiry page of you jUDDI repository
             Usually this is something like
                 - http://localhost:8080/juddi-web/inquiry




Thursday, 19 March 2009                 Department of Computer Science
Browsing and publishing to UDDI using Eclipse


 Login to the repository
             The publish URL should be something like
                 - http://localhost:8080/juddi-web/publish




Thursday, 19 March 2009                 Department of Computer Science
Exercise 5
 Step 1
                Install juddi on you local machine
                Register one of your services with the UDDI repo
                Write a client that queries UDDI and fetches a
                 service (not Eclipse’ built in UDDI browser)
 Step 2
                Deploy your WebServices on our Tomcat server
                Register your WebServices with our UDDI repo



Thursday, 19 March 2009           Department of Computer Science
Exercise 5
 Step 3
            Use your Client to browse our UDDI repo
            Fetch a service from another group and use it
 We will provide you with access to our Tomcat
     server and UDDI repo on Monday, March 23
 Zip your sources and send them to
            ionut_wssoa@inf.ethz.ch by Thursday 09.04.2009
            Drop any lib or build folder or any .class file


Thursday, 19 March 2009        Department of Computer Science

								
To top