Package nexj.core.integration.io

Examples of nexj.core.integration.io.WriterOutput


      tobj = new TransferObject(2);
      list.add(tobj);
      tobj.setValue("type", "OHIP");
      tobj.setValue("id", "111222333");

      m_formatter.format(root, message, new WriterOutput(writer));
      assertEquals(PATIENT_SOAP12, writer.toString());
   }
View Full Code Here


      tobj.setValue("lang", "fr");
      tobj.setValue("value", "French error message");
      root.setValue("detail", "<p>Application-specific <b>detail</b> goes here.</p>");

      writer = new StringWriter();
      m_formatter.format(root, message, new WriterOutput(writer));

      try
      {
         m_parser.parse(new ReaderInput(new StringReader(writer.toString())), m_context.getMetadata().getMessage("SOAP12_PatientDemographics"));
         fail("Expected exception");
View Full Code Here

    * Test single aggregation.
    */
   public void testSingleAggregation() throws Exception
   {
      m_formatter.format(m_parser.parse(new StringInput(SINGLE_AGGREGATION_TEST), m_singleAggregationMessage),
            m_singleAggregationMessage, new WriterOutput(new StringWriter()));
   }
View Full Code Here

         new StringInput(sData),
         m_cisco_message);
     
     
      StringWriter writer = new StringWriter();
      m_formatter.format(root, m_cisco_message, new WriterOutput(writer));
     
      assertEquals(sExpected, writer.toString());
   }
View Full Code Here

    * Tests format string support in the CSV format adapter.
    */
   public void testFormatCSVWithFormatString()
   {
      StringWriter outWriter = new StringWriter();
      WriterOutput out = new WriterOutput(outWriter);
      TransferObject tobj = new TransferObject("CSV_FormatString", 1);
      TransferObject row = new TransferObject();
      Timestamp ts1 = Timestamp.valueOf("2010-03-03 18:30:00.123");
      List rows = new ArrayList(4);

View Full Code Here

   protected void testParsingAndFormatting(Message message, String sMsg, int nOrdinal)
   {
      TransferObject tobj = m_parser.parse(new StringInput(sMsg), message);
      StringWriter writer = new StringWriter();
      m_formatter.format(tobj, message, new WriterOutput(writer));

      assertEquals(changeOrdinal(sMsg, nOrdinal), normalize(writer.toString()));
   }
View Full Code Here

      assertEquals(315615600000L, ((Timestamp)((TransferObject)((TransferObject)tobj.getValue("patientIdentification"))
         .getValue("dateTimeOfBirth")).getValue("time")).getTime());

      StringWriter writer = new StringWriter();

      m_formatter.format(tobj, m_adtA04, new WriterOutput(writer));
     
      assertEquals("MSH|^~\\&|||||20050326002305.528+0000||ADT^A04|1|P|2.5||||||\r" +
         "EVN|A04||||||\rPID|||1234567890^^^&OHIP||Test^Joe||19800101230000.000+0000|M||U|" +
         "123 45th St^^Toronto^ON^A1B2C3^Canada^H||(416) 123-4567|(416) 456-7890|||||||||||||||||||||||||\r",
         writer.toString());
View Full Code Here

TOP

Related Classes of nexj.core.integration.io.WriterOutput

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.