Examples of AddNumbersService


Examples of org.apache.axis2.jaxws.sample.addnumbers.AddNumbersService

         
    public void testAddNumbers() throws Exception {
        TestLogger.logger.debug("----------------------------------");
        TestLogger.logger.debug("test: " + getName());

        AddNumbersService service = new AddNumbersService();
        AddNumbersPortType proxy = service.getAddNumbersPort();

        BindingProvider p = (BindingProvider) proxy;
        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
        int total = proxy.addNumbers(10, 10);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbers.AddNumbersService

    public void testOneWay() {
        try {
            TestLogger.logger.debug("----------------------------------");
            TestLogger.logger.debug("test: " + getName());
           
            AddNumbersService service = new AddNumbersService();
            AddNumbersPortType proxy = service.getAddNumbersPort();
           
            BindingProvider bp = (BindingProvider) proxy;
            bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                    axisEndpoint);
            proxy.oneWayInt(11);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbers.AddNumbersService

 
    public void testAddNumbers() throws Exception {
        TestLogger.logger.debug("----------------------------------");
        TestLogger.logger.debug("test: " + getName());

        AddNumbersService service = new AddNumbersService();
        AddNumbersPortType proxy = service.getAddNumbersPort();

        BindingProvider p = (BindingProvider) proxy;
        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
        int total = proxy.addNumbers(10, 10);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbers.AddNumbersService

    public void testOneWay() {
        try {
            TestLogger.logger.debug("----------------------------------");
            TestLogger.logger.debug("test: " + getName());
           
            AddNumbersService service = new AddNumbersService();
            AddNumbersPortType proxy = service.getAddNumbersPort();
           
            BindingProvider bp = (BindingProvider) proxy;
            bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                    axisEndpoint);
            proxy.oneWayInt(11);
View Full Code Here

Examples of org.apache.cxf.systest.ws.addr_feature.AddNumbersService

    private AddNumbersService getService() {
        URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl");
        assertNotNull("WSDL is null", wsdl);

        AddNumbersService service = new AddNumbersService(wsdl, serviceName);
        assertNotNull("Service is null ", service);
        return service;
    }
View Full Code Here

Examples of org.apache.cxf.systest.ws.addr_feature.AddNumbersService

        ByteArrayOutputStream input = setupInLogging();
        ByteArrayOutputStream output = setupOutLogging();
       
        URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl");
        assertNotNull("WSDL is null", wsdl);
        AddNumbersService service = new AddNumbersService(wsdl, serviceName);


        Dispatch<Source> disp = service.createDispatch(AddNumbersService.AddNumbersPort,
                                                       Source.class, Mode.PAYLOAD);

        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:" + PORT + "/jaxws/add");

        disp.invoke(new StreamSource(new StringReader(req)));
       
       
        assertLogContains(output.toString(), "//wsa:Action", base + "addNumbersRequest");
        assertLogContains(input.toString(), "//wsa:Action", base + "addNumbersResponse");
       

        output.reset();
        input.reset();
       
        disp = service.createDispatch(AddNumbersService.AddNumbersPort,
                                      Source.class, Mode.PAYLOAD);

        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:" + PORT + "/jaxws/add");
       
View Full Code Here

Examples of org.apache.cxf.systest.ws.addr_feature.AddNumbersService

        //String base = "http://apache.org/cxf/systest/ws/addr_feature/AddNumbersPortType/";
        String expectedOut = "http://bad.action";
       
        URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl");
        assertNotNull("WSDL is null", wsdl);
        AddNumbersService service = new AddNumbersService(wsdl, serviceName);


        Dispatch<Source> disp = service.createDispatch(AddNumbersService.AddNumbersPort,
                                                       Source.class, Mode.MESSAGE);

        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:" + PORT + "/jaxws/add");
View Full Code Here

Examples of org.apache.cxf.systest.ws.addr_feature.AddNumbersService

    private AddNumbersPortType getPort() {
        URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl");
        assertNotNull("WSDL is null", wsdl);

        AddNumbersService service = new AddNumbersService(wsdl, serviceName);
        assertNotNull("Service is null ", service);
        return service.getAddNumbersPort();
    }
View Full Code Here

Examples of org.apache.cxf.systest.ws.addr_feature.AddNumbersService

        ByteArrayOutputStream input = setupInLogging();
        ByteArrayOutputStream output = setupOutLogging();
       
        URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl");
        assertNotNull("WSDL is null", wsdl);
        AddNumbersService service = new AddNumbersService(wsdl, serviceName);


        Dispatch<Source> disp = service.createDispatch(AddNumbersService.AddNumbersPort,
                                                       Source.class, Mode.PAYLOAD);

        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:9094/jaxws/add");

        //manually set the action
        disp.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY,
                                     expectedOut);
        disp.invoke(new StreamSource(new StringReader(req)));
       
        assertTrue(output.toString().indexOf(expectedOut) != -1);
        assertTrue(input.toString().indexOf(expectedIn) != -1);
       

        output.reset();
        input.reset();
       
        disp = service.createDispatch(AddNumbersService.AddNumbersPort,
                                      Source.class, Mode.PAYLOAD);

        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:9094/jaxws/add");
       
View Full Code Here

Examples of org.apache.cxf.systest.ws.addr_feature.AddNumbersService

    private AddNumbersPortType getPort() {
        URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl");
        assertNotNull("WSDL is null", wsdl);

        AddNumbersService service = new AddNumbersService(wsdl, serviceName);
        assertNotNull("Service is null ", service);
        return service.getAddNumbersPort();
    }
View Full Code Here
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.