Package javax.xml.ws

Examples of javax.xml.ws.Service.createDispatch()


    public Dispatch<String> getDispatch() throws MalformedURLException {
        File wsdl= new File(wsdlLocation);
        URL wsdlUrl = wsdl.toURL();
        Service service = Service.create(null, serviceName);
        service.addPort(portName, null, axisEndpoint);
        Dispatch<String> dispatch = service.createDispatch(portName, String.class, Service.Mode.PAYLOAD);
        return dispatch;
    }
   
    /**
     * Simple test that ensures that we can echo a string.
View Full Code Here


        Service svc = Service.create(serviceName);
        svc.addPort(portName, null, endpointUrl);
       
        JAXBContext jbc = JAXBContext.newInstance("org.test.mtom");
       
        Dispatch<Object> dispatch = svc
                .createDispatch(portName, jbc, Service.Mode.PAYLOAD);
       
        //Create a request bean with imagedepot bean as value
        ObjectFactory factory = new ObjectFactory();
        SendImage request = factory.createSendImage();
View Full Code Here

        Service svc = Service.create(serviceName);
        svc.addPort(portName, null, endpointUrl);
       
        JAXBContext jbc = JAXBContext.newInstance("org.test.mtom");
       
        Dispatch<Object> dispatch = svc
                .createDispatch(portName, jbc, Service.Mode.PAYLOAD);
       
        // Enable attachment optimization
        SOAPBinding binding = (SOAPBinding) dispatch.getBinding();
        binding.setMTOMEnabled(true);
View Full Code Here

        svc.addPort(portName, null, PROVIDER_ENDPOINT_URL);
       
        JAXBContext jbc = JAXBContext.newInstance("org.test.mtom");
       
       
        Dispatch<Object> dispatch = svc
                .createDispatch(portName, jbc, Service.Mode.PAYLOAD);
       
        // Enable attachment optimization
        SOAPBinding binding = (SOAPBinding) dispatch.getBinding();
        binding.setMTOMEnabled(true);
View Full Code Here

       
        JAXBContext jbc = JAXBContext.newInstance("org.test.mtom");
       
        MTOMFeature mtom = new MTOMFeature();
       
        Dispatch<Object> dispatch = svc
                .createDispatch(portName, jbc, Service.Mode.PAYLOAD, mtom);
       
        //Create a request bean with imagedepot bean as value
        ObjectFactory factory = new ObjectFactory();
        SendImage request = factory.createSendImage();
View Full Code Here

       
        // Make sure MTOMFeature with a small threshhold (1) works correctly
        // by sending an optimized MTOM message.
        MTOMFeature mtom = new MTOMFeature(1);
       
        Dispatch<Object> dispatch = svc
                .createDispatch(portName, jbc, Service.Mode.PAYLOAD, mtom);
       
        //Create a request bean with imagedepot bean as value
        ObjectFactory factory = new ObjectFactory();
        SendImage request = factory.createSendImage();
View Full Code Here

     
     
        Service svc = Service.create(serviceName);
        svc.addPort(portName,null, endpointUrl);
        Dispatch<SOAPMessage> dispatch =
          svc.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE);
        return dispatch;
    }
   
    /**
     * @return
 
View Full Code Here

            assertNotNull(s);
            //add port
            s.addPort(portName, null, url);
           
            //Create Dispatch
            Dispatch<String> dispatch = s.createDispatch(portName, String.class, Service.Mode.MESSAGE);
            assertNotNull(dispatch);
            res = dispatch.invoke(soapMessage);
            assertNotNull(res);
            TestLogger.logger.debug("----------------------------------");
        } catch(Exception e) {
View Full Code Here

       
       
        Service svc = Service.create(serviceName);
        svc.addPort(portName,null, endpointUrl);
        Dispatch<String> dispatch =
                svc.createDispatch(portName, String.class, Service.Mode.PAYLOAD);
        return dispatch;
    }
   
    /**
     * Common assertion checking of the response
View Full Code Here

            Service s = Service.create(name);
            assertNotNull(s);
            //add port
            s.addPort(portName, null, url);               
            //Create Dispatch
            Dispatch<String> dispatch = s.createDispatch(portName, String.class, Service.Mode.MESSAGE);
            assertNotNull(dispatch);
            res = dispatch.invoke(soapMessage);
            fail("Did not get expected SOAPFaultException for not understood MustUnderstand header");
            TestLogger.logger.debug("----------------------------------");
        } catch(SOAPFaultException e) {        
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.