Examples of sendSync()


Examples of org.apache.servicemix.client.ServiceMixClient.sendSync()

                             "             version=\"1.0\">"
                             "  <jbi:part>"
                             "    <msg:GetPerson><msg:personId>id</msg:personId></msg:GetPerson>"
                             "  </jbi:part>"
                             "</jbi:message>"));
        client.sendSync(me);

        System.err.println(new SourceTransformer().contentToString(me.getOutMessage()));
    }

    public void testSoap() throws Exception {

Examples of org.apache.servicemix.client.ServiceMixClient.sendSync()

                             "             version=\"1.0\">"
                             "  <jbi:part>"
                             "    <msg:GetPerson><msg:personId>id</msg:personId></msg:GetPerson>"
                             "  </jbi:part>"
                             "</jbi:message>"));
        client.sendSync(me);
    }
}

Examples of org.apache.servicemix.client.ServiceMixClient.sendSync()

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.getInMessage().setProperty(DefaultFileMarshaler.FILE_NAME_PROPERTY, "test.xml");
        exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(exchange);

        assertExchangeWorked(exchange);
    }

    protected void assertExchangeWorked(MessageExchange me) throws Exception {

Examples of org.apache.servicemix.client.ServiceMixClientFacade.sendSync()

                    + "</message>"));
     
            exchange.setService(new QName("http://apache.org/cxf/calculator", "CalculatorService"));
            exchange.setInterfaceName(new QName("http://apache.org/cxf/calculator", "CalculatorPortType"));
            exchange.setOperation(new QName("http://apache.org/cxf/calculator", "add"));
            client.sendSync(exchange);
           
        } catch (JBIException e) {
            //
        }
        return "Hello " + me  + " " + context.getComponentName();

Examples of org.apache.servicemix.jbi.api.ServiceMixClient.sendSync()

        ServiceMixClient c = container.getClientFactory().createClient();
        InOut me = c.createInOutExchange();
        me.getInMessage().setContent(new StringSource("<hello/>"));
        me.setService(new QName("echo"));
        c.sendSync(me);
        c.done(me);

        assertEquals(6, listener.events.size());
    }

Examples of org.apache.servicemix.nmr.api.Channel.sendSync()

        Channel client = nmr.createChannel();
        Exchange e = client.createExchange(Pattern.InOut);
        for (Endpoint ep : nmr.getEndpointRegistry().getServices()) {
          e.setTarget(nmr.getEndpointRegistry().lookup(nmr.getEndpointRegistry().getProperties(ep)));
          e.getIn().setBody(new StringSource("<?xml version=\"1.0\" encoding=\"UTF-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\"><arg0>Bonjour</arg0></ns2:sayHi></soap:Body></soap:Envelope>"));
          boolean res = client.sendSync(e);
          assertTrue(res);
        }
   
    }

Examples of org.locationtech.udig.project.IProject.sendSync()

      List<IGeoResource> resources = new ArrayList<IGeoResource>();
      createResources(resources, monitor);
      IProject activeProject = ApplicationGIS.getActiveProject();

      CreateMapCommand command = new CreateMapCommand("NewMap",resources , activeProject);
      activeProject.sendSync(command);
      Map createdMap = (Map) command.getCreatedMap();
      viewer.setMap(createdMap);
      viewer.init(this);

     

Examples of org.locationtech.udig.project.internal.Project.sendSync()

    Project project = ProjectPlugin.getPlugin().getProjectRegistry()
      .getDefaultProject();
   
    CreateMapCommand cmCommand
      = new CreateMapCommand("MyMap", (List<IGeoResource>) service.resources(null), project); //$NON-NLS-1$
    project.sendSync(cmCommand);
   
    Map map = (Map) cmCommand.getCreatedMap();
    assertNotNull(map);
    assertEquals(map.getProject(),project);
    assertEquals(map.getName(), "MyMap"); //$NON-NLS-1$

Examples of org.openengsb.core.api.remote.OutgoingPort.sendSync()

    @Override
    public MethodResult sendMethodCallWithResult(String portId, String destination, MethodCall call) {
        OutgoingPort port = getPort(portId);
        MethodCallMessage request = new MethodCallMessage(call, true);
        request.setDestination(destination);
        MethodResultMessage requestResult = port.sendSync(request);
        return requestResult.getResult();
    }

    private OutgoingPort getPort(String portId) throws OsgiServiceNotAvailableException {
        return utilsService.getServiceWithId(OutgoingPort.class, portId);

Examples of org.servicemix.client.ServiceMixClient.sendSync()

        InOut exchange=client.createInOutExchange();
        exchange.setService(new QName("http://www.habuma.com/foo","pingService"));
        NormalizedMessage in=exchange.getInMessage();
        in.setContent(new StringSource("<ping>Pinging you</ping>"));
        System.out.println("SENDING; exchange.status="+exchange.getStatus());
        client.sendSync(exchange);
        assertNotNull(exchange.getOutMessage());
        System.out.println("GOT RESPONSE; exchange.out="+new SourceTransformer().toString(exchange.getOutMessage().getContent()));
        client.done(exchange);
    }
}
TOP
Copyright © 2018 www.massapi.com. 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.