Package org.megatome.frame2.jaxbgen

Examples of org.megatome.frame2.jaxbgen.PurchaseOrderType


  @Test
  public void testCallHandlerInvalidEvent() throws Exception {
    SoapRequestProcessor processor = (SoapRequestProcessor) RequestProcessorFactory
        .instance(this.config, this.elements, TARGET_PKG);

    PurchaseOrderType poi = new PurchaseOrderType();

    try {
      processor.callHandlers("InvalidEvent", poi, ViewType.XML); //$NON-NLS-1$
      fail();
    } catch (Frame2Exception expected) {
View Full Code Here


  @Test
  public void testMarshalResponse() throws Exception {
    SoapRequestProcessor processor = (SoapRequestProcessor) RequestProcessorFactory
        .instance(this.config, this.elements, TARGET_PKG);

    PurchaseOrderType poi = getResponseObject("org/megatome/frame2/jaxb/po.xml"); //$NON-NLS-1$
    ObjectFactory of = new ObjectFactory();

    Element element = processor.marshallResponse(of
        .createPurchaseOrder(poi));
View Full Code Here

  public PurchaseOrderHandler() {
    super();
  }

  public String handle(Event event, Context context) {
      PurchaseOrderType po = (PurchaseOrderType) event;

      po.setComment(NEW_COMMENT);

      context.setRequestAttribute("key1",po); //$NON-NLS-1$
    return "orderResult"; //$NON-NLS-1$
  }
View Full Code Here

    assertNotNull(po);

    assertEquals("1999-10-20", Helper.calendarToString(po.getOrderDate())); //$NON-NLS-1$

    USAddress address = po.getShipTo();

    assertNotNull(address);
    assertEquals("Alice Smith", address.getName()); //$NON-NLS-1$

    Items items = po.getItems();

    assertNotNull(items);
    assertEquals(2, items.getItem().size());
View Full Code Here

    static private Logger getDefault(String name) {
        Logger result = null;

        if (STD_LOGGING_AVAILABLE) {
            try {
                result = new StandardLogger(name);
            } catch (Throwable t) {
                STD_LOGGING_AVAILABLE = false;
            }
        }
View Full Code Here

                STD_LOGGING_AVAILABLE = false;
            }
        }

        if (result == null) {
            result = new StdoutLogger(name);
        }

        return result;
    }
View Full Code Here

   public MockPluginInterface(int startIndex) {
       this.state = startIndex;
   }

  public void destroy(ServletContext context, Map<String, String> initParams) throws PluginException {
     if (context == null) throw new PluginException("Plugin Init Exception"); //$NON-NLS-1$
     if (initParams.get("throwsDestroyParam") != null){ //$NON-NLS-1$
         this.state = STATE_THROW; // value if throw
         throw new PluginException("got throwsDestoryParam, throw for test"); //$NON-NLS-1$
     }
     this.state = STATE_DESTROY;
  }
View Full Code Here

     }
     this.state = STATE_DESTROY;
  }

  public void init(ServletContext context, Map<String, String> initParams) throws PluginException {
      if (context == null) throw new PluginException("Plugin Init Exception"); //$NON-NLS-1$
      if (initParams.get("throwsParam") != null){ //$NON-NLS-1$
         throw new PluginException("got throwsParam, throw for test"); //$NON-NLS-1$
      }
     
      this.state = STATE_INIT;
  }
View Full Code Here

    try {
      TemplateConfigFactory.loadTemplateFile(context, this.templateFile, configDir);
    } catch (TemplateException e) {
      LOGGER.severe(PLUGIN_INIT_ERROR + e.getMessage());
      throw new PluginException(PLUGIN_INIT_ERROR + e.getMessage(), e);
    }
  }
View Full Code Here

    LOGGER.debug("CommonsValidatorPlugin:init()"); //$NON-NLS-1$
    try {
      CommonsValidatorWrapper.load(context);
    } catch (CommonsValidatorException e) {
      LOGGER.severe("CommonsValidatorPlugin not loaded : " + e); //$NON-NLS-1$
      throw new PluginException(e);
    } catch (NoClassDefFoundError e) {
      // Bug Fix: 917752
      // Throw exception when plugin is specified, but class files
      // are missing
      LOGGER.severe("CommonsValidatorPlugin not loaded : " + e); //$NON-NLS-1$
      throw new PluginException(e);
    }

  }
View Full Code Here

TOP

Related Classes of org.megatome.frame2.jaxbgen.PurchaseOrderType

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.