Examples of filterSource()


Examples of org.milyn.Smooks.filterSource()

      FileInputStream inputStream = null;
      try {
         JavaResult result = new JavaResult();
         inputStream = new FileInputStream(fileName.trim());
         smooks.filterSource(new StreamSource(inputStream), result);
         return (List<Nucleotide_Protein_Element>) result.getBean("customerList");
      } finally {
         smooks.close();
         Util.close(inputStream);
      }
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

    private void applySmooksTransform(String smooksResource, Document messageDoc) throws IOException, SAXException {
        if(smooksResource != null) {
            LRUReferenceCountCacheEntry<Smooks, SmooksResource> smooksEntry = smooksCache.get(smooksResource);
            try {
                final Smooks smooks = smooksEntry.getResource();
                smooks.filterSource(new DOMSource(messageDoc), new DOMResult());
            }
            finally
            {
                smooksCache.release(smooksEntry);
            }
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

        final String expected = "<Envelope><Header>" + SECURITY_START + "<dummyAssertion/></t:Security></Header></Envelope>";
        final String actual = (String) Subject.doAs(subject, new PrivilegedAction<String>()
        {
            public String run()
            {
            smooks.filterSource(source, result);
                return result.toString();
            }
        });
       
        assertTrue(XMLHelper.compareXMLContent(expected, actual));
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

        final String expected = "<Envelope><Header>" + SECURITY_START + "</t:Security></Header></Envelope>";
        final StringSource source = new StringSource(expected);
        final StringResult result = new StringResult();

        smooks.filterSource(source, result);

        final String actual = result.toString();

        assertTrue(XMLHelper.compareXMLContent(expected, actual));
    }
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

        final String expected = "<Envelope>" + HEADER_START + SECURITY_START + "<dummyAssertion/></t:Security></h:Header></Envelope>";
        final String actual = (String) Subject.doAs(subject, new PrivilegedAction<String>()
        {
            public String run()
            {
                smooks.filterSource(source, result);
                return result.toString();
            }
        });

        assertTrue(XMLHelper.compareXMLContent(expected, actual));
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

        final String expected = StreamUtils.readStreamString(getClass().getResourceAsStream("saml-inject-expected.xml"), "UTF-8");
        final String actual = (String) Subject.doAs(subject, new PrivilegedAction<String>()
        {
            public String run()
            {
                smooks.filterSource(source, result);
                return result.toString();
            }
        });
       
        assertTrue(XMLHelper.compareXMLContent(expected, actual));
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

        final String expected = StreamUtils.readStreamString(getClass().getResourceAsStream("saml-inject-expected.xml"), "UTF-8");
        final String actual = (String) Subject.doAs(subject, new PrivilegedAction<String>()
        {
            public String run()
            {
                smooks.filterSource(source, result);
                return result.toString();
            }
        });
       
        assertTrue(XMLHelper.compareXMLContent(expected, actual));
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

      PersistenceUtil.setDAORegister(executionContext, register);

      for (int i = 0; i < dataLoader.file().length; i++) {
        StreamSource streamSource = new StreamSource(this.getClass()
            .getResourceAsStream(dataLoader.file()[i]));
        smooks.filterSource(executionContext, streamSource,
            new Result[] { null });
      }
    } else {
      log.info("Skipping loading smooks configuration "
          + "file as there is no StreamSource " + "file defined");
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

      PersistenceUtil.setDAORegister(executionContext, register);

      for (int i = 0; i < dataLoader.file().length; i++) {
    StreamSource streamSource = new StreamSource(this.getClass()
      .getResourceAsStream(dataLoader.file()[i]));
    smooks.filterSource(executionContext, streamSource,
      new Result[] {null});
      }
  } else {
      LOGGER.info("Skipping loading smooks configuration "
        + "file as there is no StreamSource " + "file defined");
View Full Code Here

Examples of org.milyn.Smooks.filterSource()

      FileInputStream inputStream = null;
      try {
         JavaResult result = new JavaResult();
         inputStream = new FileInputStream(fileName.trim());
         smooks.filterSource(new StreamSource(inputStream), result);
         return (List<Nucleotide_Protein_Element>) result.getBean("customerList");
      } finally {
         smooks.close();
         Util.close(inputStream);
      }
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.