Skip to content
spyhunter99 edited this page May 5, 2013 · 2 revisions

Table of Contents

Introduction

This information is relevant for both understanding how jUDDI's default data is set when jUDDI first runs (i.e. to a new database). It's also useful for scripting or automating the deployment of a jUDDI server within your organization which will enable you to prepopulate the data.

As of UDDI v3, each registry need to have a “root” publisher. The root publisher is the owner of the UDDI services (inquiry, publication, etc). There can only be one root publisher per node. JUDDI ships some default seed data for the root account. The default data can be found in the juddi-core-3.x.jar, under juddi_install_data/. By default jUDDI installs two Publishers: “root” and “uddi”. Root owns the root partition, and uddi owns all the other seed data such as pre-defined tModels.

Seed Data Files

For each publisher there are four seed data files that will be read the first time you start jUDDI:

<publisher>_Publisher.xml
<publisher>_tModelKeyGen.xml
<publisher>_BusinessEntity.xml
<publisher>_tModels.xml
For example the content of the root_Publisher.xml looks like
<publisher xmlns="urn:juddi-apache-org:api_v3" authorizedName="root">
    <publisherName>root publisher</publishername>
    <isAdmin>true</isadmin>
</publisher>
Each publisher should have its own key generator schema so that custom generated keys cannot end up being identical to keys generated by other publishers. It is therefor that the each publisher need to define their own KenGenerator tModel. The tModel Key Generator is defined in the file root_tModelKeyGen.xml and the content of this file is
<tModel tModelKey="uddi:juddi.apache.org:keygenerator" xmlns="urn:uddi-org:api_v3">
    <name>uddi-org:keyGenerator</name>
    <description>Root domain key generator</description>
    <overviewDoc>
        <overviewURL useType="text">
        http://uddi.org/pubs/uddi_v3.htm#keyGen
        </overviewurl>
    </overviewdoc>
    <categoryBag>
        <keyedReference tModelKey="uddi:uddi.org:categorization:types" 
            keyName="uddi-org:types:keyGenerator"
            keyValue="keyGenerator" />
    </categorybag>
</tmodel>
This means that the legal format of keys used by the root publisher need to be in the form uddi:juddi.apache.org:<text-of-chioce></text-of-chioce> The use of other types of format will lead to an 'illegal key' error. The root publisher can only own one KeyGenerator while any other publisher can own more then one KeyGenerator. KeyGenerators should not be shared unless there is a good reason to do so. If you want to see your publisher with more then just the one KeyGenerator tModel, you can use the <publisher></publisher>_tModels.xml file.

