Package javax.xml.ws

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


       
        Service service = Service.create(wsdlURL, new QName(namespaceURI, localPart));
        assertNotNull(service);
       
        QName validPortQName = new QName(namespaceURI, "EchoPort");
        Dispatch<String> dispatch = service.createDispatch(validPortQName, String.class, null);
        assertNotNull(dispatch);
       
        BindingProvider bindingProvider = (BindingProvider) dispatch;
        ServiceDelegate serviceDelegate = bindingProvider.getServiceDelegate();
        assertNotNull(serviceDelegate);
View Full Code Here


        Service svc = Service.create(serviceName);
        svc.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointUrl);

        // Use Message mode so we can build up the entire SOAP envelope containing the fault
        Dispatch<String> dispatch =
                svc.createDispatch(portName, String.class, Service.Mode.MESSAGE);

        // Force soap action because we are passing junk over the wire
        dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
        dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, "http://stringprovider.sample.test.org/echoString");
View Full Code Here

        TestLogger.logger.debug("test: " + getName());
       
        // Initialize the JAX-WS client artifacts
    Service svc = Service.create(DispatchTestConstants.QNAME_SERVICE);
    svc.addPort(DispatchTestConstants.QNAME_PORT, null, DispatchTestConstants.URL);
    Dispatch<Source> dispatch = svc.createDispatch(DispatchTestConstants.QNAME_PORT, Source.class,
        Service.Mode.PAYLOAD);
       
    // Create a StreamSource with the desired content
        byte[] bytes = DispatchTestConstants.sampleBodyContent.getBytes();
        ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
View Full Code Here

        Service service = Service.create(wsdlURL, new QName(namespaceURI, localPart));
        assertNotNull(service);
       
        QName validPortQName = new QName(namespaceURI, "EchoPortAdded");
        service.addPort(validPortQName, null, null);
        Dispatch<String> dispatch = service.createDispatch(validPortQName, String.class, null);
        assertNotNull(dispatch);
       
        BindingProvider bindingProvider = (BindingProvider) dispatch;
        ServiceDelegate serviceDelegate = bindingProvider.getServiceDelegate();
        assertNotNull(serviceDelegate);
View Full Code Here

        assertNull(endpointAddress);
       
        QName validPortQName2 = new QName(namespaceURI, "EchoPortAdded2");
        final String port2EndpointAddress = "http://testAddress:6060/my/test/address";
        service.addPort(validPortQName2, null, port2EndpointAddress);
        dispatch = service.createDispatch(validPortQName2, String.class, null);
        assertNotNull(dispatch);
        bindingProvider = (BindingProvider) dispatch;
        endpointDesc = bindingProvider.getEndpointDescription();
        assertNotNull(endpointDesc);
        // The endpoint address should be as set on the addPort above.
View Full Code Here

        Service service = Service.create(null, new QName(namespaceURI, localPart));
        assertNotNull(service);
       
        QName validPortQName = new QName(namespaceURI, "EchoPort");
        EchoPort echoPort = service.getPort(validPortQName, EchoPort.class);
        Dispatch<String> dispatch = service.createDispatch(validPortQName, String.class, null);
        assertNotNull(dispatch);
       
        BindingProvider bindingProvider = (BindingProvider) dispatch;
        ServiceDelegate serviceDelegate = bindingProvider.getServiceDelegate();
        assertNotNull(serviceDelegate);
View Full Code Here

          InputStream inputStream = new FileInputStream(file);
          StreamSource xmlStreamSource = new StreamSource(inputStream);
         
          Service svc = Service.create(serviceName);
          svc.addPort(portName,null, endpointUrl);
          Dispatch<Source> dispatch = svc.createDispatch(portName, Source.class, null);
            TestLogger.logger.debug(">> Invoking SourceMessageProviderDispatch");
          Source response = dispatch.invoke(xmlStreamSource);

            TestLogger.logger.debug(">> Response [" + response.toString() + "]");
         
View Full Code Here

        Service service = Service.create(null, new QName(namespaceURI, localPart));
        assertNotNull(service);
       
        QName validPortQName = new QName(namespaceURI, "EchoPortAdded");
        service.addPort(validPortQName, null, null);
        Dispatch<String> dispatch = service.createDispatch(validPortQName, String.class, null);
        assertNotNull(dispatch);
       
        BindingProvider bindingProvider = (BindingProvider) dispatch;
        ServiceDelegate serviceDelegate = bindingProvider.getServiceDelegate();
        assertNotNull(serviceDelegate);
View Full Code Here

        TestLogger.logger.debug("test: " + getName());
        try{
          // Initialize the JAX-WS client artifacts
          Service svc = Service.create(serviceName);
          svc.addPort(portName, null, url);
          Dispatch<Source> dispatch = svc.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
         
          //Create JAXBContext and JAXBSource here.
          ObjectFactory factory = new ObjectFactory();
          Invoke invokeObj = factory.createInvoke();
          invokeObj.setInvokeStr("Some Request");
View Full Code Here

       
    private Dispatch<Source> getDispatch() {
        Service svc = Service.create(serviceName);
        svc.addPort(portName, null, endpointUrl);
       
        Dispatch<Source> dispatch = svc
                .createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
       
        // Force soap action because we are passing junk over the wire
        dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
        dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY,"test");
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.