UDDI ユーティリティー・ツールは、UDDI バージョン 2 エンティティー (子エンティティー、およびそれぞれのバージョン 2 エンティティー・キーを含みます) を、バージョン 3 の UDDI レジストリーにマイグレーション、移動、またはコピーする際に使用できる機能のスイートです。
UDDI ユーティリティー・ツールは、 z/OS プラットフォームではサポートされていません。ツールを使用するには、Client Development Kit for z/OS のインス トールに説明されているように、z/OS 以外のシステムに Client Developer Kit for z/OS をインストールする必要があります。 また、z/OS 以外のシステムに、別の WebSphere Application Server をイ ンストールしている場合には、インストールに付随している UDDI ユーテ ィリティー・ツールを使用することができます。
UDDI ユーティリティー・ツールを使用するには、 UDDIUtilityTools.jar ファイルを実行します。このファイルは、app_server_root/UDDIReg/scripts ディレクトリーに あります。また、UDDI ユーティリティー・ツールのすべての機能は、提供されているパブリック Java API からも 呼び出せます。
関数間、入力と出力、およびソースとターゲットの UDDI レジストリーの関係は、概念的な総括ダイアグラム に示されています。
UDDI ユーティリティー・ツールの構成データは、構成プロパティー・ファイル内にあります。構成プロパティー・ファイルには、ランタイム環境、UDDI とデータベースの場所とアクセス情報、ロギング情報、セキュリティー構成、エンティティー定義ファイルの場所、および、参照されるエンティティーのインポートや上書きを制御するその他のフラグが記述されています。
JSSE プロバイダーを
構成している場合は、プロバイダーを含む .jar ファイルをクラスパスに
追加します。JSSE プロバイダーの構成はオプションで、jsse.provider プロパティーを設定することによって実行します。
デフォルト値は、com.ibm.jsse.IBMJSSEProvider です。FIPS JSSE プロバイダーを指定するには、jsse.provider プロパティーの値を com.ibm.fips.jsse.IBMJSSEFIPSProvider に設定します。
############################################## # Runtime environment # # (if invoking via java -jar...) # # "X Y" required around paths with spaces # # Replace WAS_HOME with your WAS home path. # # db2java.zip is for DB2 - replace this with # # appropriate database driver file. # ############################################## classpath=.;WAS_HOME/UDDIReg/scripts/UDDIUtilityTools.jar;WAS_HOME/lib/soap.jar;WAS_HOME/lib/uddi4jv2.jar;WAS_HOME/lib/j2ee.jar;"C:/Program Files/IBM/SQLLIB/java/db2java.zip" ############################################## # SOAP entry points for source UDDI # ############################################## fromInquiryURL=http://localhost:9080/uddisoap/inquiryapi fromGetURL=http://localhost:9080/uddisoap/get ############################################## # SOAP entry points for target UDDI # ############################################## toInquiryURL=http://localhost:9080/uddisoap/inquiryapi toPublishURL=http://localhost:9080/uddisoap/publishapi ############################################## # UDDI registry user information # # # # Note: this must match the user information # # that was used to publish the entities on # # the target UDDI registry. # ############################################## userID=UNAUTHENTICATED password=NONE ############################################## # Configuration for destination UDDI DB # ############################################## dbDriver=COM.ibm.db2.jdbc.app.DB2Driver dbUrl=jdbc:db2:uddi20 dbUser=db2admin dbPasswd=db2admin ############################################## # Security provider configuration # ############################################## # Indicates whether security is required on the target registry secure.connection=true # The location of the truststore if security is required trustStore.fileName=c:/websphere/appserver/etc/DummyClientTrustFile.jks # The password for the trust store trustStore.password=WebAS # The JSSE Provider class name jsse.provider=com.ibm.jsse.IBMJSSEProvider ############################################## # Trace and message logging configuration # ############################################## # detail level of message output (all functions) verbose=true # detail level of trace output. # 1: severe # 2: normal # 3: detail traceLevel=3 # path to message log file (relative or absolute) messageLogFileName=logs/messages.log # path to trace log file (relative or absolute) traceLogFileName=logs/trace.log ############################################## # Miscellaneous Options # ############################################## # indicates if existing entities are overwritten (import/promote) # Note: tModels in referencedTModels section are never overwritten, # regardless of this setting. To overwrite tModels, they must # be present in the tModels section. overwrite=false # indicates if referenced entities will be imported (import/promote) importReferencedEntities=true # location of entity definition file, used for (export/import) UddiEntityDefinitionFile=C:/definitions/entities01.xml # namespace prefix to use in definition file (export) namespacePrefix=promote
前提条件
UDDI ユーティリティー・ツール を実行するには、WebSphere Application Server で提供されている Java コード用の IBM Development Kit を 使用する必要があります。この Development Kit は、app_server_root/java/bin にあります。
DB2 | Cloudscape |
||
---|---|---|---|
z/OS プラットフォームの クラスパスの DBDriverLocation | DB2_HOME/jcc/classes/db2jcc.jar、DB2_HOME/jcc/classes/db2jcc_license_cisuz.jar | app_server_root/cloudscape/lib/otherJars/db2jcc.jar、app_server_root/cloudscape/lib/db2jcc_license_c.jar |
|
z/OS プラットフォームのドライバー | com.ibm.db2.jcc.DB2Driver | com.ibm.db2.jcc.DB2Driver | |
z/OS プラットフォームの URL | jdbc:db2://host:database_port/database_location | jdbc:db2j:net://host:1527/database_name (以下の注を参照) |
上記のプロパティー・ファイル内のセキュリティー・プロバイダー構成セクションには、デフォルトの DummyClientTrustFile.jks ファイルの位置が示されています。独自のトラストストアを使用する場合は、そのトラストストアがこの場所にあることを確認してください。
UDDI ユーティリティー・ツールでは UDDI バージョン 2 SOAP 照会および公開インターフェースを使用します。 UDDI レジストリー・インターフェースのアクセス制御で説明されているように、これらの API は保護されています。UDDI ユーティリティー・ツールは、データベース・ドライバーを介しても UDDI レジストリー・データベースにアクセスでき、データベースへのアクセスはデータベース管理システムによって 制御されます。
UDDI エンティティー定義ファイル
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema id="uddiPromote" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.ibm.com/xmlns/prod/WebSphere/UDDIUtilityTools" xmlns:xsd="http://www.w3.org /2001/XMLSchema" xmlns:uddi="urn:uddi-org:api_v2" xmlns="http://www.ibm.com/xmlns/prod/WebSphere/UDDIUtilityTools" xmlns:promote="http://www.ibm.com/xmlns/prod/WebSphere/UDDIUtilityTools"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd" /> <xsd:import namespace="urn:uddi-org:api_v2" schemaLocation="uddi_v2.xsd" /> <!-- define a type to represent state of a tModel --> <xsd:simpleType name="tModelDeleted"> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="true" /> <xsd:enumeration value="false" /> </xsd:restriction> </xsd:simpleType> <!-- extend tModel with additional attribute of type tModelDeleted --> <!-- This is restricted to values true or false --> <xsd:complexType name="tModel"> <xsd:complexContent> <xsd:extension base="uddi:tModel"> <xsd:attribute name="deleted" type="promote:tModelDeleted" use="optional" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- Top level element definitions --> <xsd:element name="uddiEntities" type="promote:uddiEntities" /> <xsd:complexType name="uddiEntities"> <xsd:sequence> <xsd:element ref="promote:tModels" minOccurs="0" maxOccurs="1" /> <xsd:element ref="promote:businesses" minOccurs="0" maxOccurs="1" /> <xsd:element ref="promote:services" minOccurs="0" maxOccurs="1" /> <xsd:element ref="promote:bindings" minOccurs="0" maxOccurs="1" /> <xsd:element ref="promote:referencedTModels" minOccurs="0" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> <xsd:element name="businesses" type="promote:businesses" /> <xsd:complexType name="businesses"> <xsd:sequence> <xsd:element ref="uddi:businessEntity" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> <xsd:element name="tModels" type="promote:tModels" /> <xsd:complexType name="tModels"> <xsd:sequence> <xsd:element ref="uddi:tModel" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> <xsd:element name="services" type="promote:services" /> <xsd:complexType name="services"> <xsd:sequence> <xsd:element ref="uddi:businessService" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> <xsd:element name="bindings" type="promote:bindings" /> <xsd:complexType name="bindings"> <xsd:sequence> <xsd:element ref="uddi:bindingTemplate" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> <xsd:element name="referencedTModels" type="promote:referencedTModels" /> <xsd:complexType name="referencedTModels"> <xsd:sequence> <xsd:element ref="uddi:tModel" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:schema>
標準 tModel の UDDI エンティティー定義ファイルの例
以下のエンティティー定義ファイルの例は、5 つのメイン・セクション (tModels、businesses、services、bindings、および referencedTModels) を示しています。
UDDI ユーティリティー・ツールを使用すると、 ターゲットの UDDI レジストリー内に新規の UDDI エンティティーを作成することができます。 この典型的な例は、公に知られている tModel キーを持つ新規の正規 tModel の導入です。
<?xml version="1.0" encoding="UTF-8"?> <promote:uddiEntities xmlns="urn:uddi-org:api_v2" xmlns:promote="http://www.ibm.com/xmlns/prod/WebSphere/ UDDIUtilityTools"> <!-- tModels --> <promote:tModels> <tModel tModelKey="uuid:ee3966a8-faa5-416e-9772-128554343571" > <name>http://schemas.xmlsoap.org/ws/2002/07/policytmodel</name> <description>WS-PolicyAttachment policy expression</description> </tModel> <tModel tModelKey="uuid:ad61de98-4db8-31b2-a299-a2373dc97212" > <name>uddi-org:wsdl:address</name> <description xml:lang="en"> This tModel is used to specify the URL fact that the address must be obtained from the WSDL deployment ファイル。 </description> <overviewDoc> <overviewURL> http://www.oasis-open.org/committees/uddi-spec/doc/tn/uddi-spec-tc-tn-wsdl-v2.htm#Address </overviewURL> </overviewDoc> </tModel> </promote:tModels> <!-- businesses --> <promote:businesses> </promote:businesses> <!-- services --> <promote:services> </promote:services> <!-- bindings --> <promote:bindings> </promote:bindings> <!-- referenced tModels --> <promote:referencedTModels> </promote:referencedTModels> </promote:uddiEntities>
コマンド・プロンプトにおける UDDI ユーティリティー・ツールの始動
export PATH=app_server_root/java/bin:$PATH
使用方法は以下のとおりです。
Usage: java -jar UDDIUtilityTools.jar {function} [options] function: -promote <entity source> Promote entities between registries -export <entity source> Extract entities from registry to XML -delete <entity source> Delete entities from registry -import Create entities from XML to registry where <entity source> is one of: -tmodel|-business|-service|-binding <key> Specify single entity type and key -keysFile | -f <filename> Specify file containing entity types and keys options: -properties <filename> Specify path to configuration file -overwrite | -o Overwrite an entity if it already exists -log | -v Output verbose messages -definitionFile <filename> Specify path to UDDI entity definition file -importReferenced Import entities referenced by source entities The following options override property settings in configuration file: -overwrite -log -definitionFile -importReferenced Example: java -jar UDDIUtilityTools.jar -promote -keysFile /uddikeys.txt
以下は、一連の UDDI ユーティリティー・ツールのコマンド行の例です
java -jar UDDIUtilityTools.jar -export -business 28B8B928-2B2E-4EC9-A647-1E40651E4752
java -jar UDDIUtilityTools.jar -export -keysFile /myKeyFiles/keyFile01.txt
java -jar UDDIUtilityTools.jar -export -keysFile /myKeyFiles/keyFile02.txt -v
java -jar UDDIUtilityTools.jar -import
java -jar UDDIUtilityTools.jar -import -importReferenced
java -jar UDDIUtilityTools.jar -import -definitionFile /myEDFs/entities01.xml
java -jar UDDIUtilityTools.jar -import -overwrite -importReferenced
java -jar UDDIUtilityTools.jar -promote -service 67961D67-330F-4F14-8210-E74A58E710F3 -properties /UUT/myUUTProps.properties
java -jar UDDIUtilityTools.jar -promote -keysFile /myKeyFiles/keyFile03.txt
java -jar UDDIUtilityTools.jar -promote -keysFile /myKeyFiles/keyFile04.txt -overwrite
java -jar UDDIUtilityTools.jar -promote -keysFile /myKeyFiles/keyFile05.txt -importReferenced
java -jar UDDIUtilityTools.jar -promote -keysFile /myKeyFiles/keyFile06.txt -definitionFile /myEDFs/entities02.xml
java -jar UDDIUtilityTools.jar -delete -tModel UUID:1E2B9D1E-E53D-4D36-9D46-6CCC176C466A
java -jar UDDIUtilityTools.jar -delete -keysFile /myKeyFiles/keyFile04.txt
キー・ファイルの例
# # Keys of entities to be exported, promoted from source registry or deleted from target registry # # Note: keys must be comma separated and on SAME line # Note: property names are case sensitive. ('tmodels=' will be ignored) businesses=97C77097-AC6C-4CA0-A6C4-452F7045C470, 4975E949-581F-4FCA-AD5F-E08280E05F9F services=BB3864BB-1578-4833-8179-14391F14791F bindings= tModels=273F1727-7BFF-4FB5-A1FD-BA5C45BAFD9C
referencedTModel を更新する必要がある場合は、エンティティー定義ファイル内の referencedTModel 定義を tModels セクションに手動で移動し、overwrite プロパティーを true に設定します。
ログ・ファイルの内容
[29/07/04 17:39:57:531 BST] CWUDU0002I: ********** Starting UDDI Utility Tools ********** [timestamp and eyecatcher indicate when tool is run] [29/07/04 17:39:57:531 BST] CWUDU0009I: Exporting entities... [29/07/04 17:39:57:531 BST] CWUDU0015I: Exported 14 entities. [29/07/04 17:39:57:531 BST] CWUDU0029I: Serializing... [29/07/04 17:39:57:531 BST] CWUDU0030I: Serialized entities. [29/07/04 17:39:57:531 BST] CWUDU0016I: Importing entities... [29/07/04 17:39:57:531 BST] CWUDU0124I: Created tModel minimal entity with tModelKey [uuid:667e2766-4781- 4151-b3a0-809f7180a096]. [29/07/04 17:39:57:531 BST] CWUDU0121I: Created business minimal entity with businessKey [263f5526-8708-4 834-9f5d-8f8c878f5d6e]. [29/07/04 17:39:57:531 BST] CWUDU0122I: Created service minimal entity with serviceKey [0af2a30a-be70-401 f-a027-331a6c332712]. [29/07/04 17:39:57:531 BST] CWUDU0122I: Created service minimal entity with serviceKey [61012761-d02c-4c7 0-ae98-435ffd4398f9]. [29/07/04 17:39:57:531 BST] CWUDU0123I: Created binding template minimal entity with bindingKey [f97af9f9 -7cb7-47bd-8b90-b55e4db590df]. [29/07/04 17:39:57:531 BST] CWUDU0123I: Created binding template minimal entity with bindingKey [17e4c017 -d273-43ec-af4a-f9b841f94a30]. [29/07/04 17:39:57:531 BST] CWUDU0123I: Created binding template minimal entity with bindingKey [9e2c239e -3b30-40a9-9c25-ce64edce25b9]. [29/07/04 17:39:57:531 BST] CWUDU0121I: Created business minimal entity with businessKey [49bb6949-4b0e-4 e81-88a7-e26bfbe2a7f1]. [29/07/04 17:39:57:531 BST] CWUDU0122I: Created service minimal entity with serviceKey [003d2b00-f6c0-407 1-8b84-f235a2f28445]. [29/07/04 17:39:57:531 BST] CWUDU0123I: Created binding template minimal entity with bindingKey [df1019df -2d2f-4f32-bf18-4f21274f1835]. [29/07/04 17:39:57:531 BST] CWUDU0123I: Created binding template minimal entity with bindingKey [b229aeb2 -f2b1-4115-a06f-536753536f10]. [29/07/04 17:39:57:531 BST] CWUDU0122I: Created service minimal entity with serviceKey [84d8e584-2510-409 9-9b2a-6023f1602a0a]. [29/07/04 17:39:57:531 BST] CWUDU0123I: Created binding template minimal entity with bindingKey [62a9a762 -7fff-4f7a-8463-af0c79af63ee]. [29/07/04 17:39:57:531 BST] CWUDU0123I: Created binding template minimal entity with bindingKey [e08654e0 -b212-42c0-bcf3-655e9765f392]. [29/07/04 17:39:57:531 BST] CWUDU0115I: Imported 7 entities and 0 referenced entities. [this kind of message indicates the operation worked!] [29/07/04 17:39:57:531 BST] CWUDU0002I: ********** Starting UDDI Utility Tools ********** [29/07/04 17:39:57:531 BST] CWUDU0023I: Deleting entities... [29/07/04 17:39:57:531 BST] CWUDU0028I: Deleted 7 entities.
[29/07/04 17:39:57:531 BST] ********** Starting UDDI Utility Tools ********** [eyecatcher and timestamp indicate when tool is run] [29/07/04 17:39:57:531 BST] > com.ibm.uddi.promoter.PromoterAPI.setUddiEntities() [the '>' indicates entry to the constructor of this class] [29/07/04 17:39:57:531 BST] > com.ibm.uddi.promoter.export.KeyFileReader() [29/07/04 17:39:57:531 BST] com.ibm.uddi.promoter.export.KeyFileReader() loaded tModel keys [29/07/04 17:39:57:531 BST] com.ibm.uddi.promoter.export.KeyFileReader() loaded business keys TransformConfiguration: nameSpacePrefix=promote uddiEntityDefinitionFile=C:¥temp/MigToolFiles/Results/Promote_api_EDF_1.xml ExportConfiguration: fromGetURL=http://yottskry:9080/uddisoap/ fromInquiryURL=http://yottskry:9080/uddisoap/inquiryAPI ImportConfiguration: overwrite=true uddiEntityDefinitionFile=C:¥temp/MigToolFiles/Results/Promote_api_EDF_1.xml importReferencedEntities=true PublishConfiguration: toInquiryURL=http://davep:9080/uddisoap/inquiryAPI toPublishURL=http://yottskry:9080/uddisoap/publishAPI userID=Publisher1 trustStoreFileName=C:¥WebSphere600/AppServer/etc/DummyClientTrustFile.jks secureConnection=false DatabaseConfiguration: dbDriver=COM.ibm.db2.jcc.DB2Driver dbURL=jdbc:db2:LOC1 dbUser=db2admin LoggerConfiguration: messageStream=null messageLogFileName=C:¥temp/MigToolFiles/logs/message.log traceLogFileName=C:¥temp/MigToolFiles/logs/trace.log traceLevel=3 verbose=true [29/07/04 17:39:57:531 BST] < com.ibm.uddi.promoter.PromoterAPI() [29/07/04 17:39:57:531 BST] ********** Starting UDDI Utility Tools ********** [29/07/04 17:39:57:531 BST] > com.ibm.uddi.promoter.PromoterAPI.setUddiEntities() [29/07/04 17:39:57:531 BST] > com.ibm.uddi.promoter.export.KeyFileReader() [29/07/04 17:39:57:531 BST] com.ibm.uddi.promoter.export.KeyFileReader() loaded tModel keys [ log entries without a '>' or '<' are status messages only ] [29/07/04 17:39:57:531 BST] com.ibm.uddi.promoter.export.KeyFileReader() loaded business keys [29/07/04 17:39:57:531 BST] com.ibm.uddi.promoter.export.KeyFileReader() loaded service keys [29/07/04 17:39:57:531 BST] com.ibm.uddi.promoter.export.KeyFileReader() loaded binding keys [29/07/04 17:39:57:531 BST] > com.ibm.uddi.promoter.UddiEntityKeys() [29/07/04 17:39:57:531 BST] < com.ibm.uddi.promoter.UddiEntityKeys() [the '<' indicates exit from the constructor] [29/07/04 17:39:57:531 BST] com.ibm.uddi.promoter.export.KeyFileReader() removed duplicate, empty and null keys [29/07/04 17:39:57:531 BST] < com.ibm.uddi.promoter.export.KeyFileReader() [29/07/04 17:39:57:531 BST] < com.ibm.uddi.promoter.PromoterAPI.setUddiEntities() [29/07/04 17:39:57:531 BST] > com.ibm.uddi.promoter.PromoterAPI.deleteEntities() [29/07/04 17:39:57:531 BST] > com.ibm.uddi.promoter.publish.EntityDeleter() [29/07/04 17:39:57:531 BST] < com.ibm.uddi.promoter.publish.EntityDeleter() [29/07/04 17:39:57:531 BST] > com.ibm.uddi.promoter.UDDIClient() [29/07/04 17:39:57:531 BST] com.ibm.uddi.promoter.UDDIClient() client type: 1
API からの UDDI ユーティリティー・ツールの始動
UDDI ユーティリティー・ツールには、 API クラスの使用の実例を説明するサンプル・コードがいくつかあり、 Samples Central から入手できます。
このリリースでは、 「低レベルの」API クラスとメソッドは使用すべきではありません。 詳しくは、API 資料を参照してください。
UDDI ユーティリティー・ツールに関する既知の制限と予備手段
UDDI ユーティリティー・ツールには幾つかの既知の制限があり、それぞれに予備手段があります。 詳しくは、UDDI トラブルシューティングのヒントを参照してください。
組み込み Cloudscape の制限事項
組み込み Cloudscape データベースを使用してソース・レジストリーを参照する場合の「エクスポート」および「削除」機能がサポートされています。ただし、ターゲット・レジストリーを 参照している場合の「インポート」および「プロモート」機能は、組み込み Cloudscape データ ベースを使用する際の UDDI レジストリーの制限があるため、 サポートされていません。「プロモート」および「インポート」機能を有効にするには、 組み込み Cloudscape データベースでネットワークを使用可能にする必要があります。 Cloudscape バージョン 5.1.60x の構成を 参照してください。
バージョン 3 のビジネスを定義済みキーを使用して保管する場合の例を以下に示します。
<?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <Body> <save_business xmlns="urn:uddi-org:api_v3"> <authInfo>a399c4a3-6387-47cd-a1bd-91f7bb91bdd7</authInfo> <businessEntity businessKey="uddi:mycompany-p1.com:computers"> <name xml:lang="en">WithKey</name> </businessEntity> </save_business> </Body> </Envelope>
UDDI ユーティリティー・ツールに関する既知の制限と予備手段
回避策: 関連のあるビジネスをプロモートした後に、 publisherAssertion の関係を再作成してください。
次善策: 計画されるサービスを「所有」することになる参照ビジネスを EDF に追加します。 ターゲット・レジストリーにビジネスが存在しない場合は、EDF でサービスがビジネスを所有する前に、 ビジネスを配置する必要があります。
次善策: 2 つ以上のサービスの展開の間に循環参照が存在する場合は、 展開のうちの 1 つを一時的に除去することによりサイクルを中断し、インポートを実行し、 変更されたエンティティーを更新してターゲット・レジストリーにサイクルを再確立します。
次善策: tModel のインポートの後に、削除を実行してください。 これは、UDDI ユーティリティー・ツールの削除機能、または、 その他の UDDI レジストリー API アクセス・メソッドを使用して実行します。
次善策: 参照される bindingTemplate を EDF に追加します。
次善策: ビジネスを参照する tModel をインポートする前に、 参照されるビジネスをターゲット・レジストリーにインポートします。