일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- 행복이
- spring3.0
- OS
- Java
- Ant
- 판매
- Java5
- 미국드라마
- Spring
- WebLogic
- 요리
- 중고
- 육아
- Programming
- Vista
- php
- Swing
- PSP
- 이승철
- 효민이
- ThinkFree
- Linux
- 책
- WebService
- Mac
- 독서
- db
- Programing
- Eclipse
- 부동산
- Today
- Total
Bitaholic
WS-Security 인증이 된 Weblogic Webservice client 작성 본문
간단한 Username/Password WS-security로 Weblogic Server에 설정된 WebService호출하기.
import weblogic.xml.crypto.wss.provider.CredentialProvider;
import weblogic.xml.crypto.wss.WSSSecurityContext;
import weblogic.wsee.security.bst.ClientUNTCredentialProvider;
.
.
.
String username="weblogic";
String password="weblogic";
List CredProviders = new ArrayList();
//Sample Webservice Client 스텁 생성
SecureHelloWorldService service = new SecureHelloWorldService_Impl("wsdl_address");
SecureHelloWorldPortType port = service.getSecureHelloWorldServicePort();
//Username, password Provider 생성
CredentialProvider cp = new ClientUNTCredentialProvider(username.getByte(), password.getByte());
credProviders.add(cp);
Stub stub = (Stub)port;
stub._setProperty(WSSecurityContext.CREDENTIAL_CREDENTIAL_PROVIDER_LIST, credProviders);
String response = port.sayHello("world");
.
.
.