JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

28
JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide Your guide to the JBoss Enterprise SOA Platform 4.2.CP04 ESB Registry

description

 

Transcript of JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Page 1: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

JBoss EnterpriseSOA Platform 4.2

SOA ESB Registry GuideYour guide to the JBoss Enterprise

SOA Platform 4.2.CP04 ESB Registry

Page 2: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

SOA ESB Registry Guide

JBoss Enterprise SOA Platform 4.2 SOA ESB Registry GuideYour guide to the JBoss Enterprise SOA Platform 4.2.CP04 ESBRegistryEdition 1.4

Copyright © 2008 Red Hat, Inc.. This material may only be distributed subject to the terms andconditions set forth in the Open Publication License, V1.0 or later (the latest version of the OPL ispresently available at http://www.opencontent.org/openpub/).

Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat, Inc. in the UnitedStates and other countries.

All other trademarks referenced herein are the property of their respective owners.

1801 Varsity Drive Raleigh, NC 27606-2072 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588 Research Triangle Park, NC 27709 USA

The JBoss Enterprise SOA Platform 4.2.CP04 edition of the JBoss ESB Registry Guide

Page 3: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

iii

Preface v1. Document Conventions ................................................................................................... v

1.1. Typographic Conventions ...................................................................................... v1.2. Pull-quote Conventions ........................................................................................ vi1.3. Notes and Warnings ............................................................................................ vii

2. We Need Feedback ...................................................................................................... viii

1. What is the Registry? 11.1. Why do I need it ? ....................................................................................................... 11.2. How do I use it ? ......................................................................................................... 11.3. Registry Vs Repository ................................................................................................. 11.4. SOA Components ........................................................................................................ 21.5. UDDI ........................................................................................................................... 31.6. ................................................................................................................................... 3

2. Configuring the Registry 52.1. Introduction .................................................................................................................. 52.2. The components involved ............................................................................................ 62.3. The Registry Implementation Class ............................................................................... 62.4. Using JAXR ................................................................................................................. 72.5. ................................................................................................................................... 7

3. Configuration Examples 93.1. Introduction .................................................................................................................. 93.2. Embedded ................................................................................................................... 93.3. ................................................................................................................................. 103.4. RMI using your own JNDI Registration of the RMI Service ............................................ 113.5. ................................................................................................................................. 14

4. UDDI Browser 154.1. Introduction ................................................................................................................ 154.2. UB Setup ................................................................................................................... 15

5. Troubleshooting 175.1. ................................................................................................................................. 175.2. More Information ........................................................................................................ 17

A. Revision History 19

Page 4: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

iv

Page 5: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

v

Preface

1. Document ConventionsThis manual uses several conventions to highlight certain words and phrases and draw attention tospecific pieces of information.

In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts1 set. TheLiberation Fonts set is also used in HTML editions if the set is installed on your system. If not,alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includesthe Liberation Fonts set by default.

1.1. Typographic ConventionsFour typographic conventions are used to call attention to specific words and phrases. Theseconventions, and the circumstances they apply to, are as follows.

Mono-spaced Bold

Used to highlight system input, including shell commands, file names and paths. Also used to highlightkey caps and key-combinations. For example:

To see the contents of the file my_next_bestselling_novel in your currentworking directory, enter the cat my_next_bestselling_novel command at theshell prompt and press Enter to execute the command.

The above includes a file name, a shell command and a key cap, all presented in Mono-spaced Boldand all distinguishable thanks to context.

Key-combinations can be distinguished from key caps by the hyphen connecting each part of a key-combination. For example:

Press Enter to execute the command.

Press Ctrl-Alt-F1 to switch to the first virtual terminal. Press Ctrl-Alt-F7 to returnto your X-Windows session.

The first sentence highlights the particular key cap to press. The second highlights two sets of threekey caps, each set pressed simultaneously.

If source code is discussed, class names, methods, functions, variable names and returned valuesmentioned within a paragraph will be presented as above, in Mono-spaced Bold. For example:

File-related classes include filesystem for file systems, file for files, and dir fordirectories. Each class has its own associated set of permissions.

Proportional Bold

This denotes words or phrases encountered on a system, including application names; dialoguebox text; labelled buttons; check-box and radio button labels; menu titles and sub-menu titles. Forexample:

1 https://fedorahosted.org/liberation-fonts/

Page 6: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Preface

vi

Choose System > Preferences > Mouse from the main menu bar to launch MousePreferences. In the Buttons tab, click the Left-handed mouse check box and clickClose to switch the primary mouse button from the left to the right (making the mousesuitable for use in the left hand).

To insert a special character into a gedit file, choose Applications > Accessories> Character Map from the main menu bar. Next, choose Search > Find… from theCharacter Map menu bar, type the name of the character in the Search field and clickNext. The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click theCopy button. Now switch back to your document and choose Edit > Paste from thegedit menu bar.

The above text includes application names; system-wide menu names and items; application-specificmenu names; and buttons and text found within a GUI interface, all presented in Proportional Bold andall distinguishable by context.

Note the > shorthand used to indicate traversal through a menu and its sub-menus. This is to avoidthe difficult-to-follow 'Select Mouse from the Preferences sub-menu in the System menu of the mainmenu bar' approach.

Mono-spaced Bold Italic or Proportional Bold Italic

Whether Mono-spaced Bold or Proportional Bold, the addition of Italics indicates replaceable orvariable text. Italics denotes text you do not input literally or displayed text that changes depending oncircumstance. For example:

To connect to a remote machine using ssh, type ssh [email protected] ata shell prompt. If the remote machine is example.com and your username on thatmachine is john, type ssh [email protected].

The mount -o remount file-system command remounts the named filesystem. For example, to remount the /home file system, the command is mount -oremount /home.

To see the version of a currently installed package, use the rpm -q packagecommand. It will return a result as follows: package-version-release.

Note the words in bold italics above — username, domain.name, file-system, package, version andrelease. Each word is a placeholder, either for text you enter when issuing a command or for textdisplayed by the system.

Aside from standard usage for presenting the title of a work, italics denotes the first use of a new andimportant term. For example:

When the Apache HTTP Server accepts requests, it dispatches child processesor threads to handle them. This group of child processes or threads is known asa server-pool. Under Apache HTTP Server 2.0, the responsibility for creating andmaintaining these server-pools has been abstracted to a group of modules calledMulti-Processing Modules (MPMs). Unlike other modules, only one module from theMPM group can be loaded by the Apache HTTP Server.

1.2. Pull-quote ConventionsTwo, commonly multi-line, data types are set off visually from the surrounding text.

Page 7: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Notes and Warnings

vii

Output sent to a terminal is set in Mono-spaced Roman and presented thus:

books Desktop documentation drafts mss photos stuff svnbooks_tests Desktop1 downloads images notes scripts svgs

Source-code listings are also set in Mono-spaced Roman but are presented and highlighted asfollows:

package org.jboss.book.jca.ex1;

import javax.naming.InitialContext;

public class ExClient{ public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create();

System.out.println("Created Echo");

System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } }

