일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Spring
- Programing
- Programming
- Swing
- PSP
- Vista
- Mac
- 부동산
- 독서
- 판매
- ThinkFree
- 요리
- Eclipse
- Java
- db
- OS
- 미국드라마
- 중고
- Ant
- spring3.0
- 이승철
- 효민이
- 책
- Linux
- WebLogic
- Java5
- 육아
- 행복이
- WebService
- php
- 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");
.
.
.