API crashed my app

Hi,

I ran the folowing codes to retrieve the list of published and list of subscribed documents at a particular gateway.


BrokerTerritoryGatewayInfo btgi =
aBrokerAdminClient.getLocalTerritoryGateway();

for (int i=0; i< btgi.length; i++) {
String rtn = btgi[i].remote_territory_name;
BrokerCompleteTerritoryGateway bctg =
BrokerCompleteTerritoryGateway.retrieve(aBrokerAdminClient, rtn);


}

The application terminated when it ran retrieve(). No exceptions thrown. The application just terminates.

Can anyone help.

Kenny