当前位置:早雪网网络学院编程文档Java → jUDDI 简单安装使用

jUDDI 简单安装使用

减小字体 增大字体 作者:未知  来源:supcode.com收集整理  发布时间:2005-6-29 19:23:24
# Transport classname. Typically defined on commandline as # -Dorg.uddi4j.TransportClassName=xxx. # ----------------------------------------------------------------------- #TransportClassName=org.uddi4j.transport.ApacheSOAPTransport TransportClassName=org.uddi4j.transport.ApacheAxisTransport # TransportClassName=org.uddi4j.transport.HPSOAPTransport

2.1.3 TestFindBusiness案例不通过

TestFindBusiness中有大小写匹配测试,但是在juddi-0.9rc3中的大小写匹配(caseSensitiveMatch)有bug,因此可以将大小写匹配的测 试案例注释掉。

2.1.4 PublisherManager的代码错误

在测试Test_save_tModel的时候_testAuthTokenExpired()中,我们测试过期验证时,在错误匹配的时候,会出现测试失败,如果捕捉这个 匹配的结果,你会发现,出错的类型是E_authTokenRequired而不是期待的E_authTokenExpired。

这是因为在我们所获得的AuthToken是空的,在根源就是在PublisherManager. getExpiredAuthToken(String, String)方法中,代码:
RegistryProxy proxy = new RegistryProxy();
proxy的实例的配置是空的。因此,我们修改这个方法变成:
  /**

   * changed by xio

   * @param publisher String

   * @param password String

   * @param testprops Properties:增加的参数,传入基本配置

   * @return String

   */

public static String getExpiredAuthToken(String publisher, String password,

                                           Properties testprops) {

    Properties props = new Properties();

    props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,

                      testprops.getProperty("adminURL"));

    props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,

                      testprops.getProperty("inquiryURL"));

    props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,

                      testprops.getProperty("publishURL"));

 

    RegistryProxy proxy = new RegistryProxy(props);

    AuthToken token = null;

    AuthInfo authInfo = null;

    String ret = null;

    try {

      token = proxy.getAuthToken(publisher, password);

      authInfo = token.getAuthInfo();

      ret = authInfo.getValue();

      System.out.println("getExpiredAuthToken:" + authInfo);

      proxy.discardAuthToken(authInfo);

    }

    catch (Exception ex) {

      ex.printStackTrace();

    }

    return ret;

  }

2.2 使用jUDDI测试

在juddi-0.9rc3版本中自带的代码中没有客户端的使用实例,虽然附带了整个项目代码的测试代码,但是估计没什么人喜欢从这里抽取学 习客户端使用的学习。

当然,学习的实例还是有的,在cvs当前的工程代码中,有个samples的文件夹,这部分代码便是一个十分齐全的实例(有几个类没完成, 但不影响:)。

Cvs服务器数据:http://ws.apache.org/juddi/cvs.html

Wincvs的使用请网上下载阅读。

其他:在进行代码学习的同时,建议阅读webservices相关资料文档。强烈建议阅读:理解 UDDI 注册中心的 WSDL 系列 (http://www-900.ibm.com/developerWorks/cn/webservices/ws-uwsdl/part1/)

参考资料:
http://wiki.apache.org/ws/jUDDI_HOW-TOs
http://ws.apache.org/juddi/lists.html

原作者:xio@qq.com
来 源:http://xio.mblogger.cn

<script type="text/javascript"> <!-- google_ad_client = "pub-9232855773311077"; google_ad_width = 300; google_ad_height = 250; google_ad_format = "300x250_as"; google_ad_channel =""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "0000FF"; google_color_url = "008000"; google_color_text = "000000"; //--> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">

上一页  [1] [2] 


Tags:jUDDI,简单,安装,使用
[数据载入中...] [返回上一页] [打 印]

文章评论评论内容只代表网友观点,与本站立场无关!

  评论人:Ivan   打分:0 分  发表时间:2007-11-13 21:25:14
· Nice[URL=http://lancia-flaminia.burnsvillemazda.cn#]lanciafl...
  评论人:ucowdquglw   打分:0 分  发表时间:2007-11-12 13:29:52
· Hello!GoodSite!Thanksyou!piwdmyznpn