Package org.apache.juddi.portlets.client.service

Examples of org.apache.juddi.portlets.client.service.NotifyResponse


    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;
 
View Full Code Here

TOP

Related Classes of org.apache.juddi.portlets.client.service.NotifyResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.