游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1101|回复: 0

UDDI4J v2 ??wxh zt

[复制链接]

1367

主题

1993

帖子

2118

积分

金牌会员

Rank: 6Rank: 6

积分
2118
发表于 2004-12-23 22:39:00 | 显示全部楼层 |阅读模式

?????? 2 ? UDDI ????????????????????? UDDI4J ?? API ????? API ??????????? UDDI ?? 2?????????? UDDI ???????????????????????????????????????? API?
UDDI4J ????
Web ??????????????????????? WSDL ?????????? Web ?????????????? Web ??????????????????????????????????????????????? Web ?????????????????????????????????????????????????????????? Web ??????

???????????Universal Description?Discovery and Integration?UDDI????????????UDDI ?????? Web ???????????????????? UDDI ?????????????????????? WSDL ?????????????????????????? Web ???????????????????????????????

UDDI ????????? UDDI ?????????? XML ???UDDI4J ???? UDDI ???????????? Java API?UDDI4J ????????????????????????????UDDI4J ???? UDDI ??????????????????????????????

?? UDDI4J ?? 1 ???????????? UDDI ???????UDDI Business Registry?UBR??UDDI ????????UDDI4J ????????UDDI ?? 2 ????????????????????????????????? UDDI ?????????? UDDI ???? 2?2001 ? 11 ? ??? UDDI4J ?? 2 ??????? 2002 ? 7 ????????????? UDDI4J ??????????????????????????????

UDDI4J ???? IBM ? 2001 ? 1 ????????????? developerWorks ??????????????????????? 2 ??HP ?? UDDI4J ????????????????????UDDI ?? 2 ??????????????? IBM?HP ? SAP ???????????UDDI4J ?????? UDDI ????? Java API?

?? UDDI ????????? Web ?????????????UDDI4J ??????????

UDDI4J ????
UDDI4J ????????org.uddi4j.client.UDDIProxy ???? UDDI ??????????????????????????? UDDI ????????UDDIProxy ???????? UDDI ?????? API ??????????????????? UDDI ???????????

?? API ????? org.uddi4j.response.DispositionReport ??????????????????? org.uddi4j.UDDIException ??????????????????UDDIException ???? DispositionReport??????????????

UDDI API ?????? API ??? API??? API ????? URL??? URL ???? SSL ??? https ?????? Java ?????? SSL ?????? JSSE ???????????????????????????? Sun ? Java ?? JSSE ???? SSL????????? jdk/jre/lib/security/java.security ??????????????


System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());



UDDIProxy ???????? URL ??? URL??????????????????????????? URL?????? API ????????????????????????????????? Web ??????????????????

???????????? API ??????????????


// Construct a UDDIProxy object
UDDIProxy proxy = new UDDIProxy();

