Package javax.xml.transform

Examples of javax.xml.transform.Result


        }
    }

  @Test
    public void faultNonCompliant() {
        Result result = new StringResult();
        template.setCheckConnectionForFault(false);
        template.setCheckConnectionForError(false);
        try {
            template.sendSourceAndReceiveToResult(baseUrl + "/soap/badRequestFault",
                    new StringSource(messagePayload), result);
View Full Code Here


        MimeMessage response = createMock("response", MimeMessage.class);
        Source requestSource = new StringSource("<request/>");
        expect(request.getPayloadSource()).andReturn(requestSource);
        expect(factoryMock.createWebServiceMessage()).andReturn(response);
        expect(unmarshaller.unmarshal(eq(requestSource), isA(MimeContainer.class))).andReturn(42L);
        Result responseResult = new StringResult();
        expect(response.getPayloadResult()).andReturn(responseResult);
        marshaller.marshal(eq("result"), eq(responseResult), isA(MimeContainer.class));

        replay(factoryMock, unmarshaller, marshaller, request, response);
View Full Code Here

            StreamingPayload payload = new JaxbStreamingPayload(clazz, jaxbElement);
            streamingResponse.setStreamingPayload(payload);
        }
        else {
            Result responsePayload = response.getPayloadResult();
            try {
                Jaxb2ResultCallback callback = new Jaxb2ResultCallback(clazz, jaxbElement);
                TraxUtils.doWithResult(responsePayload, callback);
            }
            catch (Exception ex) {
View Full Code Here

    public void testHandler() throws Exception {
        String content = "<Root xmlns='http://springframework.org/spring-ws/1' " +
                "xmlns:child='http://springframework.org/spring-ws/2'>" +
                "<child:Child attribute='value'>Content</child:Child></Root>";
        Source source = new StringSource(content);
        Result result = new SAXResult(handler);
        transformer.transform(source, result);
        Name rootName = envelope.createName("Root", "", "http://springframework.org/spring-ws/1");
        Iterator<?> iterator = envelope.getBody().getChildElements(rootName);
        Assert.assertTrue("No child found", iterator.hasNext());
        SOAPBodyElement rootElement = (SOAPBodyElement) iterator.next();
View Full Code Here

        File report = new File(cd, "/target/jbehave/" + path);
        Source xml = new StreamSource(report);
        Source xslt = new StreamSource(new File(cd,
                "src/main/resources/org/jbehave/jenkins/"+new JBehaveInputMetric().getXslName()));

        Result resultOutput = new StreamResult(System.out);
        DOMResult result = new DOMResult();

        Transformer transformer = TransformerFactory.newInstance().newTransformer(xslt);
        transformer.transform(xml, result);
        transformer.transform(xml, resultOutput);
View Full Code Here

        File report = new File(cd, "/target/jbehave/" + path);
        Source xml = new StreamSource(report);
        Source xslt = new StreamSource(new File(cd,
                "src/main/resources/org/jbehave/hudson/"+new JBehaveInputMetric().getXslName()));

        Result resultOutput = new StreamResult(System.out);
        DOMResult result = new DOMResult();

        Transformer transformer = TransformerFactory.newInstance().newTransformer(xslt);
        transformer.transform(xml, result);
        transformer.transform(xml, resultOutput);
View Full Code Here

        }

        Set<String> refers = new TreeSet<String>();

        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        Result r = new StreamResult(bout);
        transformer.transform(source, r);

        ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
        bout.close();
View Full Code Here

        final Source xmlSource = createSource(inputFilename, sourceFile, filter, map);

        // XSL Transformation
        final Transformer transformer = builder.build();
        adjustTransformer(transformer, sourceFile.getAbsolutePath(), targetFile);
        final Result result = new StreamResult(targetFile.getAbsolutePath());

        transformer.transform(xmlSource, result);
        if (getLog().isDebugEnabled()) {
            getLog().debug(targetFile + " has been generated.");
        }
View Full Code Here

      // Setup input stream
      Source src = new StreamSource(in);

      // Resulting SAX events (the generated FO) must be piped through to FOP
      Result res = new SAXResult(fop.getDefaultHandler());

      // Start XSLT transformation and FOP processing
      transformer.transform(src, res);
     
     
View Full Code Here

                // Setup input stream
                Source src = new StreamSource(in);

                // Resulting SAX events (the generated FO) must be piped through to FOP
                Result res = new SAXResult(fop.getDefaultHandler());

                // Start XSLT transformation and FOP processing
                transformer.transform(src, res);
            }
        catch (FOPException e)
View Full Code Here

TOP

Related Classes of javax.xml.transform.Result

Copyright © 2018 www.massapicom. 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.