利用uddi4j客户端发布、查找、删除web服务 整理

1. 下载uddi4j-bin-2.0.5.zip(附件中有下载)
2. 建立一个工程 名为uddi4jDemo,引入包uddi4j.jar , soap.jar,activation.jar,mail.jar
把uddi4j sample里面的configurator.java SaveBusinessExample.java FindBusinessExample.java publisherAssertionExample.java 放在工程默认package下;
samples.prop 放到根目录下
3. 打开samples.prop这个文件 修改设置下参数
设置url
inquiryURL = http://localhost:8080/juddi/inquiry
publishURL = http://localhost:8080/juddi/publish
设置
userid = juddi
password = juddi
userid、password 为上文
INSERT INTO PUBLISHER (PUBLISHER_ID,PUBLISHER_NAME,EMAIL_ADDRESS,IS_ENABLED,IS_ADMIN)
VALUES ('jdoe','John Doe','[email protected]','true','true');
中的PUBLISHER和PUBLISHER_NAME
设置soap transport 默认就是这个
TransportClassName=org.uddi4j.transport.ApacheSOAPTransport
4. 运行结果
运行 SaveBusinessExample.java
*********** Running SaveBusinessExample ***********
Get authtoken
Returned authToken:authToken:60BDF210-6641-11DB-A066-BC0BE7D6EEB5
Save 'Sample Business'
Returned businessKey:60DF35B0-6641-11DB-A066-A0B53CE33E0E
Listing businesses starting with S after we publish
Sample Business
Sample Business
Sample Business
运行FindBusinessExample.java
*********** Running FindBusinessExample ***********
Sample Business
Sample Business
Sample Business
因为我运行了三次save 所以有三个 sample business ,还有其他几个此处不做解释

你可能感兴趣的:(java,apache,Web,SOAP)