When you integrate a web application with PingFederate, use the SSO Directory Service to generate a connection or adapter list. The code needed to create any of the lists is similar.

The following Java code example retrieves an IdP list from the web service. The program calls the getIDPList method in the SSO Directory Service to retrieve an IdP list and print it to the console. This example uses the Apache Axis library and includes optional code for authentication to the PingFederate server (see Configuring service authentication). We recommend the use of HTTPS when including credentials.

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import java.net.URL;
import javax.xml.namespace.QName;
import com.pingidentity.ws.SSOEntity;
public class SSODirectoryClientSample
   public static void main(String[] args) throws Exception 
    Service service = new Service();
    Call call = (Call) service.createCall();
    URL serviceUrl = new URL(
    QName qn = new QName("urn:BeanService", "SSOEntity");
    call.registerTypeMapping(SSOEntity.class, qn,
      new org.apache.axis.encoding.ser.BeanSerializerFactory(
          SSOEntity.class, qn),
       new org.apache.axis.encoding.ser.BeanDeserializerFactory(
           SSOEntity.class, qn));        
    call.setTargetEndpointAddress( serviceUrl );
    call.setOperationName( new QName(
    Object result = call.invoke( new Object[] {} );
    if (result instanceof SSOEntity[])
       SSOEntity[] idpArray = (SSOEntity[])result;
       for (SSOEntity idp : idpArray)
        System.out.println(idp.getEntityId() + " " +
       System.out.println("Received problem response from
          server: " + result);