우리는 V2에서 jUDDI V3까지의 이동을 포함하여 일부 시스템을 업그레이드하고 있습니다. 과거 우리는 자바 코드에서 UDDI 서버에 액세스하기 위해 uddi4j를 사용했지만, uddi4j는 V3로 계속 진행되지 않았습니다. 광범위한 Google 시간을 통해 대체물이 없다고 생각하게되었습니다. 이 경우인가요? 대안이 있다면 추천 할 수 있습니까?V2에서 업그레이드 할 때 jUDDI V3에 연결하기 위해 사용할 수있는 Java API는 무엇입니까?
0
A
답변
1
내가 아는 한 jUDDIv3는 자체 UDDI 클라이언트를 제공합니다. http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/5.0.0-Beta1/html/jUDDI_User_Guide/chap-Using_jUDDI-Client.html
내가 별도의 다운로드 lib 디렉토리를 찾지 못했습니다하지만이 juddi 포털-번들에 포함되어
참조하십시오.
0
예, jUDDI에는 고유 한 UDDIv3 클라이언트가 있습니다. 여기
이 받는다는 정보를 < 의존성 > <의 groupId > org.apache.juddi < /의 groupId > < artifactId를 > juddi 클라이언트 </artifactId를 > < 버전의 > 3.1.5 </버전 > </종속성 >현재 소스 트렁크에있는 amples는 향후 버전과 함께 번들로 제공됩니다. 예제는 여기에서 찾을 수 있습니다. http://svn.apache.org/repos/asf/juddi/trunk/juddi-examples/
jUDDI 사용자 가이드는 훌륭한 참고 자료이기도합니다.
0
나는 3.0.4 juddi 포털 번들
/*
* Copyright 2001-2010 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import org.apache.juddi.api_v3.Publisher;
import org.apache.juddi.api_v3.SavePublisher;
import org.apache.juddi.v3.client.ClassUtil;
import org.apache.juddi.v3.client.config.UDDIClientContainer;
import org.apache.juddi.v3.client.transport.Transport;
import org.apache.juddi.v3_service.JUDDIApiPortType;
import org.uddi.api_v3.AuthToken;
import org.uddi.api_v3.BusinessDetail;
import org.uddi.api_v3.BusinessEntity;
import org.uddi.api_v3.BusinessService;
import org.uddi.api_v3.GetAuthToken;
import org.uddi.api_v3.Name;
import org.uddi.api_v3.SaveBusiness;
import org.uddi.api_v3.SaveService;
import org.uddi.api_v3.ServiceDetail;
import org.uddi.v3_service.UDDIPublicationPortType;
import org.uddi.v3_service.UDDISecurityPortType;
public class SimplePublish {
private static UDDISecurityPortType security = null;
private static JUDDIApiPortType juddiApi = null;
private static UDDIPublicationPortType publish = null;
public SimplePublish() {
try {
String clazz = UDDIClientContainer.getUDDIClerkManager(null).
getClientConfig().getUDDINode("default").getProxyTransport();
Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
if (transportClass!=null) {
Transport transport = (Transport) transportClass.
getConstructor(String.class).newInstance("default");
security = transport.getUDDISecurityService();
juddiApi = transport.getJUDDIApiService();
publish = transport.getUDDIPublishService();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void publish() {
try {
// Setting up the values to get an authentication token for the 'root' user ('root' user has admin privileges
// and can save other publishers).
GetAuthToken getAuthTokenRoot = new GetAuthToken();
getAuthTokenRoot.setUserID("root");
getAuthTokenRoot.setCred("");
// Making API call that retrieves the authentication token for the 'root' user.
AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
System.out.println ("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());
// Creating a new publisher that we will use to publish our entities to.
Publisher p = new Publisher();
p.setAuthorizedName("my-publisher");
p.setPublisherName("My Publisher");
// Adding the publisher to the "save" structure, using the 'root' user authentication info and saving away.
SavePublisher sp = new SavePublisher();
sp.getPublisher().add(p);
sp.setAuthInfo(rootAuthToken.getAuthInfo());
juddiApi.savePublisher(sp);
// Our publisher is now saved, so now we want to retrieve its authentication token
GetAuthToken getAuthTokenMyPub = new GetAuthToken();
getAuthTokenMyPub.setUserID("my-publisher");
getAuthTokenMyPub.setCred("");
AuthToken myPubAuthToken = security.getAuthToken(getAuthTokenMyPub);
System.out.println ("myPub AUTHTOKEN = " + myPubAuthToken.getAuthInfo());
// Creating the parent business entity that will contain our service.
BusinessEntity myBusEntity = new BusinessEntity();
Name myBusName = new Name();
myBusName.setValue("My Business");
myBusEntity.getName().add(myBusName);
// Adding the business entity to the "save" structure, using our publisher's authentication info and saving away.
SaveBusiness sb = new SaveBusiness();
sb.getBusinessEntity().add(myBusEntity);
sb.setAuthInfo(myPubAuthToken.getAuthInfo());
BusinessDetail bd = publish.saveBusiness(sb);
String myBusKey = bd.getBusinessEntity().get(0).getBusinessKey();
System.out.println("myBusiness key: " + myBusKey);
// Creating a service to save. Only adding the minimum data: the parent business key retrieved from saving the business
// above and a single name.
BusinessService myService = new BusinessService();
myService.setBusinessKey(myBusKey);
Name myServName = new Name();
myServName.setValue("My Service");
myService.getName().add(myServName);
// Add binding templates, etc...
// Adding the service to the "save" structure, using our publisher's authentication info and saving away.
SaveService ss = new SaveService();
ss.getBusinessService().add(myService);
ss.setAuthInfo(myPubAuthToken.getAuthInfo());
ServiceDetail sd = publish.saveService(ss);
String myServKey = sd.getBusinessService().get(0).getServiceKey();
System.out.println("myService key: " + myServKey);
// Now you have a publisher saved who in turn published a business and service via the jUDDI API!
}
catch (Exception e) {
e.printStackTrace();
}
}
public static void main (String args[]) {
SimplePublish sp = new SimplePublish();
sp.publish();
}
}
에 다음 코드를 시도하고
받는다는
<dependency>
<groupId>org.apache.juddi</groupId>
<artifactId>juddi-client</artifactId>
<version>3.0.2</version>
</dependency>
depandency 다음과 같은 라이브러리를 사용하고이 jar 파일
축 2-adb-1.5.4.jar
그게 전부 내 코드가 작동하고 잘
관련 문제
- 1. 인사 카드를 온라인으로 판매하기 위해 사용할 수있는 API는 무엇입니까?
- 2. 자바에서 드로잉 애니메이션이나 정적 디그램을 사용할 수있는 API는 무엇입니까?
- 3. PC와 연결하기 위해 소켓을 사용할 때 문제가 발생했습니다.
- 4. 최고의 Java REST API는 무엇입니까?
- 5. 내가 사용할 수있는 최고의 .NET 이미지 캡처 API는 무엇입니까?
- 6. 프로그래밍 방식으로 메시지를 게시하는 데 사용할 수있는 Facebook API는 무엇입니까?
- 7. HTML 코드와 해당 태그를 조작하고 수정할 수있는 Java API는 무엇입니까?
- 8. Rails에 사용할 CouchDB API는 무엇입니까?
- 9. 프록시를 통해 연결하기 위해 freebase java 클라이언트를 구성하는 방법은 무엇입니까?
- 10. 이 루비 문자열을 인용 할 때 사용할 수있는 문자는 무엇입니까?
- 11. 인터넷 기반 중매 게임에 사용할 수있는 iPhone API는 무엇입니까?
- 12. MacOSX에서 charset 변환을 수행하는 데 사용할 수있는 API는 무엇입니까? (iconv 나를 위해 작동하지 않습니다)
- 13. 동적 필드가있는 문서를 가져 오기 위해 사용할 수있는 PDF API는 무엇입니까?
- 14. Honeycomb에서 하드웨어 가속을 사용할 때 지원되는 API는 무엇입니까?
- 15. 스칼라 - 2.7.7에서 2.8.1로 업그레이드 할 때 MapWrapper를 사용할 때의 문제
- 16. MySQL에서 데이터베이스에 연결하기 위해 Java를 사용하는 가장 좋은 구현은 무엇입니까?
- 17. C#에서 3D 개체를 그릴 때 사용할 API는 무엇입니까?
- 18. 업그레이드 할 때 Xcode를 제거해야합니까?
- 19. Juddi 게시 및 서비스 찾기
- 20. 정규식을 디버깅/스테핑 할 때 사용할 수있는 도구는 무엇입니까?
- 21. 오늘 펌웨어를 테스트 할 때 사용할 수있는 소프트웨어 도구는 무엇입니까?
- 22. field_create_field를 호출 할 때 사용할 수있는 기본 필드 유형은 무엇입니까?
- 23. LaTeX에서 SQL을 조판 할 때 사용할 수있는 패키지는 무엇입니까?
- 24. MP3/FLAC을 편집 할 때 사용할 수있는 무료 라이브러리는 무엇입니까?
- 25. FROM을 지정할 수있는 SMS API는 무엇입니까?
- 26. Kohana3에서 업그레이드 할 때 문제가 있습니까?
- 27. 내가 볼 수있는 프록시에 연결하기 위해 노력하고있어 소켓
- 28. Apache jUDDI : 템플릿 찾기
- 29. .net 및 java의 jUddi v3 사용
- 30. 연결된 카메라의 비디오를 녹화 할 때 사용할 Java 라이브러리는 무엇입니까?
실제로 바로 그 페이지를 통해 찾아 봤는데,하지만 난 내 인생에 대한 프로그래밍 방식으로 얻을 장소 서비스하기 위해 UDDI 데이터베이스에 액세스하는 방법을 알아낼 수 없습니다 . – Adam
섹션 5.7에는 uddi v3 서버에 인증하는 방법에 대한 샘플 코드가 있습니다. 이 샘플을 사용하여 전송 개체를 사용하여 Inquery 및 PublishService로 가져올 수 있습니다. 다음과 같이 입력해야합니다. UDDIInquiryPortType query = transport.getInquiryService(); UDDIPublicationPortType publish = transport.getPublishService(); 지금 당장은 작동중인 서버가 없어 전체 코드 샘플을 제공 할 수 없습니다. 지금 당장 당신에게 줄 수있는 것은 Javadoc에 대한 링크 일 것입니다 : http://ws.apache.org/juddi/apidocs3/index.html –
감사합니다. – Adam