Informatica ActiveVOS
- Informatica ActiveVOS 9.2.6
- All Products
import com.activevos.api.identityservice.AeIdentityService; import com.activevos.api.identityservice.IdentitySearchPortType; import com.activevos.api.identityservice.SearchFault; import com.activevos.api.identityservice.wsdl.EmptyElement; import com.activevos.api.identityservice.wsdl.TRoleList; import java.net.MalformedURLException; import java.net.URL; import java.util.List; import javax.xml.namespace.QName; /** Identity Service endpoint WSDL */ String ID_SERVICE_WSDL = "http://localhost:8080/active-bpel/services/AeIdentityService?wsdl"; /** Identity Service endpoint QName */ QName ID_SERVICE_QNAME = new QName("http://docs.active-endpoints/wsdl/identity/2007/03/identity.wsdl", "AeIdentityService"); try { // Create service using WSDL location and service qname. AeIdentityService idService = new AeIdentityService( new URL(ID_SERVICE_WSDL), ID_SERVICE_QNAME); // Get service port to invoke operations. IdentitySearchPortType idServicePort = idService.getAeIdentityServicePort(); // Invoke findRoles() operation. TRoleList roleList = idServicePort.findRoles(new EmptyElement() ); List roleNames = roleList.getRole(); System.out.println("Found role count: " + roleNames.size()); for (String roleName : roleNames) { System.out.println("Role name: " + roleName); } } catch(MalformedURLException mue) { // Invalid service url format mue.printStackTrace(); } catch(SearchFault searchFault) { // identity service related fault. System.out.println("Fault Message: " + searchFault.getMessage()); if (searchFault.getFaultInfo() != null) { // Fault details. System.out.println("FaultInfo Code: " + searchFault.getFaultInfo().getCode()); System.out.println("FaultInfo Message: " + searchFault.getFaultInfo().getMessage()); } searchFault.printStackTrace(); } catch(Exception e) { e.printStackTrace(); }