The web service exposes the following method for connection deletion:

public void deleteConnection( String entityId, String role) throws IOException

The entityId parameter is the connection ID, which identifies the connection to be deleted. The role parameter is the connection role, IDP or SP.

Code sample

The following example uses the Apache AXIS libraries to invoke this web service to delete a connection:

Service service = new Service();
Call call = (Call) service.createCall();
call.setUsername("username");
call.setPassword("password");
call.setTargetEndpointAddress(
	"https://localhost:9999/pf-mgmt-ws/ws/ConnectionMigrationMgr"
	);
call.setOperationName("deleteConnection");
call.invoke(new Object[]{"entityid", "SP"});