Examples of createDispatch()


Examples of org.apache.hello_world_soap_http.SOAPService.createDispatch()

        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);

        SOAPService service = new SOAPService(wsdl, SERVICE_NAME);
        assertNotNull(service);
        Dispatch<StreamSource> disp = service.createDispatch(PORT_NAME, StreamSource.class,
                                                             Service.Mode.MESSAGE);
        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:"
                                     + greeterPort
                                     + "/SOAPDispatchService/SoapDispatchPort");
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService.createDispatch()

        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);

        SOAPService service = new SOAPService(wsdl, SERVICE_NAME);
        assertNotNull(service);
        Dispatch<StreamSource> disp = service.createDispatch(PORT_NAME, StreamSource.class,
                                                             Service.Mode.PAYLOAD);
        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:"
                                     + greeterPort
                                     + "/SOAPDispatchService/SoapDispatchPort");
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService.createDispatch()

        URL wsdl = getClass().getResource("/org/apache/cxf/systest/provider/hello_world_with_restriction.wsdl");
        assertNotNull(wsdl);

        SOAPService service = new SOAPService(wsdl, SERVICE_NAME);
        assertNotNull(service);
        Dispatch<StreamSource> disp = service.createDispatch(PORT_NAME, StreamSource.class,
                                                             Service.Mode.PAYLOAD);
        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:"
                                     + greeterPort
                                     + "/SOAPDispatchService/SoapDispatchPort");
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService1.createDispatch()

                               + "GreetMeDocLiteralReq1.xml, please check");
            System.exit(-1);
        }
        SOAPMessage soapReq1 = factory.createMessage(null, is1);

        Dispatch<SOAPMessage> dispSOAPMsg = service1.createDispatch(portName1,
                                                                    SOAPMessage.class, Mode.MESSAGE);
       
        System.out.println("Invoking server through Dispatch interface using SOAPMessage");
        SOAPMessage soapResp = dispSOAPMsg.invoke(soapReq1);       
        System.out.println("Response from server: " + soapResp.getSOAPBody().getTextContent());       
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService2.createDispatch()

            System.exit(-1);
        }
        SOAPMessage soapReq2 = factory.createMessage(null, is2);
        DOMSource domReqMessage = new DOMSource(soapReq2.getSOAPPart());

        Dispatch<DOMSource> dispDOMSrcMessage = service2.createDispatch(portName2,
                                                                        DOMSource.class, Mode.MESSAGE);
        System.out.println("Invoking server through Dispatch interface using DOMSource in MESSAGE Mode");
        DOMSource domRespMessage = dispDOMSrcMessage.invoke(domReqMessage);       
        System.out.println("Response from server: "
                           + domRespMessage.getNode().getLastChild().getTextContent());
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService3.createDispatch()

        }

        SOAPMessage soapReq3 = MessageFactory.newInstance().createMessage(null, is3);
        DOMSource domReqPayload = new DOMSource(soapReq3.getSOAPBody().extractContentAsDocument());
            
        Dispatch<DOMSource> dispDOMSrcPayload = service3.createDispatch(portName3,
                                                                        DOMSource.class, Mode.PAYLOAD);
        System.out.println("Invoking server through Dispatch interface using DOMSource in PAYLOAD Mode");
        DOMSource domRespPayload = dispDOMSrcPayload.invoke(domReqPayload);       
        System.out.println("Response from server: "
                           + domRespPayload.getNode().getFirstChild().getTextContent());
View Full Code Here

Examples of org.apache.hello_world_xml_http.wrapped.Cutomerservice.createDispatch()

        InputStream is = client.getClass().getResourceAsStream("CustomerJohnReq.xml");
        Document doc = XMLUtils.parse(is);
        DOMSource reqMsg = new DOMSource(doc);

        // Sent HTTP POST request to update customer info
        Dispatch<DOMSource> disp = cutomerservice.createDispatch(portName, DOMSource.class,
                                   Service.Mode.PAYLOAD);
        System.out.println("Invoking server through HTTP POST to update customer info");
        DOMSource result = disp.invoke(reqMsg);
        printSource(result);
View Full Code Here

Examples of org.apache.hello_world_xml_http.wrapped.XMLService.createDispatch()

        assertNotNull(wsdl);

        XMLService service = new XMLService();
        assertNotNull(service);

        Dispatch<DOMSource> disp = service.createDispatch(portNameXML, DOMSource.class, Mode.MESSAGE);

        TestHandlerXMLBinding handler = new TestHandlerXMLBinding();
        addHandlersProgrammatically(disp, handler);

        InputStream is = getClass().getResourceAsStream("/messages/XML_GreetMeDocLiteralReq.xml");
View Full Code Here

Examples of org.apache.schema_validation.SchemaValidationService.createDispatch()

        String smsg = "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Header>"
            + "<SomeHeader soap:mustUnderstand='1' xmlns='http://apache.org/schema_validation/types'>"
            + "<id>1111111111</id></SomeHeader>"
            + "</soap:Header><soap:Body><SomeRequestWithHeader xmlns='http://apache.org/schema_validation/types'>"
            + "<id>1111111111</id></SomeRequestWithHeader></soap:Body></soap:Envelope>";
        Dispatch<Source> dsp = service.createDispatch(SchemaValidationService.SoapPort, Source.class, Mode.MESSAGE);
        updateAddressPort(dsp, PORT);
        dsp.invoke(new StreamSource(new StringReader(smsg)));
    }
   
    private SomeResponse execute(SchemaValidation service, String id) throws Exception {
View Full Code Here

Examples of org.ejbca.core.protocol.xkms.XKMSService.createDispatch()

   */
  public XKMSInvoker(String serviceURL, Collection<Certificate> cacerts){
    XKMSService xkmsService;
    try {
      xkmsService = new XKMSService(new URL(serviceURL + "?wsdl"),new QName("http://www.w3.org/2002/03/xkms#wsdl", "XKMSService"));
      sourceDispatch = xkmsService.createDispatch(new QName("http://www.w3.org/2002/03/xkms#wsdl", "XKMSPort"), Source.class, Service.Mode.PAYLOAD);
    } catch (MalformedURLException e) {
      log.error("Error creating XKMS Service instance",e);
    }      
    this.cacerts = cacerts; // null if signed responses are not required.
  }
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.