1.3. Notes and WarningsFinally, we use three visual styles to draw attention to information that might otherwise be overlooked.

NoteA Note is a tip or shortcut or alternative approach to the task at hand. Ignoringa note should have no negative consequences, but you might miss out on atrick that makes your life easier.

ImportantImportant boxes detail things that are easily missed: configuration changesthat only apply to the current session, or services that need restarting beforean update will apply. Ignoring Important boxes won't cause data loss but maycause irritation and frustration.

Page 8: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Preface

viii

WarningA Warning should not be ignored. Ignoring warnings will most likely cause dataloss.

2. We Need FeedbackIf you find a typographical error in the ESB Registry Guide, or if you have thought of a way tomake this manual better, we would love to hear from you! Please submit a report in JIRA: http://jira.jboss.com/jira/ against the Documentation component of the SOA Platform project.

When submitting a bug report, be sure to mention the manual's identifier:

ESB_REG

If you have a suggestion for improving the documentation, try to be as specific as possible whendescribing it. If you have found an error, please include the section number and some of thesurrounding text so we can find it easily.

Page 9: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 1.

1

What is the Registry?In the context of SOA, a registry provides applications and businesses a central point to storeinformation about their services. It is expected to provide the same level of information and the samebreadth of services to its clients as that of a conventional market place. Ideally a registry should alsofacilitate the automated discovery and execution of e-commerce transactions and enabling a dynamicenvironment for business transactions. Therefore, a registry is more than an “e-business directory”. Itis an inherent component of the SOA infrastructure.

