Package nexj.core.meta.integration

Examples of nexj.core.meta.integration.MessageTable


   {
      getLogger().dump(tobj);
      context.getUnitOfWork().checkLicense();

      Object body = tobj.findValue(Sender.BODY);
      MessageTable table = channel.getMessageTable();
      Iterator itr = null;

      if (table != null && table.getFormat() != null)
      {
         tobj = ((MessageParser)table.getFormat().getParser().getInstance(context))
            .parse((body instanceof Input) ? (Input)body : new ObjectInput(body), table);
         itr = channel.getBindingIterator(table.getMessage(tobj.getClassName()));
      }
      else
      {
         if (body instanceof Input)
         {
View Full Code Here


      maker.addFile("a", "Contents of file a.");
      maker.addDirectory("b/");
      maker.addFile("b/c", "Contents of file c in directory b.");

      // Parse it
      MessageTable table = new MessageTable();

      table.addMessage(m_message);
      m_parser.initializeMessageTable(table);

      TransferObject root = m_parser.parse(
         new StreamInput(maker.getInputStream()), table);
      List filesList = (List)root.getValue("files");
View Full Code Here

    */
   public void testInvalidMessageTable() throws Exception
   {
      try
      {
         MessageTable table = new MessageTable();

         m_parser.initializeMessageTable(table);
         fail();
      }
      catch (IntegrationException ex)
      {
      }

      try
      {
         // Create a zip file in memory
         ZipMaker maker = new ZipMaker();

         maker.addFile("a", "Contents of file a.");
         maker.addDirectory("b/");
         maker.addFile("b/c", "Contents of file c in directory b.");


         MessageTable table = new MessageTable();

         m_parser.parse(new StreamInput(maker.getInputStream()), table);
         fail();
      }
      catch (IntegrationException ex)
View Full Code Here

               addSingletonFixup(new ContextFixup(m_helper)
               {
                  public void fixup()
                  {
                     MessageTable table = channel.getMessageTable();

                     if (table != null && table.getFormat() != null)
                     {
                        ((MessageParser)table.getFormat().getParser().getInstance(null)).initializeMessageTable(table);
                     }
                  }
               });
            }
         });
View Full Code Here

      addSingletonFixup(new ContextFixup(m_helper)
      {
         public void fixup()
         {
            MessageTable table = iface.getRequestTable();

            if (table.getFormat() != null)
            {
               ((MessageParser)table.getFormat().getParser().getInstance(null)).initializeMessageTable(table);
            }

            table = iface.getResponseTable();

            if (table.getFormat() != null)
            {
               ((MessageParser)table.getFormat().getParser().getInstance(null)).initializeMessageTable(table);
            }
         }
      });
   }
View Full Code Here

            new Object[]{service.getFullName()});
      }

      if (service.getInterface() != null)
      {
         MessageTable table = service.getInterface().getRequestTable();
        
         if (!(message instanceof TransferObject) ||
            table.getMessageCount() != 0 && table.findMessage(((TransferObject)message).getClassName()) == null)
         {
            throw new IntegrationException("err.integration.service.inputMessage", new Object[]{service.getFullName()});
         }
      }
View Full Code Here

         s_logger.dump(value);
      }
     
      if (service.getInterface() != null)
      {
         MessageTable responseTable = service.getInterface().getResponseTable();
         Message message = null;

         if (responseTable.getMessageCount() != 0)
         {
            if (!(value instanceof TransferObject) ||
               (message = responseTable.findMessage(((TransferObject)value).getClassName())) == null)
            {
               throw new IntegrationException("err.integration.service.outputMessage", new Object[]{service.getFullName()});
            }

            if (message.getFormat() == null)
            {
               message = null;
            }
         }
         else if (responseTable.getFormat() != null)
         {
            channel = null;
         }

         if (channel != null && message != null)
View Full Code Here

         if (channel.getBindingCount() > 0 &&
            GENERATE_WSDL_QUERY.equalsIgnoreCase(m_request.getQueryString()))
         {
            SchemaExporter exporter = null;
            MessageTable msgTable = channel.getMessageTable();

            if (msgTable != null)
            {
               Format format = msgTable.getFormat();

               if (format != null)
               {
                  Class exporterClass = format.getExporter();
View Full Code Here

      TransferObject root;
      Message msg1 = m_context.getMetadata().getMessage("XML_Inherit_Child1");
      Message msg2 = m_context.getMetadata().getMessage("XML_Inherit_Child2");
      Message msg3 = m_context.getMetadata().getMessage("XML_Inherit_Child3");
      Message msgp = m_context.getMetadata().getMessage("XML_Inherit_Parent");
      MessageTable table = new MessageTable();

      table.addMessage(msg1);
      table.addMessage(msg2);
      table.addMessage(msg3);
      table.addMessage(msgp);
      m_parser.initializeMessageTable(table);

      // Parse child1
      root = m_parser.parse(new StringInput(
         "<child1>" +
View Full Code Here

         }

         return tobj;
      }

      MessageTable table = m_interface.getResponseTable();
      Format format = table.getFormat();

      if (format == null)
      {
         return tobj;
      }
View Full Code Here

TOP

Related Classes of nexj.core.meta.integration.MessageTable

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.