Package org.openquark.cal.internal.runtime.lecc

Examples of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_11$_4


        }
        try {
            initLocator();
            locatorClient.unregister(serviceName, endpointURL);
        } catch (ServiceLocatorException e) {
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail(serviceName.toString()
                    + "throws ServiceLocatorFault");
            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
View Full Code Here


        }
        try {
            initLocator();
            locatorClient.updateTimetolive(serviceName, endpointURL, timetolive);
        } catch (ServiceLocatorException e) {
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail(serviceName.toString() + "throws ServiceLocatorFault");
            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail
                    .setInterruptionDetail(serviceName.toString() + "throws InterruptionFault");
View Full Code Here

                names = locatorClient.lookup(serviceName);
            } else {
                names = locatorClient.lookup(serviceName, matcher);
            }
        } catch (ServiceLocatorException e) {
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail(serviceName.toString()
                    + "throws ServiceLocatorFault");
            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
        if (names != null && !names.isEmpty()) {
            names = getRotatedList(names);
            adress = names.get(0);
        } else {
            if (LOG.isLoggable(Level.WARNING)) {
                LOG.log(Level.WARNING, "lookup Endpoint for " + serviceName
                        + " failed, service is not known.");
            }
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail("lookup Endpoint for "
                    + serviceName + " failed, service is not known.");
            throw new ServiceLocatorFault("Can not find Endpoint",
                    serviceFaultDetail);
        }
        return buildEndpoint(serviceName, adress);
View Full Code Here

                names = locatorClient.lookup(serviceName);
            } else {
                names = locatorClient.lookup(serviceName, matcher);
            }
        } catch (ServiceLocatorException e) {
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail(serviceName.toString()
                    + "throws ServiceLocatorFault");
            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
                    .toString() + "throws InterruptionFault");
            throw new InterruptedExceptionFault(e.getMessage(),
                    interruptionFaultDetail);
        }
        if (names != null && !names.isEmpty()) {
            for (int i = 0; i < names.size(); i++) {
                adress = names.get(i);
                result.add(buildEndpoint(serviceName, adress));
            }
        } else {
            if (LOG.isLoggable(Level.WARNING)) {
                LOG.log(Level.WARNING, "lookup Endpoints for " + serviceName
                        + " failed, service is not known.");
            }
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail("lookup Endpoint for "
                    + serviceName + " failed, service is not known.");
            throw new ServiceLocatorFault("Can not find Endpoint",
                    serviceFaultDetail);
        }
        return result;
View Full Code Here

        builder.address(adress);
        SLEndpoint endpoint = null;
        try {
            endpoint = locatorClient.getEndpoint(serviceName, adress);
        } catch (ServiceLocatorException e) {
            ServiceLocatorFaultDetail serviceFaultDetail = new ServiceLocatorFaultDetail();
            serviceFaultDetail.setLocatorFaultDetail(serviceName.toString()
                    + "throws ServiceLocatorFault");
            throw new ServiceLocatorFault(e.getMessage(), serviceFaultDetail);
        } catch (InterruptedException e) {
            InterruptionFaultDetail interruptionFaultDetail = new InterruptionFaultDetail();
            interruptionFaultDetail.setInterruptionDetail(serviceName
View Full Code Here

 
  private void lookupEndpointsExample(LocatorService client, String service) throws IOException {
    System.out.println("------------------------------");
    System.out.println("LookupEndpoints");
    try {
      EndpointReferenceList endpointReferenceList = client.lookupEndpoints(URLEncoder.encode(service, "UTF-8"), null);
      if(endpointReferenceList.getEndpointReference().size() > 0)
      {
        for (W3CEndpointReference w3cEndpointReference : endpointReferenceList.getEndpointReference()) {
          System.out.println(w3cEndpointReference.toString());
       
      }
    } catch(WebApplicationException ex) {
      System.out.println(ex.getMessage());
View Full Code Here

        } catch (UnsupportedEncodingException e1) {
            throw new WebApplicationException(Response
                    .status(Status.INTERNAL_SERVER_ERROR)
                    .entity(e1.getMessage()).build());
        }
        EndpointReferenceList refs = new EndpointReferenceList();
        try {
            initLocator();
            if (matcher == null) {
                names = locatorClient.lookup(serviceName);
            } else {
                names = locatorClient.lookup(serviceName, matcher);
            }
        } catch (ServiceLocatorException e) {
            throw new WebApplicationException(Response
                    .status(Status.INTERNAL_SERVER_ERROR)
                    .entity(e.getMessage()).build());
        } catch (InterruptedException e) {
            throw new WebApplicationException(Response
                    .status(Status.INTERNAL_SERVER_ERROR)
                    .entity(e.getMessage()).build());
        }
        if (names != null && !names.isEmpty()) {
            for (int i = 0; i < names.size(); i++) {
                adress = names.get(i);
                refs.getEndpointReference().add(buildEndpoint(serviceName, adress));
            }
        } else {
            if (LOG.isLoggable(Level.WARNING)) {
                LOG.log(Level.WARNING, "lookup Endpoints for " + serviceName
                        + " failed, service is not known.");
View Full Code Here

    System.out.println("LookupEndpoints for service ".concat(service));
    WebClient wc = WebClient.create(LOOKUP_ADDRESS.concat("/").concat(
        URLEncoder.encode(service, "UTF-8")));
    wc.accept(MediaType.APPLICATION_XML);
    try {
      EndpointReferenceList erlt = wc
          .get(EndpointReferenceList.class);
      System.out.println("Found ".concat(
          String.valueOf(erlt.getEndpointReference().size())).concat(
          " endpoints"));
      if (erlt.getEndpointReference().size() > 0) {
        for (W3CEndpointReference w3cEndpointReference : erlt
            .getEndpointReference()) {
          System.out.println(w3cEndpointReference.toString());
        }
      }
    } catch (WebApplicationException ex) {
View Full Code Here

        W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
        //builder.serviceName(SERVICE_NAME);
        builder.address(ENDPOINTURL);
        expectedRef = builder.build();

        EndpointReferenceList erlt = lps.lookupEndpoints(
                SERVICE_NAME.toString(), new ArrayList<String>());
        if (erlt.getEndpointReference().get(0).equals(expectedRef))
            fail();

    }
View Full Code Here

        sl.register(endpoint(), EasyMock.eq(true));
        EasyMock.expectLastCall().andStubThrow(new ServiceLocatorException("test"));

        replayAll();
        RegisterEndpointRequest req = new RegisterEndpointRequest();
        EntryType entryType = new EntryType();
        entryType.setKey("test");
        entryType.getValue().add("test");
        req.getEntryType().add(entryType);
        req.setEndpointURL(ENDPOINTURL);
        req.setServiceName(SERVICE_NAME.toString());
        lps.registerEndpoint(req);
    }
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_11$_4

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.