1.1. Why do I need it ?It is not difficult to discover, manage and interface with business partners on a small scale, usingmanual or ad hoc techniques. However, this approach does not scale as the number of services,the frequency of interactions, and the physical distributed nature of the environment, increase. Astandards-based registry solution provides a way to publish and discover services. It offers a centralplace where you query whether a partner has a service that is compatible with in-house technologiesor to find a list of companies that supports shipping services on the other side of the globe.

Service registries are central to most service oriented architectures and at runtime act as a contactpoint to correlate service requests to concrete behaviors. A service registry has meta-data entriesfor all artifacts within the SOA that are used at both runtime and design time. Items inside a serviceregistry may include service description artifacts (e.g., WSDL), Service Policy descriptions, variousXML schema used by services, artifacts representing different versions of services, governanceand security artifacts (e.g., certificates, audit trails), etc. During the design phase, business processdesigners may use the registry to link together calls to several services to create a workflow orbusiness process.

NoteThe registry may be replicated or federated to improve performance andreliability. It need not be a single point of failure.

1.2. How do I use it ?From a business analyst’s perspective, it is similar to an Internet search engine for businessprocesses. From a developers perspective, they use the registry to publish services and query theregistry to discover services matching various criteria.

1.3. Registry Vs RepositoryA registry allows for the registration of services, discovery of metadata and classification of entitiesinto predefined categories. Unlike a respository, it does not have the ability to store business processdefinitions or WSDL or any other documents that are required for trading agreements. A registry isessentially a catalog of items, whereas a repository maintains those items.

Page 10: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 1. What is the Registry?

2

1.4. SOA ComponentsAn SOA is a specific type of distributed system in which the agents are "services"1.

The key components of a Service Oriented Architecture are the messages that are exchanged, agentsthat act as service requesters and service providers, and shared transport mechanisms that allow theflow of messages. A description of a service that exists within an SOA is essentially just a descriptionof the message exchange pattern between itself and its users. Within an SOA there are thus threecritical roles: requester, provider, and broker.

Service providerallows access to services, creates a description of a service and publishes it to the service broker

Service brokerhosts a registry of service descriptions. It is responsible for linking a requestor to a serviceprovider.

Service requesteris responsible for discovering a service by searching through the service descriptions given bythe service broker. A requestor is also responsible for binding to services provided by the serviceprovider.

