Example #1
0
  private void changeBinding() {
    UDDINaming uddiNaming = null;
    String endpointAddress;
    _upaBroker = null;
    try {
      uddiNaming = new UDDINaming(BrokerClientApplication._uddiURL);
      endpointAddress = uddiNaming.lookup(BrokerClientApplication._serviceName);

      BrokerService service = new BrokerService();
      _upaBroker = service.getBrokerPort();

      BindingProvider bindingProvider = (BindingProvider) _upaBroker;
      Map<String, Object> requestContext = bindingProvider.getRequestContext();
      requestContext.put(ENDPOINT_ADDRESS_PROPERTY, endpointAddress);

    } catch (Exception e) {
      System.out.printf("Caught exception: %s%n", e);
      e.printStackTrace();
    }
  }
Example #2
0
  public CaClient() {
    UDDINaming uddiNaming = null;
    String endpointAddress;

    try {
      uddiNaming = new UDDINaming(uddiURL);
      endpointAddress = uddiNaming.lookup(wsName);

      CaImplService service = new CaImplService();
      CaService port = service.getCaImplPort();

      BindingProvider bindingProvider = (BindingProvider) port;
      Map<String, Object> requestContext = bindingProvider.getRequestContext();
      requestContext.put(ENDPOINT_ADDRESS_PROPERTY, endpointAddress);

      _ca = port;

    } catch (JAXRException e) {
      System.out.println(e.getMessage());
    }
  }