try {
// Select the desired UDDI server node
proxy.setInquiryURL("inquiryURL");
proxy.setPublishURL("publishURL");

// Pass in userid and password registered at the UDDI site
AuthToken token = proxy.get_authToken("userid", "password");
...
} catch (UDDIException e) {
...




UDDI4J ???
UDDI ?? 2 ??????????????? 2 ????????????? UDDI4J ???????????????

? UDDI ?? 2 ?????????
????
????
?????
?????
? UDDI ?? 2 ??????
??????
?????
??????
??????
???
UDDI ?? 2 ?????????? API??????????????????????????UDDI ?? 2 ??? 1 ??????????UDDI ?? 2 ?????????? 1 ??? 2 ????????? 1 ??????????? 2 ????

UDDI4Jv2 ???????? 2 ????????? 1 ????UDDI4Jv1 ??????????? 1 ??????????? JVM ????? UDDI4Jv1 ? UDDI4Jv2 ???? 1 ??? 2 ????????????????????? 1 ??????????????????????????????? 2?

??????
???????????????UDDI4J ??????? com.ibm.uddi ?? org.uddi4j????????????? Web ???http://www.uddi4j.org?????????????????????????????????????????????? UDDI4J ????

??
UDDI4J ?? 2 ??????????????????configurator???????????????? SSL ?????? URL ??????????????????????????????????????????????? URL ????????????????? http://www.uddi4j.org ???links???????????????? URL ????

????
UDDI4J ?? 2 ???????????????????????????????????????????????????????????? UDDIProxy?????? JVM ??? UDDI4J ???????????????????????????????????? UDDI4J ????????????????????????????????? UDDI4J ????

????????????????????????

java -DpropertyName=propertyValue Pluggable transports

UDDI4Jv2 ?????????????UDDI4Jv1 ???? Apache SOAP????????????????? SOAP ?????????????????? SOAP ??????Apache SOAP ????????? Apache Axis ??????UDDI4Jv2 ???????? HP ??? SOAP ???UDDI4Jv2 ????? SOAP ???Apache SOAP ???????????????????????????????


org.uddi4j.TransportClassName=transport_class_name



???????????????????????????????? SOAP ???

org.uddi4j.transport.ApacheSOAPTransport????
org.uddi4j.transport.ApacheAxisTransport
org.uddi4j.transport.HPSOAPTransport
???????????? org.uddi4j.transport.TransportException ???????????????????????????????

????
UDDI4J ??????????????????????? UDDI ?????????????????????????????????

org.uddi4j.logEnabled=true



?? SOAP ??????????HP SOAP ??????????????????

??
??????????????????????????????????????????? HTTP ? socks ???UDDI4J ??????? Java ?????? HTTP ? socks ???????????????????????????????????????????UDDI4J ???????? http ????????????????????????

http.proxyHost ? ??????????
http.proxyPort ? ??????????????? 80?
https.proxyHost ? ??????????????? http ??????
https.proxyPort ? ???????? SSL ??????? 80?
http.proxyUserName ? ???????????????????
http.proxyPassword ? ??????????????????????
JDK ?????????????????????????????????

socksProxyHost ? socks ??????????
socksProxyPort ? socks ??????????
??????
?? UDDI4J ??? UDDI ???????????????? UDDI4J v1 ????????????????????????????????UDDI4J v2 ??????????????????????????????????????????????????????

????????


public void add(KeyedReference)
public boolean remove(KeyedReference)
public KeyedReference get(int index)
public int size()



????????????????????


util.IdentifierBag collection of KeyedReferences
util.CategoryBag collection of KeyedReferences
util.DiscoveryURLs collection of DiscoveryURL objects
util.FindQualifiers collection of FindQualifier objects
util.TmodelBag collection of Tmodel objects
response.BusinessInfos collection of BusinessInfo objects
response.PublisherAssertions collection of PublisherAssertion objects
response.RelatedBusinessInfos collection of RelatedBusinessInfo objects
response.ServiceInfos collection of ServiceInfo objects
response.TmodelInfos collection of TmodelInfo objects
datatype.binding.BindingTemplates collection of BindingTemplate objects
datatype.binding.TModelInstanceDetails collection of TmodelInstanceInfo objects
datatype.business.Contacts collection of Contact objects
datatype.service.BusinessServices collection of BusinessService objects



???? KeyedReference ???????????????? KeyedReference ?????????????

public KeyedReference(String keyName, String keyValue, String tModelKey)
??????????????????????????????????????????

?????????????


Vector ibVector = new Vector();
KeyedReference kr1 = new KeyedReference("name", "value");
kr1.setTModelKey("tmodelKey");
ibVector.add(kr1);
IdentifierBag ib = new IdentifierBag();
// The identifierbag is not really a collection, simply a container for a vector
ib.setKeyedReferenceVector(ibVector);



???????????????????????


KeyedReference kr1 = new KeyedReference("name", "value", "tmodelKey");
IdentifierBag ib = new IdentifierBag();
// New identifierBag method, it now acts like a simple collection class
ib.add(kr1);



UDDI ?? 2 ????????
UDDI ?? 2 ??????????????????????? UDDI ?? 2 ???? UDDI4J ?????????????????? UDDI?????????????????????????????????????????? UDDI ???????????????????????????????????????????????UDDI ?? 2 ?????????????UDDI4J ????????????????????????????????

????????????????? UDDI ??????????????????????????????????????????????????????????????????????????????? UDDI ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

??????????????????????????????????????????????????????????????????????? UDDI v2 ?????????????????????????????

???????
UDDI4J ??? API ????? UDDI ????? UDDI4J ?????????????? UDDI ????????? UDDI ?????????????????UDDI ?? 2 ????? J ??????????????????

?????????????? API ??? UDDI ?? 2 ???????? API ? UDDI4J ???? UDDIProxy ??????????


RelatedBusinessesList find_relatedBusinesses (FindQualifiers findQualifiers,
String businessKey
KeyedReference keyedReference);

DispositionReport add_publisherAssertions (String authInfo,
PublisherAssertion publisherAssertion);
DispositionReport add_publisherAssertions (String authInfo,Vector publisherAssertion);

DispositionReport delete_publisherAssertions (String authInfo,
PublisherAssertion publisherAssertion);
DispositionReport delete_publisherAssertions (String authInfo,Vector publisherAssertion);

AssertionStatusReport get_assertionStatusReport (String authInfo,
CompletionStatus completionStatus);
AssertionStatusReport get_assertionStatusReport (String authInfo,
String completionStatus);

PublisherAssertions get_publisherAssertions (String authInfo);

PublisherAssertions set_publisherAssertions (String authInfo,Vector publisherAssertion);
PublisherAssertions set_publisherAssertions (String authInfo,PublisherAssertion pub);



???????????????????????????????????????????????????????????????????????????????????? UDDI ???????????????????from key ??????to key ????????????????????????????????????????????


// Follows example in v2 spec appendix J
KeyedReference kr = new KeyedReference("Holding Company", // Key name
"parent-child", // Key value
TModel.RELATIONSHIPS_TMODEL_KEY);// Tmodelkey
PublisherAssertion pa = new PublisherAssertion(bk1, // from key
bk2, // to key
kr); // keyed reference
// Add publisher assertion linking two businesses
DispositionReport dr = proxy.add_publisherAssertions(token1.getAuthInfoString(),pa);



???????????????????????????????????????????????????????????????????????????????????????????UDDI ????????????????????????????????????????????????????????????????????????


// List available assertions (relationships)
AssertionStatusReport asr = proxy.get_assertionStatusReport(token2.getAuthInfoString(),
CompletionStatus.TOKEY_INCOMPLETE);
Vector v = asr.getAssertionStatusItemVector();
for (int i = 0; i < v.size(); i++) {
AssertionStatusItem asi = (AssertionStatusItem)v.elementAt(i);
PublisherAssertion pa = new PublisherAssertion(asi.getFromKeyString(),
asi.getToKeyString(),
asi.getKeyedReference());
DispositionReport dr = proxy.add_publisherAssertions(pa);
}



??????
?????????????? UDDI ???????????????????????????

??????????????????????????????????????????????????????????????? BusinessService ??????? save_business() ??????????????????????


BusinessDetail bd1 = proxy.get_businessDetail(bk1);
BusinessEntity be1 = (BusinessEntity)bd1.getBusinessEntityVector().elementAt(0);
BusinessServices bss1 = be1.getBusinessServices();
BusinessService serviceProjection = bss1.get(0); // Desired service

// Update a business and include the service projection
BusinessDetail bd2 = proxy.get_businessDetail(bk2);
BusinessEntity be2 = (BusinessEntity)bd2.getBusinessEntityVector().elementAt(0);
BusinessServices bs = new BusinessServices();
bs.add(serviceProjection);
be2.setBusinessServices(bs);
Vector entities = new Vector();
entities.addElement(be2);
proxy.save_business(token2.getAuthInfoString(),entities);



?????????????????????????????????????????????????????????????????????????????????????????????????????????????????? businesskey???????


// How to look at services and see if one is a service projection
BusinessDetail bd = proxy.get_businessDetail("businessKey");
BusinessEntity be = (BusinessEntity)bd.getBusinessEntityVector().elementAt(0);
BusinessServices bss = be.getBusinessServices();
for (int i = 0; i < bss.size(); i++) {
BusinessService bs = bss.get(i);
String businessKey = bs.getBusinessKey();
if (!businessServiceKey.equals(businessKey)) {
System.out.println("Service " + bs.getName() + " is a projection");
}
}



???
??????????????????????????????????UDDI ???????????????????????????????????????????????????????????????????????????????????????????? xml:lang ????????? RFC 1766 ????

???????????????????????????????????????????????????????????????????????????????????????????????UDDI4J ????????UDDI ??????????

????? NLS ??????? Name ??????????

Name(string, language)
UDDIProxy ?? find_business ? find_service ??????Name?????????????????

? UDDI ?? 1 ???????? org.uddi4j.datatype.Description ??????????????

?????
?????????????????????? find_business() ????? DiscoveryURLs?IdentifierBag?CategoryBag ? TmodelBag ?????????????????

UDDIProxy ?? find_business() ????????


BusinessList find_business (FindQualifiers findQualifiers,
Vector names,
DiscoveryURLs discoveryBag,
IdentifierBag identifierBag,
CategoryBag categoryBag,
TmodelBag tModelBag
Int maxRows);
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-23 19:36

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表