1 Refer to the W3C Working Draft on Web Services Architecture [http://www.w3.org/TR/2003/WD-ws-arch-20030808/#id2617708] for a more detailed definition.

Page 11: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

UDDI

3

1.5. UDDIThe Universal Distribution, Discover and Interoperability registry is a directory service for WebServices. It enables service discovery through queries to the UDDI registry at design time orat run time. It also allows providers to publish descriptions of their services to the registry. Theregistry typically contains a URL that locates the WSDL document for the web services and contactinformation for the service provider. Within UDDI information is classified into the following categories.

• White pages: contain general information such as the name, address and other contact informationabout the company providing the service.

• Yellow pages: categorize businesses based on the industry their services cater to.

• Green pages: provide information that will enable a client to bind to the service that is beingprovided.

1.6. The registry plays a central role within JBossESB. It is used to store the endpoint references (EPRs)for the services deployed within the ESB. When services start up, the ESB automatically registerstheir EPRs in the registry if they are not already registered. The registry administrator can also add ordelete items by using an an UDDI browser or by using the UDDI API.

As with all environments within which registries reside, it is not possible for the registry to determinethe availability of the entities its data represents, e.g., if an EPR is registered with the registry thenthere can be no guarantee that the EPR is valid (it may be malformed) or it may represent a servicethat is no longer active. At present JBossESB does not perform life-cycle monitoring of the servicesthat are deployed within it. As such, if services fail or move elsewhere, their EPRs that may residewithin the registry will remain until they are explicitly updated or removed by an administrator.Therefore, if you get warnings or errors related to EPRs obtained from the registry, you shouldconsider removing any out-of-date items.

Page 12: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

4

Page 13: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 2.

5

Configuring the Registry

2.1. IntroductionThe JBossESB Registry architecture allows for many ways to configure the ESB to use either aRegistry or Repository. By default we use a JAXR implementation (Scout) and a UDDI (jUDDI), in anembedded way.

In the file ${SOA_ROOT}/server/${CONFIG}/deploy/jbossesb.sar/jbossesb-properties.xml there is section called registry which is used to configure the registry.

<properties name="registry"> <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/> <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/> <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/> <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/> <property name="org.jboss.soa.esb.registry.user" value="jbossesb"/> <property name="org.jboss.soa.esb.registry.password" value="password"/>

<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->

<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/></properties>

The following properties can be used to configure the Registry.

org.jboss.soa.esb.registry.implementationClassA class that implements the jbossesb Registry interface. We have provided one implementation(JAXRRegistry interface).

org.jboss.soa.esb.registry.factoryClassThe class name of the JAXR ConnectionFactory implementation.

org.jboss.soa.esb.registry.queryManagerURIThe URI used by JAXR to query.

org.jboss.soa.esb.registry.lifeCycleManagerURIThe URI used by JAXR to edit.

org.jboss.soa.esb.registry.userThe user used for edits.

org.jboss.soa.esb.registry.passwordThe password to go along with the user.

Page 14: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 2. Configuring the Registry

6

org.jboss.soa.esb.scout.proxy.transportClassThe name of the class used by scout to do the transport from scout to the UDDI.

2.2. The components involvedThe registry can be configured in many ways. Figure 2.1, “Blue print of the Registry componentarchitecture” shows a blue print of all the registry components. From the top down we can see thatthe JBossESB funnels all interaction with the registry through the Registry Interface. By default it thencalls into a JAXR implementation of this interface. The JAXR API needs an implementation, which bydefault is Scout. The Scout JAXR implementation calls into a jUDDI registry. However there are manyother configuration options.

Figure 2.1. Blue print of the Registry component architecture

2.3. The Registry Implementation ClassProperty: org.jboss.soa.esb.registry.implementationClass

By default we use the JAXR API. The JAXR API is a convenient API since it allows us to connect anykind of XML based registry or repository. However, if for example you want to use Systinet's Java API

Page 15: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Using JAXR

7

you can do that by writing your own SystinetRegistryImplementation class and referencing itin this property.

2.4. Using JAXRProperty: org.jboss.soa.esb.registry.factoryClass

If you decided to use JAXR then you will have to pick which JAXR implementation to use. Thisproperty is used to configure that class. By default we use Scout and therefore it is set to thescout factory 'org.apache.ws.scout.registry.ConnectionFactoryImpl'. The nextstep is to tell the JAXR implementation the location of the registry or repository for querying andupdating, which is done by setting the org.jboss.soa.esb.registry.queryManagerURI,and org.jboss.soa.esb.registry.lifeCycleManagerURI respectively,along with the username (org.jboss.soa.esb.registry.user) and password(org.jboss.soa.esb.registry.password) for the UDDI.

2.5. Property: org.jboss.soa.esb.scout.proxy.transportClass

When using Scout and jUDDI there is an additional parameter that you can set. This is the transportclass that should be used for communication between Scout and jUDDI. Thus far there are 2supported implementations of this class which are based on RMI and Local (embedded java).

NoteScout does have a transport class for SOAP which uses Apache Axis. Thisis not currently supported in the JBoss Enterprise SOA Platform. Additionalinformation regarding this can be found at the Apache Axis website at http://ws.apache.org/axis/.

The transportClass settings for the different transports are listed below. It is important to note thatWhen you change the transport class you also have to change the query and lifecycle URIs.

RMI Transport

transportClass org.apache.ws.scout.transport.RMITransport

queryManagerURI jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire

lifeCycleManagerURI jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish

Local Transport

transportClass org.apache.ws.scout.transport.LocalTransport

queryManagerURI org.apache.juddi.registry.local.InquiryService#inquire

lifeCycleManagerURI org.apache.juddi.registry.local.PublishService#publish

Page 16: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 2. Configuring the Registry

8

For jUDDI we have two requirements that need to be fulfilled:

1. You need access to the database where its data will be stored and you need to be able to createthe appropriate schema.

2. You need to configure jUUDI in the file ${SOA_ROOT}/server/${CONFIG}/deploy/jbossesb.sar/esb.juddi.xml.

The JBoss Enterprise SOA Platform includes a tool for the database configuration of its componentsthat performs these configuration steps for jUUDI. This tool can be found in ${SOA_ROOT}/tools/schema/. Directions for using this tool can be found in the ESB Administration Guide in the section"Switching Databases".

Page 17: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 3.

9

Configuration Examples

3.1. IntroductionAs mentioned before, by default the JBossESB is configured to use the JAXR API using Scout asits implementation and jUDDI as the registry. Here are some examples of how you can deploy thiscombo.

3.2. EmbeddedAll ESB components (with components we really mean JVMs in this case) can embed the registry andthey all can connect to the same database (or different ones if that makes sense).

Figure 3.1. Embedded jUDDI

Properties example

<properties name="registry"> <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/> <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/> <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/> <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/> <property name="org.jboss.soa.esb.registry.user" value="jbossesb"/> <property name="org.jboss.soa.esb.registry.password" value="password"/></properties>

Page 18: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 3. Configuration Examples

10

3.3. The JBoss SOA includes juddi.war in the ${SOA_ROOT}/server/production/deploy/jbossesb.sar/ directory. When deployed this brings up the regular web services but also an RMIservice. You also need to deploy a datasource which points to your jUDDI database. The databaseschema tool found in ${SOA_ROOT}/tools/schema/ can be used to configure this datasource.

The jbossesb.sar only registers a RMI service. So you would only need to deploy the juddi.warif you need web service access.

Figure 3.2. RMI using the juddi.war

Properties example:

<properties name="registry"> <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/> <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/> <property name="org.jboss.soa.esb.registry.queryManagerURI" value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>

<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish"/>

Page 19: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

RMI using your own JNDI Registration of the RMI Service

11

<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/><property name="org.jboss.soa.esb.registry.password" value="password"/>

<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) --><property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.RMITransport"/>

