Examples of toDOMDocument()


Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                            documentString = ECHO_BOOLEAN_RESPONSE;
                            assertEquals("Get a wrong request", ECHO_BOOLEAN_REQUEST, request);
                        } else {
                            assertEquals("Get a wrong request", ECHO_REQUEST, request);
                        }
                        Document outDocument = converter.toDOMDocument(documentString);
                        outElements.add(outDocument.getDocumentElement());
                        // set the payload header with null
                        CxfPayload<SoapHeader> responsePayload = new CxfPayload<SoapHeader>(null, outElements);
                        exchange.getOut().setBody(responsePayload);
                    }
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                            documentString = ECHO_BOOLEAN_RESPONSE;
                            assertEquals("Get a wrong request", ECHO_BOOLEAN_REQUEST, request);
                        } else {
                            assertEquals("Get a wrong request", ECHO_REQUEST, request);
                        }
                        Document outDocument = converter.toDOMDocument(documentString);
                        outElements.add(outDocument.getDocumentElement());
                        // set the payload header with null
                        CxfPayload<SoapHeader> responsePayload = new CxfPayload<SoapHeader>(null, outElements);
                        exchange.getOut().setBody(responsePayload);
                    }
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                        XmlConverter converter = new XmlConverter();
                        String documentString = ECHO_RESPONSE;
                        if (inElements.get(0).getLocalName().equals("echoBoolean")) {
                            documentString = ECHO_BOOLEAN_RESPONSE;
                        }
                        Document outDocument = converter.toDOMDocument(documentString);
                        outElements.add(outDocument.getDocumentElement());
                        // set the payload header with null
                        CxfPayload<SoapHeader> responsePayload = new CxfPayload<SoapHeader>(null, outElements);
                        exchange.getOut().setBody(responsePayload);
                    }
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                        XmlConverter converter = new XmlConverter();
                        String documentString = ECHO_RESPONSE;
                        if (inElements.get(0).getLocalName().equals("echoBoolean")) {
                            documentString = ECHO_BOOLEAN_RESPONSE;
                        }
                        Document outDocument = converter.toDOMDocument(documentString);
                        outElements.add(outDocument.getDocumentElement());
                        // set the payload header with null
                        CxfPayload<SoapHeader> responsePayload = new CxfPayload<SoapHeader>(null, outElements);
                        exchange.getOut().setBody(responsePayload);
                    }
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                            checkRequest("ECHO_BOOLEAN_REQUEST", request);
                        } else {
                            documentString = ECHO_RESPONSE;
                            checkRequest("ECHO_REQUEST", request);
                        }
                        Document outDocument = converter.toDOMDocument(documentString);
                        outElements.add(new DOMSource(outDocument.getDocumentElement()));
                        // set the payload header with null
                        CxfPayload<SoapHeader> responsePayload = new CxfPayload<SoapHeader>(null, outElements, null);
                        exchange.getOut().setBody(responsePayload);
                    }
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                            documentString = ECHO_BOOLEAN_RESPONSE;
                            assertEquals("Get a wrong request", ECHO_BOOLEAN_REQUEST, request);
                        } else {
                            assertEquals("Get a wrong request", ECHO_REQUEST, request);
                        }
                        Document outDocument = converter.toDOMDocument(documentString);
                        outElements.add(outDocument.getDocumentElement());
                        // set the payload header with null
                        CxfPayload<SoapHeader> responsePayload = new CxfPayload<SoapHeader>(null, outElements);
                        exchange.getOut().setBody(responsePayload);
                    }
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

        sendMessageAndHaveItTransformed("<mail><subject>Hey</subject><body>Hello world!</body></mail>".getBytes());
    }
   
    public void testSendDomMessage() throws Exception {
        XmlConverter  converter = new XmlConverter();
        Document body = converter.toDOMDocument("<mail><subject>Hey</subject><body>Hello world!</body></mail>");
        sendMessageAndHaveItTransformed(body);
    }
   
    private void sendMessageAndHaveItTransformed(Object body) throws Exception {
        MockEndpoint endpoint = getMockEndpoint("mock:result");
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                            checkRequest("ECHO_BOOLEAN_REQUEST", request);
                        } else {
                            documentString = ECHO_RESPONSE;
                            checkRequest("ECHO_REQUEST", request);
                        }
                        Document outDocument = converter.toDOMDocument(documentString);
                        outElements.add(new DOMSource(outDocument.getDocumentElement()));
                        // set the payload header with null
                        CxfPayload<SoapHeader> responsePayload = new CxfPayload<SoapHeader>(null, outElements, null);
                        exchange.getOut().setBody(responsePayload);
                    }
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                        assertIsInstanceOf(String.class, request);
                        receivedMessageStringApplyingXPath = XPathBuilder.xpath("//*[name()='arg0']/text()").evaluate(context, request, String.class);

                        //build some dummy response
                        XmlConverter converter = new XmlConverter();
                        Document outDocument = converter.toDOMDocument(ECHO_RESPONSE);
                        List<Source> outElements = new ArrayList<Source>();
                        outElements.add(new DOMSource(outDocument.getDocumentElement()));
                        // set the payload header with null
                        CxfPayload<SoapHeader> responsePayload = new CxfPayload<SoapHeader>(null, outElements, null);
                        exchange.getOut().setBody(responsePayload);
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.toDOMDocument()

                                documentString = ECHO_BOOLEAN_RESPONSE;
                            }
                            org.apache.cxf.message.Exchange ex = ((CxfExchange)exchange).getExchange();
                            Endpoint ep = ex.get(Endpoint.class);
                            org.apache.cxf.message.Message response = ep.getBinding().createMessage();
                            Document outDocument = converter.toDOMDocument(documentString);
                            outElements.add(outDocument.getDocumentElement());
                            response.put(List.class, outElements);
                            cxfOutMessage.setMessage(response);                           
                        }
                    }
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.