Package org.megatome.frame2.jaxbgen

Examples of org.megatome.frame2.jaxbgen.ObjectFactory


     */
    public void execute(InputStream is) throws TemplateException {

        try {
            if (is == null) {
                throw new ParserException(
                        "Error finding template definition file "); //$NON-NLS-1$
            }
            this.reader.parse(is);
        } catch (ParserException e) {
            e.printStackTrace();
View Full Code Here


        this.putTagHandler.clear();
        if (this.definitions.containsKey(this.templateDef.getName())) {
            // do not add duplicate named plugin defs to list.
            LOGGER.severe("Error: Duplicate definition " //$NON-NLS-1$
                    + this.templateDef.getName());
            throw new ParserException("Error: Duplicate definition " //$NON-NLS-1$
                    + this.templateDef.getName());
        }
        this.definitions.put(this.templateDef.getName(), this.templateDef);
    }
View Full Code Here

  String localName, @SuppressWarnings("unused")
  String qName,
            Attributes attributes) throws ParserException {
        String name = attributes.getValue(NAME);
        if (this.params.containsKey(name)) {
            throw new ParserException("Duplicate name in init parameter: " //$NON-NLS-1$
                    + name);
        }

        this.params.put(name, attributes.getValue(VALUE));
    }
View Full Code Here

        String name = attributes.getValue(NAME);
        String type = attributes.getValue(TYPE);
        ForwardType ftype = ForwardType.fromString(type);

        if (ftype == null) {
            throw new ParserException(INVALID_TYPE + name + " type " + type); //$NON-NLS-1$
        }

        Forward forward = new Forward(name, ftype, attributes.getValue(PATH));

        if (ftype.equals(ForwardType.HTMLRESOURCE)) {
View Full Code Here

            reader.setElement(EXCEPTIONS);
            reader.setElement(PLUGINS);
            reader.setElement(REQ_PROC);

            if (this.is == null) {
                throw new ParserException("Error finding config file "); //$NON-NLS-1$
            }

            reader.parse(this.is);
        } catch (ParserException e) {
            throw new Frame2Exception("Unable to load configuration", e); //$NON-NLS-1$
View Full Code Here

        } else {
            rtype = ResolveType.fromString(resolveAs);
        }

        if (rtype == null) {
            throw new ParserException("resolveAs attribute " + resolveAs //$NON-NLS-1$
                    + " is not valid "); //$NON-NLS-1$
        }

        EventDef event = new EventDef(name, type, rtype);
View Full Code Here

   * TranslationException { Element marshalledResult =
   * marshallResponse(context.getRequestAttribute(key)); return
   * marshalledResult; }
   */
  private Element createFault(Throwable e) {
    SOAPFault fault = new SOAPFault();

    fault.setDetailMessage(e.getMessage(), true);

    Element elem = null;

    try {
      elem = fault.getElement();
    } catch (SOAPException se) {
      // NIT maybe not catch, shouldn't happen.
    }

    return elem;
View Full Code Here

    return elem;
  }

  private Element createFault(Errors errs) throws SOAPException {
    SOAPFault fault = new SOAPFault();

    StringBuffer buffer = new StringBuffer();

    ResourceBundle bundle = ResourceLocator.getBundle();

    for (Error error : errs.get()) {
      String msg = bundle.getString(error.getKey());

      if (msg == null) {
        buffer.append("Could not find resource for key: " + error.getKey()); //$NON-NLS-1$
        LOGGER.severe("Error creating SOAP fault message. Missing resource for key: " + error.getKey()); //$NON-NLS-1$
      } else {
        buffer.append(MessageFormatter.format(msg, error.getValues()));
      }
      buffer.append("\n"); //$NON-NLS-1$
    }

    fault.setDetailMessage(buffer.toString(), true);

    return fault.getElement();
  }
View Full Code Here

      return result;
   }

   private Element createFault(Throwable e) {
      SOAPFault fault = new SOAPFault();

      fault.setDetailMessage(e.getMessage(), true);

      Element elem = null;

      try {
         elem = fault.getElement();
      } catch (SOAPException se) {
         LOGGER.warn("Unable to generate SOAP fault", se); //$NON-NLS-1$
      }

      return elem;
View Full Code Here

                // Error is thrown only when plugin is specified
                PluginProxy cvp = getConfig().getPluginProxy(
                        "CommonsValidatorPlugin"); //$NON-NLS-1$
                if (cvp != null) {
                    LOGGER.warn("Cannot validate event", e); //$NON-NLS-1$
                    throw new CommonsValidatorException(
                            "CommonsValidator missing from classpath, but specified in configuration"); //$NON-NLS-1$
                }
            }
        }
View Full Code Here

TOP

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

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.