The juddi.war is configured to bring up a RMI Service, which is triggered by the following setting inthe web.xml

<!-- uncomment if you want to enable making calls in juddi with rmi --><servlet> <servlet-name>RegisterServicesWithJNDI</servlet-name> <servlet-class> org.apache.juddi.registry.rmi.RegistrationService </servlet-class> <load-on-startup>1</load-on-startup></servlet>

Make sure to include (for example) the following JNDI settings in your juddi.properties:

# JNDI settings (used by RMITransport)java.naming.factory.initial=org.jnp.interfaces.NamingContextFactoryjava.naming.provider.url=jnp://localhost:1099java.naming.factory.url.pkgs=org.jboss.naming

NoteThe RMI clients need to have the scout-client.jar in their classpath.

3.4. RMI using your own JNDI Registration of the RMIServiceIf you don't want to deploy the juddi.war you can setup one of the ESB components that runs in thethe same JVM as jUDDI to register the RMI service.While the other applications need to be configuredto use RMI.

Page 20: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 3. Configuration Examples

12

Figure 3.3. RMI using your own JNDI registration

Properties example: For application 1 you need the Local settings:

<properties name="registry"> <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/> <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/> <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/> <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/> <property name="org.jboss.soa.esb.registry.user" value="jbossesb"/> <property name="org.jboss.soa.esb.registry.password" value="password"/>

<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) --> <property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>

Page 21: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

RMI using your own JNDI Registration of the RMI Service

13

</properties>

For application2 you need the RMI settings:

<properties name="registry"> <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/> <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/> <property name="org.jboss.soa.esb.registry.queryManagerURI" value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>

<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish"/>

<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/> <property name="org.jboss.soa.esb.registry.password" value="password"/>

<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) --> <property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.RMITransport"/></properties

Where the hostname of the queryManagerURI and lifeCycleManagerURI need to point tothe hostname on which jUDDI is running (which would be where application1 is running). Obviouslyapplication1 needs to have access to a naming service. To do the registration process you need to dosomething like:

//Getting the JNDI setting from the configProperties env = new Properties();env.setProperty( RegistryEngine.PROPNAME_JAVA_NAMING_FACTORY_INITIAL, factoryInitial );env.setProperty( RegistryEngine.PROPNAME_JAVA_NAMING_PROVIDER_URL, providerURL );env.setProperty( RegistryEngine.PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS, factoryURLPkgs);

log.info("Creating Initial Context using: \n" + RegistryEngine.PROPNAME_JAVA_NAMING_FACTORY_INITIAL+"="+factoryInitial + "\n" + RegistryEngine.PROPNAME_JAVA_NAMING_PROVIDER_URL + "=" + providerURL + "\n" + RegistryEngine.PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS + "=" + factoryURLPkgs + "\n");

InitialContext context = new InitialContext(env);Inquiry inquiry = new InquiryService();log.info("Setting "+INQUIRY_SERVICE+", "+inquiry.getClass().getName());

