http://host:port/opensso/identityservices?WSDL Step 2: Generate Proxy classes from WSDL using Eclipse
Step 3: Access OpenSSO Identity Services
//Create Operation
IdentityServicesImplProxy identityServicesImplProxy = new IdentityServicesImplProxy();
identityServicesImplProxy.setEndpoint("http://host:port/opensso/identityservices/IdentityServices");
IdentityDetails identityDetails = new IdentityDetails();
String username = "sunmoon3112";
String emailaddr = "sunmoon3112@mycorp.com";
String pwd = "Start@12";
//set admin token
Token result = identityServicesImplProxy.authenticate("amadmin", "P@ssw0rd", "realm=/");
String admintoken = result.getId();
Token admin = new Token();
admin.setId(admintoken);
Attribute attrs[] = {pwdattr1,emailattr2};
identityDetails.setName(username);//create user id
identityDetails.setAttributes(attrs);//set attrs for identity
identityServicesImplProxy.create(identityDetails, admin);
Step 4: Similarly try accessing all other identity services via generated Proxy

No comments:
Post a Comment