Package nexj.core.integration.io

Examples of nexj.core.integration.io.ReaderInput


         {
            public void handleCharacterStream(Reader reader, String sName) throws IOException
            {
               try
               {
                  TransferObject tobj = parser.parse(new ReaderInput(reader), (Message)transformation.getSource());

                  tobj.setValue("name", sName);

                  if (enabled != null && !Intrinsic.isTrue(m_context.getMachine().invoke(enabled, tobj, (Object[])null)))
                  {
View Full Code Here


            {
               String sEncoding = m_channel.getEncoding().toLowerCase(Locale.ENGLISH);
               Reader ireader = new BufferedReader(new InputStreamReader(
                  UTF8BOMIgnoreInputStream.wrap(bufStream, sEncoding), sEncoding));

               body = new ReaderInput(ireader);
            }
            else
            {
               body = new StreamInput(bufStream);
            }
View Full Code Here

                     {
                        String sEncoding = m_channel.getEncoding();
                        Reader ireader = new BufferedReader(new InputStreamReader(
                           UTF8BOMIgnoreInputStream.wrap(bufStream, sEncoding), sEncoding));

                        body = new ReaderInput(ireader);
                     }
                     else
                     {
                        body = new StreamInput(bufStream);
                     }
View Full Code Here

                  Reader ireader;
                  String sEncoding = m_channel.getEncoding().toLowerCase(Locale.ENGLISH);

                  ireader = new BufferedReader(new InputStreamReader(UTF8BOMIgnoreInputStream.wrap(bufStream, sEncoding), m_channel.getEncoding()));
                 
                  tobj.setValue(Sender.BODY, new ReaderInput(ireader));
               }
               else
               {
                  tobj.setValue(Sender.BODY, new StreamInput(bufStream));
               }
View Full Code Here

                           tobj.setValue(BODY, new StreamInput(istream, sEncoding).getBinary());
                        }
                        else
                        {
                           istream = UTF8BOMIgnoreInputStream.wrap(istream, sEncoding);
                           tobj.setValue(BODY, new ReaderInput(new InputStreamReader(istream, sEncoding)).getString());
                        }
                     }

                     tobj.setValue(CHANNEL, m_channel.getName());
                     tobj.setValue(HEADERS, getHeaders(m_client.getResponseHeaders()));
View Full Code Here

         tobj.setValue(HTTPAdapter.BODY,
            (http.getDataType() == Primitive.BINARY ||
               http.getDataType() == null &&
               MIMEUtil.isBinaryMIMEType(m_request.getHeader(HTTP.HEADER_CONTENT_TYPE))) ?
               new StreamInput(getInputStream(), sEncoding) :
                  (Input)new ReaderInput(getReader()));

         try
         {
            UnitOfWork uow = m_context.initUnitOfWork();
  
View Full Code Here

      Reader reader = null;

      try
      {
         reader = new InputStreamReader(URLUtil.openResource(XMLMessageParserTest.class, "XDS_SubmitObjectsRequest.xml"), XMLUtil.ENCODING);
         tobj = m_parser.parse(new ReaderInput(reader), m_xds);
      }
      finally
      {
         IOUtil.close(reader);
      }
View Full Code Here

      buf.append(sLongEnd);

      // This arrangement allows mark() to be limited--using a StringReader, for example,
      // mark() has no limit.
      Input input = new ReaderInput(new InputStreamReader(
         new ByteArrayInputStream(buf.toString().getBytes("utf-8")),
         "utf-8"));

      message = m_parser.parse(input, table);
      verifySOAPMessage2(message);
View Full Code Here

      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");
      }
      catch (SOAPFaultException ex)
      {
         assertEquals("urn:nexj:test:node1", ((SOAP12FaultException)ex).getNode());
View Full Code Here

TOP

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

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.