Page 22: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 3. Configuration Examples

14

mInquery = inquiry;context.bind(INQUIRY_SERVICE, inquiry);Publish publish = new PublishService();log.info("Setting "+PUBLISH_SERVICE+", "+publish.getClass().getName());mPublish = publish;context.bind(PUBLISH_SERVICE, publish);

3.5. Scout can be configured to use SOAP to communicate with jUDDI using Apache Axis. This is notcurrently supported in the JBoss SOA Platform although future versions may add SOAP support.

Additional information regarding this can be found at the Apache Axis website at http://ws.apache.org/axis/.

NoteJBossAS 4.2 ships with older versions of Scout and jUDDI. It is recommendedto remove the juddi.sar to prevent versioning issues.

Page 23: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 4.

15

UDDI Browser

4.1. IntroductionThe JBoss SOA Platform does not ship with an included UDDI browser.

The UDDI browser ub can be downloaded from http://www.uddibrowser.org. Before configuring ubmake sure the juddi.war is deployed. This is required to enable webservice communication tojUDDI.

JBoss Developer Studio also includes a UDDI browser. You can find more information regarding thisproduct at http://www.jboss.com/products/devstudio.

4.2. UB Setupub is a standalone Java application. Start ub and select Edit > UDDI Registries, and add an entrycalled jUDDI

Figure 4.1. Add a connection

Click on 'connect' and select View > Find More > Find All Businesses

Figure 4.2. View all Businesses

Page 24: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 4. UDDI Browser

16

In the left pane you should see the Red Hat/JBossESB organization. You can navigate into theindividual services and their ServiceBindings.

Figure 4.3. View Services and ServiceBindings

Each ServiceBinding contains an EPR in its AccessPoint.

Some features of ub may not work, but it should give enough functionality to maintain jUDDI. TheJBoss ESB community project is currently looking for a good web based console for maintainingjUDDI.

Page 25: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

Chapter 5.

17

Troubleshooting

5.1. • Make sure to put our version of the jaxr-api-1.0.jar, scout-0.7rc2-embedded.jar and

the juddi-embedded.jar first. Other versions of these libraries are present in the JBossASlibraries and they are, for the time being, incompatible. This should get resolved in future release ofthe Application Server.

• If you use RMI you need the juddi-client.jar.

• Make sure the jbossesb-properties.xml file is on the classpath and read or else the registrywill try to instantiate classes with the name of null.

• Make sure you have a juddi.properties file on your classpath for jUDDI to configure itself.JBossESB uses esb.juddi.xml, but generates the juddi.properties file for jUDDI to read.

• The JBoss Enterprise SOA Platform includes a tool for the database configuration of its componentsthat performs these configuration steps for jUUDI. This tool can be found in ${SOA_ROOT}/tools/schema/. Directions for using this tool can be found in the ESB Administration Guide in the section"Switching Databases".

• In the event that a service fails or does not shut down cleanly, it is possible that stale entries maypersist within a registry. You will have to remove these manually.

5.2. More Information• For more information see the wiki http://www.jboss.org/community/wiki/JudyEvaluation

• JBossESB user forum: http://www.jboss.com/index.html?module=bb&op=viewforum&f=246

• When you deploy the juddi.war that ship with our ESB, you enable access through SOAP, whichmeans that you can use any UDDI browser. You can use http://uddibrowser.org

Page 26: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

18

Page 27: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

19

Appendix A. Revision HistoryRevision 1.4 Fri Jun 12 2009 Darrin Mison [email protected]

Updated for CP04SOA-1129 - updated jUDDI paths & added reference to the database schema tool for jUDDIconfigurationSOA-1132 - Updated content to refer to the database schema tool for jUDDI configurationSOA-1332 - clarified content regarding EPR registrationSOA-1128 - clarified that the using Apache Axis with jUDDI and Scout is unsupported

Revision 1.3 Fri Jan 9 2009 Darrin Mison [email protected]

Updated for CP03

Revision 1.2 Fri Jul 25 2008 Joshua Wulf [email protected]

Updated for CP02

Revision 1.1 Fri Apr 4 2008 Joshua Wulf [email protected]

Updated for CP01

Revision 1.0 Thur Jan 31 2008 Joshua Wulf [email protected]

Initial Release

Page 28: JBoss Enterprise SOA Platform 4.2 SOA ESB Registry Guide

20