super();
}
public NotifyResponse getSubscriptionNotifications(String authToken)
{
NotifyResponse response = new NotifyResponse();
try {
URL url = new URL(getThreadLocalRequest().getScheme(),
getThreadLocalRequest().getRemoteHost(),
getThreadLocalRequest().getLocalPort(),
"/juddiv3/notify/");
URLConnection con = url.openConnection();
con.setDoOutput(true);
con.setDoInput(true);
InputStream is = con.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuffer sb = new StringBuffer();
while (br.ready()) {
sb.append(br.readLine());
}
response.setSubscriptionNotifications(sb.toString());
response.setSuccess(true);
} catch (Exception e) {
logger.error("Could not obtain token. " + e.getMessage(), e);
response.setSuccess(false);
response.setMessage(e.getMessage());
response.setErrorCode("102");
} catch (Throwable t) {
logger.error("Could not obtain token. " + t.getMessage(), t);
response.setSuccess(false);
response.setMessage(t.getMessage());
response.setErrorCode("102");
}
return response;
}