Examples of Dispatch


Examples of javax.xml.ws.Dispatch

        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
       
        Service svc = Service.create(url, new QName("http://jaxws.axis2.apache.org", "EchoService"));
        Dispatch dispatch = svc.createDispatch(new QName("http://jaxws.axis2.apache.org", "EchoPort"),
                String.class, Mode.PAYLOAD);
       
        try {
            dispatch.invoke("");
           
            // If an exception wasn't thrown, then it's an error.
            fail();
        } catch (WebServiceException e) {
            // We should only get a WebServiceException here.  Anything else
View Full Code Here

Examples of javax.xml.ws.Dispatch

     */
    public void testDisptachBindingProviderSPI() {
        Service svc = Service.create(serviceQName);
        svc.addPort(portQName, SOAPBinding.SOAP11HTTP_BINDING, "");
       
        Dispatch dsp = svc.createDispatch(portQName, Source.class, Service.Mode.MESSAGE);
       
        // Make sure we can cast the object to the right interfaces
        assertTrue("The Dispatch object should also be a javax.xml.ws.BindingProvider",
                (dsp instanceof javax.xml.ws.BindingProvider));
        assertTrue("The Dispatch object should also be a org.apache.axis2.jaxws.spi.BindingProvider",
View Full Code Here

Examples of javax.xml.ws.Dispatch

   
    public void testSetInvalidClientProperties() throws Exception {
        Service svc = Service.create(new QName("http://test", "TestService"));
        QName portQName = new QName("http://test", "TestPort");
        svc.addPort(portQName, null, null);
        Dispatch dispatch = svc.createDispatch(portQName, String.class, Mode.PAYLOAD);
       
        Map<String, Object> map = dispatch.getRequestContext();
       
        try {
            map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, new Integer(4));
            fail();
        }
View Full Code Here

Examples of javax.xml.ws.Dispatch

        URL wsdl1 = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl1);
       
        ServiceImpl service = new ServiceImpl(getBus(), wsdl1, SERVICE_1, ServiceImpl.class);

        Dispatch dispatch = service.createDispatch(PORT_1, Source.class, Service.Mode.PAYLOAD);
        assertNotNull(dispatch);
    }
View Full Code Here

Examples of javax.xml.ws.Dispatch

        URL wsdl1 = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl1);
       
        ServiceImpl service = new ServiceImpl(getBus(), wsdl1, SERVICE_1, ServiceImpl.class);

        Dispatch dispatch = service.createDispatch(PORT_1, Source.class, Service.Mode.PAYLOAD);
        assertNotNull(dispatch);
    }
View Full Code Here

Examples of javax.xml.ws.Dispatch

    private QName portQname = new QName("http://test", "TestPort");
   
    public void testDefaultInvocationController() {
        Service svc = Service.create(svcQname);
        svc.addPort(portQname, SOAPBinding.SOAP11HTTP_BINDING, "http://localhost");
        Dispatch d = svc.createDispatch(portQname, Source.class, Service.Mode.PAYLOAD);
       
        BaseDispatch bd = (BaseDispatch) d;
       
        assertTrue("An InvocationController instance was not created", bd.ic != null);
        assertTrue("The default InvocationController type was incorrect.",
View Full Code Here

Examples of javax.xml.ws.Dispatch

    public void testPluggableInvocationController() {
        FactoryRegistry.setFactory(InvocationControllerFactory.class, new TestInvocationControllerFactory());
       
        Service svc = Service.create(svcQname);
        svc.addPort(portQname, SOAPBinding.SOAP11HTTP_BINDING, "http://localhost");
        Dispatch d = svc.createDispatch(portQname, Source.class, Service.Mode.PAYLOAD);
       
        BaseDispatch bd = (BaseDispatch) d;
       
        // Set it back to the default so we don't break other tests.
        FactoryRegistry.setFactory(InvocationControllerFactory.class, new InvocationControllerFactoryImpl());
View Full Code Here

Examples of javax.xml.ws.Dispatch

        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
       
        Service svc = Service.create(url, new QName("http://jaxws.axis2.apache.org", "EchoService"));
        Dispatch dispatch = svc.createDispatch(new QName("http://jaxws.axis2.apache.org", "EchoPort"),
                String.class, Mode.PAYLOAD);
       
        try {
            dispatch.invoke("");
           
            // If an exception wasn't thrown, then it's an error.
            fail();
        } catch (WebServiceException e) {
            // We should only get a WebServiceException here.  Anything else
View Full Code Here

Examples of javax.xml.ws.Dispatch

   
    public void testSetInvalidClientProperties() throws Exception {
        Service svc = Service.create(new QName("http://test", "TestService"));
        QName portQName = new QName("http://test", "TestPort");
        svc.addPort(portQName, null, null);
        Dispatch dispatch = svc.createDispatch(portQName, String.class, Mode.PAYLOAD);
       
        Map<String, Object> map = dispatch.getRequestContext();
       
        try {
            map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, new Integer(4));
            fail();
        }
View Full Code Here

Examples of javax.xml.ws.Dispatch

     */
    public void testDisptachBindingProviderSPI() {
        Service svc = Service.create(serviceQName);
        svc.addPort(portQName, SOAPBinding.SOAP11HTTP_BINDING, "");
       
        Dispatch dsp = svc.createDispatch(portQName, Source.class, Service.Mode.MESSAGE);
       
        // Make sure we can cast the object to the right interfaces
        assertTrue("The Dispatch object should also be a javax.xml.ws.BindingProvider",
                (dsp instanceof javax.xml.ws.BindingProvider));
        assertTrue("The Dispatch object should also be a org.apache.axis2.jaxws.spi.BindingProvider",
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.