Examples of UnmarshalException


Examples of javax.xml.bind.UnmarshalException

    DOMSerializer ds = new DOMSerializer();
    try {
      ds.serialize(pNode, uh);
    } catch (SAXException e) {
      if (e.getException() != null) {
        throw new UnmarshalException(e.getException());
      } else {
        throw new UnmarshalException(e);
      }
    }
    return uh.getResult();
  }
View Full Code Here

Examples of javax.xml.bind.UnmarshalException

  public Object unmarshal(Source pSource) throws JAXBException {
    if (pSource instanceof SAXSource) {
      SAXSource ss = (SAXSource) pSource;
      InputSource is = ss.getInputSource();
      if (is == null) {
        throw new UnmarshalException("The SAXResult doesn't have its InputSource set.");
      }
      XMLReader xr = ss.getXMLReader();
      if (xr == null) {
        return unmarshal(is);
      } else {
View Full Code Here

Examples of javax.xml.bind.UnmarshalException

   *   was not declared or creating the instance caused an exception.
   */
  public JMHandler getJMHandler(QName pQName) throws UnmarshalException {
    JMManager mgr = getManagerByQName(pQName);
    if (mgr == null) {
      throw new UnmarshalException("No manager configured for " + pQName);
    }
    Class c = mgr.getHandlerClass();
    if (c == null) {
      throw new UnmarshalException("No handler class configured for " + pQName);
    }
    try {
      return (JMHandler) c.newInstance();
    } catch (Exception e) {
      throw new UnmarshalException("Could not instantiate handler class " +
                                      c.getName(), e);
    }
  }
View Full Code Here

Examples of javax.xml.bind.UnmarshalException

   *   was not declared or creating the instance caused an exception.
   */
  public JMHandler getJMHandler(Class pElementInterface) throws UnmarshalException {
    Class c = getManagerByInterface(pElementInterface).getHandlerClass();
    if (c == null) {
      throw new UnmarshalException("No handler class configured for " +
                                    pElementInterface.getName());
    }
    try {
      return (JMHandler) c.newInstance();
    } catch (Exception e) {
      throw new UnmarshalException("Could not instantiate handler class " +
                                    c.getName(), e);
    }
  }
View Full Code Here

Examples of javax.xml.bind.UnmarshalException

  /** <p>Returns a new JMUnmarshaller.</p>
   */
  public JMUnmarshaller getJMUnmarshaller() throws UnmarshalException {
    Class c = getJMUnmarshallerClass();
    if (c == null) {
      throw new UnmarshalException("A JMUnmarshaller class is not set.");
    }
    try {
      return (JMUnmarshaller) c.newInstance();
    } catch (Exception e) {
      throw new UnmarshalException("Failed to instantiate JMUnmarshaller class " + c, e);
    }
  }
View Full Code Here

Examples of javax.xml.bind.UnmarshalException

   protected UnmarshalException createUnmarshalException(SAXException pException) {
     Exception ex = pException.getException();
     if (ex != null  &&  ex instanceof UnmarshalException) {
       return (UnmarshalException) ex;
     } else {
       return new UnmarshalException(pException);
     }
   }
View Full Code Here

Examples of javax.xml.bind.UnmarshalException

    throws JAXBException
  {
    Object obj = _valueMap.get(in);

    if (obj == null)
      throw new UnmarshalException(L.l("Invalid enum string: {0}", in));

    return obj;
  }
View Full Code Here

Examples of javax.xml.bind.UnmarshalException

  {
    try {
      return UUID.fromString(in);
    }
    catch (IllegalArgumentException e) {
      throw new UnmarshalException(e);
    }
  }
View Full Code Here

Examples of org.jboss.soa.esb.UnmarshalException

      {
          return Encoding.decodeToObject(content) ;
      }
            catch (final ClassNotFoundException cnfe)
            {
                throw new UnmarshalException("Failed to decode value", cnfe) ;
            }
            catch (final IOException ioe)
            {
                throw new UnmarshalException("Failed to decode value", ioe) ;
            }
  }
View Full Code Here

Examples of org.jboss.soa.esb.UnmarshalException

               
                return s;
            }
            catch (final NumberFormatException cnfe)
            {
                throw new UnmarshalException("Failed to decode value", cnfe) ;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.