{
String serviceID = urn.split(ParameterNamesIms.SERVICE_ID_LABEL+".")[1];
if(serviceID.trim().equals(""))
try {
throw new InvalidArgumentException("URN should atleast have one sub-service");
} catch (InvalidArgumentException e) {
e.printStackTrace();
}
else
pps.setSubserviceIdentifiers(urn.split(ParameterNamesIms.SERVICE_ID_LABEL)[1]);
}
else if(urn.contains(ParameterNamesIms.APPLICATION_ID_LABEL))
{
String appID = urn.split(ParameterNamesIms.APPLICATION_ID_LABEL+".")[1];
if(appID.trim().equals(""))
try {
throw new InvalidArgumentException("URN should atleast have one sub-application");
} catch (InvalidArgumentException e) {
e.printStackTrace();
}
else
pps.setApplicationIdentifiers(urn.split(ParameterNamesIms.APPLICATION_ID_LABEL)[1]);
}
else
{
try {
throw new InvalidArgumentException("URN is not well formed");
} catch (InvalidArgumentException e) {
e.printStackTrace();
}
}