Package org.apache.axis2.jaxws.sample.addnumbers

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


        try {
            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);

            TestLogger.logger.debug("Total =" + total);
            TestLogger.logger.debug("----------------------------------");
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here


        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);
            TestLogger.logger.debug("----------------------------------");
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }      
View Full Code Here

        URL wsdlURL = DescriptionTestUtils2.getWSDLURL("WSDLMultiTests.wsdl");

        QName serviceQN = new QName(VALID_SERVICE_NAMESPACE, VALID_SERVICE_LOCALPART_3);
        Service service = Service.create(wsdlURL, serviceQN);
        assertNotNull(service);
        AddNumbersPortType selectPort = service.getPort(AddNumbersPortType.class);
        BindingProvider bindingProvider = (BindingProvider)Proxy.getInvocationHandler(selectPort);
        EndpointDescription endpointDesc = bindingProvider.getEndpointDescription();
        QName selectedPortQName = endpointDesc.getPortQName();
        assertNotNull(selectedPortQName);
        // We expect the first port in the WSDL which uses the PortType for the SEI AddNumbersPortType to be selected
View Full Code Here

        ServiceDescription service1Desc = service1Delegate.getServiceDescription();
        assertNotNull(service1Desc);
        List<QName> service1PortsList = service1Desc.getPorts();
        assertNotNull(service1PortsList);
        assertEquals(3, service1PortsList.size());
        AddNumbersPortType addNumbersPortS1P1 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S1P1), AddNumbersPortType.class);
        service1PortsList = service1Desc.getPorts();
        assertEquals(3, service1PortsList.size());
        AddNumbersPortType addNumbersPortS1P3 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S1P3), AddNumbersPortType.class);
        assertEquals(3, service1PortsList.size());
        service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P1"), null, null);
        service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P2"), null, null);
        service1PortsList = service1Desc.getPorts();
        assertEquals(5, service1PortsList.size());
        Iterator<QName> service1PortIterator = service1.getPorts();
        assertQNameIteratorSameAsList(service1PortIterator, service1PortsList);
       
        QName service2QN = new QName(VALID_SERVICE_NAMESPACE, VALID_SERVICE_LOCALPART_2);
        Service service2 = Service.create(wsdlURL, service2QN);
        assertNotNull(service2);
        ServiceDelegate service2Delegate = DescriptionTestUtils2.getServiceDelegate(service2);
        assertNotNull (service2Delegate);
        ServiceDescription service2Desc = service2Delegate.getServiceDescription();
        assertNotNull(service2Desc);
        List<QName> service2PortsList = service2Desc.getPorts();
        assertNotNull(service2PortsList);
        assertEquals(4, service2PortsList.size());
        AddNumbersPortType addNumbersPortS2P1 = service2.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S2P1), AddNumbersPortType.class);
        service2PortsList = service2Desc.getPorts();
        assertEquals(4, service2PortsList.size());
        AddNumbersPortType addNumbersPortS2P3 = service2.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S2P3), AddNumbersPortType.class);
        assertEquals(4, service2PortsList.size());
        AddNumbersPortType addNumbersPortS2P4 = service2.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S2P4), AddNumbersPortType.class);
        assertEquals(4, service2PortsList.size());
        service2.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS2P1"), null, null);
        service2.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS2P2"), null, null);
        service2PortsList = service2Desc.getPorts();
        assertEquals(6, service2PortsList.size());
View Full Code Here

        assertNotNull(service1Desc);
        List<QName> service1PortsList = service1Desc.getPorts();
        assertNotNull(service1PortsList);
        assertTrue(service1PortsList.isEmpty());
        assertEquals(0, service1PortsList.size());
        AddNumbersPortType addNumbersPortS1P1 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, "dynamicPortS1P1"), AddNumbersPortType.class);
        service1PortsList = service1Desc.getPorts();
        assertEquals(1, service1PortsList.size());
        AddNumbersPortType addNumbersPortS1P3 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, "dynamicPortS1P2"), AddNumbersPortType.class);
        service1PortsList = service1Desc.getPorts();
        assertEquals(2, service1PortsList.size());
        service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P1"), null, null);
        service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P2"), null, null);
        service1PortsList = service1Desc.getPorts();
View Full Code Here

        // Create Dispatch should work on a WSDL declared port prior to a getPort
        // and again after the call to getPort
        QName validPortQName = new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S1P1);
        Dispatch<String> dispatch = service1.createDispatch(validPortQName, String.class, null);
        assertNotNull(dispatch);
        AddNumbersPortType addNumbersPortS1P1 = service1.getPort(validPortQName, AddNumbersPortType.class);
        assertNotNull(addNumbersPortS1P1);
       
        // Create Dispatch should NOT work on a dynamic port that has not been added yet
        // but should work after it has been added
        QName addedPort = new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P1");
View Full Code Here

            // Expected path
        }
        catch (Exception ex) {
            fail("Unexpected exception thrown " + ex.toString());
        }
        AddNumbersPortType addNumbersPortS1P1 = service1.getPort(validPortQName, AddNumbersPortType.class);
        Dispatch<String> dispatch = service1.createDispatch(validPortQName, String.class, null);
        assertNotNull(dispatch);

        // Create Dispatch should NOT work on a dynamic port that has not been added yet
        // but should work after it has been added
View Full Code Here

            String charSetEncoding = BuilderUtil.getCharSetEncoding(contentTypeStr);
            msgContext.setProperty(
                    Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    if (HTTPTransportUtils.isRESTRequest(contentTypeStr)) {
                        RESTUtil.processPOSTRequest(msgContext, is, os,
                                request.getRequestLine().getUri(), contentType, builder, isRestDispatching);
                    } else {
View Full Code Here

            String contentTypeStr = contentType != null ?
                    contentType.getValue() : inferContentType();

            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);

                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    RESTUtil.processGetAndDeleteRequest(
                            msgContext, os, request.getRequestLine().getUri(),
                            request.getFirstHeader(HTTP.CONTENT_TYPE), builder,
                            method, isRestDispatching);
                }
View Full Code Here

        params = getListenerParameters();


        param = transportIn.getParameter(NhttpConstants.ENDPOINTS_CONFIGURATION);
        if (param != null && param.getValue() != null) {
            endpoints = new URLEndpointsConfigurationFactory().create(param.getValue().toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.sample.addnumbers.AddNumbersPortType

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.