Finally, in the <publisher></publisher>_BusinessEntity.xml file can be used to setup Business and Service data. In the root_BusinessEntity.xml we specified the ASF Business, and the UDDI services; Inquiry, Publish, etc.:

        &amp;amp&#59;lt&amp;&#35;59&#59;discoveryURL useType&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;home&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;
            http&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;//$&amp;amp&#59;&amp;&#35;35&#59;123&amp;&#35;59&#59;juddi.server.name&amp;amp&#59;&amp;&#35;35&#59;125&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;$&amp;amp&#59;&amp;&#35;35&#59;123&amp;&#35;59&#59;juddi.server.port&amp;amp&#59;&amp;&#35;35&#59;125&amp;&#35;59&#59;/juddiv3
        &amp;amp&#59;lt&amp;&#35;59&#59;/discoveryurl&amp;amp&#59;gt&amp;&#35;59&#59;
    &amp;amp&#59;lt&amp;&#35;59&#59;/discoveryurls&amp;amp&#59;gt&amp;&#35;59&#59;
    &amp;amp&#59;lt&amp;&#35;59&#59;categoryBag&amp;amp&#59;gt&amp;&#35;59&#59;
        &amp;amp&#59;lt&amp;&#35;59&#59;keyedReference tModelKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;uddi.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;categorization&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;nodes&amp;amp&#59;quot&amp;&#35;59&#59; keyValue&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;node&amp;amp&#59;quot&amp;&#35;59&#59; /&amp;amp&#59;gt&amp;&#35;59&#59;
    &amp;amp&#59;lt&amp;&#35;59&#59;/categorybag&amp;amp&#59;gt&amp;&#35;59&#59;

    &amp;amp&#59;lt&amp;&#35;59&#59;businessServices&amp;amp&#59;gt&amp;&#35;59&#59;
    
        &amp;amp&#59;lt&amp;&#35;59&#59;businessService serviceKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;juddi.apache.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;services&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;inquiry&amp;amp&#59;quot&amp;&#35;59&#59; 
            businessKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;juddi.apache.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;businesses&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;asf&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;
            &amp;amp&#59;lt&amp;&#35;59&#59;name xml&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;lang&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;en&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;UDDI Inquiry Service&amp;amp&#59;lt&amp;&#35;59&#59;/name&amp;amp&#59;gt&amp;&#35;59&#59;
            &amp;amp&#59;lt&amp;&#35;59&#59;description xml&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;lang&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;en&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;Web Service supporting UDDI Inquiry API&amp;amp&#59;lt&amp;&#35;59&#59;/description&amp;amp&#59;gt&amp;&#35;59&#59;
            &amp;amp&#59;lt&amp;&#35;59&#59;bindingTemplates&amp;amp&#59;gt&amp;&#35;59&#59;
                &amp;amp&#59;lt&amp;&#35;59&#59;bindingTemplate bindingKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;juddi.apache.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;servicebindings&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;inquiry&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;ws&amp;amp&#59;quot&amp;&#35;59&#59; 
                    serviceKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;juddi.apache.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;services&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;inquiry&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;
                    &amp;amp&#59;lt&amp;&#35;59&#59;description&amp;amp&#59;gt&amp;&#35;59&#59;UDDI Inquiry API V3&amp;amp&#59;lt&amp;&#35;59&#59;/description&amp;amp&#59;gt&amp;&#35;59&#59;
                    
                    &amp;amp&#59;lt&amp;&#35;59&#59;accessPoint useType&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;wsdlDeployment&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;
                        http&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;//$&amp;amp&#59;&amp;&#35;35&#59;123&amp;&#35;59&#59;juddi.server.name&amp;amp&#59;&amp;&#35;35&#59;125&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;$&amp;amp&#59;&amp;&#35;35&#59;123&amp;&#35;59&#59;juddi.server.port&amp;amp&#59;&amp;&#35;35&#59;125&amp;&#35;59&#59;/juddiv3/services/inquiry?wsdl
                    &amp;amp&#59;lt&amp;&#35;59&#59;/accesspoint&amp;amp&#59;gt&amp;&#35;59&#59;
                    &amp;amp&#59;lt&amp;&#35;59&#59;tModelInstanceDetails&amp;amp&#59;gt&amp;&#35;59&#59;
                        &amp;amp&#59;lt&amp;&#35;59&#59;tModelInstanceInfo tModelKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;uddi.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;v3_inquiry&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;
                            &amp;amp&#59;lt&amp;&#35;59&#59;instanceDetails&amp;amp&#59;gt&amp;&#35;59&#59;
                                &amp;amp&#59;lt&amp;&#35;59&#59;instanceParms&amp;amp&#59;gt&amp;&#35;59&#59;
                                &amp;amp&#59;lt&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;33&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;91&amp;&#35;59&#59;CDATA&amp;amp&#59;&amp;&#35;35&#59;91&amp;&#35;59&#59;
                                &amp;amp&#59;lt&amp;&#35;59&#59;?xml version&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;1.0&amp;amp&#59;quot&amp;&#35;59&#59; encoding&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;utf&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;8&amp;amp&#59;quot&amp;&#35;59&#59; ?&amp;amp&#59;gt&amp;&#35;59&#59;
                                &amp;amp&#59;lt&amp;&#35;59&#59;UDDIinstanceParmsContainer 
                                    xmlns&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;urn&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;policy_v3_instanceParms&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;
                                    &amp;amp&#59;lt&amp;&#35;59&#59;defaultSortOrder&amp;amp&#59;gt&amp;&#35;59&#59;
                                        uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;uddi.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;sortorder&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;binarysort
                                    &amp;amp&#59;lt&amp;&#35;59&#59;/defaultsortorder&amp;amp&#59;gt&amp;&#35;59&#59;
                                &amp;amp&#59;lt&amp;&#35;59&#59;/uddiinstanceparmscontainer&amp;amp&#59;gt&amp;&#35;59&#59;
                                &amp;amp&#59;&amp;&#35;35&#59;93&amp;&#35;59&#59;&amp;amp&#59;&amp;&#35;35&#59;93&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;
                                &amp;amp&#59;lt&amp;&#35;59&#59;/instanceparms&amp;amp&#59;gt&amp;&#35;59&#59;
                            &amp;amp&#59;lt&amp;&#35;59&#59;/instancedetails&amp;amp&#59;gt&amp;&#35;59&#59;
                        &amp;amp&#59;lt&amp;&#35;59&#59;/tmodelinstanceinfo&amp;amp&#59;gt&amp;&#35;59&#59;
                    &amp;amp&#59;lt&amp;&#35;59&#59;/tmodelinstancedetails&amp;amp&#59;gt&amp;&#35;59&#59;
                    &amp;amp&#59;lt&amp;&#35;59&#59;categoryBag&amp;amp&#59;gt&amp;&#35;59&#59;
                        &amp;amp&#59;lt&amp;&#35;59&#59;keyedReference keyName&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;types&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;wsdl&amp;amp&#59;quot&amp;&#35;59&#59; keyValue&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;wsdlDeployment&amp;amp&#59;quot&amp;&#35;59&#59; 
                            tModelKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;uddi.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;categorization&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;types&amp;amp&#59;quot&amp;&#35;59&#59;/&amp;amp&#59;gt&amp;&#35;59&#59;
                    &amp;amp&#59;lt&amp;&#35;59&#59;/categorybag&amp;amp&#59;gt&amp;&#35;59&#59;
                &amp;amp&#59;lt&amp;&#35;59&#59;/bindingtemplate&amp;amp&#59;gt&amp;&#35;59&#59;
            &amp;amp&#59;lt&amp;&#35;59&#59;/bindingtemplates&amp;amp&#59;gt&amp;&#35;59&#59;
        &amp;amp&#59;lt&amp;&#35;59&#59;/businessservice&amp;amp&#59;gt&amp;&#35;59&#59;
        &amp;amp&#59;lt&amp;&#35;59&#59;businessService serviceKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;juddi.apache.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;services&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;publish&amp;amp&#59;quot&amp;&#35;59&#59; 
            businessKey&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;uddi&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;juddi.apache.org&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;businesses&amp;amp&#59;&amp;&#35;35&#59;45&amp;&#35;59&#59;asf&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;
            &amp;amp&#59;lt&amp;&#35;59&#59;name xml&amp;amp&#59;&amp;&#35;35&#59;58&amp;&#35;59&#59;lang&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;&amp;amp&#59;quot&amp;&#35;59&#59;en&amp;amp&#59;quot&amp;&#35;59&#59;&amp;amp&#59;gt&amp;&#35;59&#59;UDDI Publish Service&amp;amp&#59;lt&amp;&#35;59&#59;/name&amp;amp&#59;gt&amp;&#35;59&#59;
            ...........
        &amp;amp&#59;lt&amp;&#35;59&#59;/businessservice&amp;amp&#59;gt&amp;&#35;59&#59;
    &amp;amp&#59;lt&amp;&#35;59&#59;/businessservices&amp;amp&#59;gt&amp;&#35;59&#59;
&amp;amp&#59;lt&amp;&#35;59&#59;/businessentity&amp;amp&#59;gt&amp;&#35;59&#59;

Note that the seeding process only kicks off if no publishers exist in the database. So this will only work with a clean database, unless you set juddi.seed.always to true. Then it will re-apply all files with the exception of the root data files. Note that this can lead to losing data that was added to entities that are re-seeded, since data is not merged.

Token in the Seed Data

You may have noticed the tokens in the root_BusinessEntity.xml file (${juddi.server.baseurl}. The value of this tokens can set in the juddiv3.properties file. The value substitution takes place at runtime, so that different nodes can do the substitution with their own value if needed.

Customer Seed Data

In your deployment you probably do not want to use the Seed Data shipped with the default jUDDI install. The easiest way to overwrite this data is to add it to a directory call juddi_custom_install_data in the juddiv3.war/WEB-INF/classes/ directory. That way you don't have to modify the juddi-core-3.x.jar. Additionally if your root publisher is not called “root” you will need to set the juddi.root.publisher property in the juddiv3.properties file to something other then

juddi.root.publisher&amp;amp&#59;&amp;&#35;35&#59;61&amp;&#35;59&#59;root

The juddiv3.war ships with two example data directory. One for the Sales Affiliate, and one for the Marketing Affiliate. To use the Sales Seed Data, in the juddiv3.war/WEB-INF/classes/, rename the directory

mv RENAME4Sales_juddi_custom_install_data juddi_custom_install_data
before you start jUDDI the first time. It will then use this data to populate the database. If you want to rerun you can trash the database it created and restart tomcat. Don't forget to set the tokens in the juddiv3.properties file.