Package javax.xml.bind

Examples of javax.xml.bind.JAXBException


    try {
      xmlNode.appendChild(skeleton.bindTo(this, child, jaxbObject, null, null));
    }
    catch (IOException e) {
      throw new JAXBException(e);
    }
  }
View Full Code Here


      QName qname = JAXBUtil.qnameFromNode(root);

      return new JAXBElement<T>(qname, declaredType, value);
    }
    catch (IOException e) {
      throw new JAXBException(e);
    }
}
View Full Code Here

    }

    Object jaxbObject = getJAXBNode(root);

    if (jaxbObject == null)
      throw new JAXBException(L.l("Unknown xmlNode"));

    ClassSkeleton skeleton = _context.findSkeletonForObject(jaxbObject);

    if (skeleton == null) {
      // we strip the JAXBElement when we bind objects, so rewrap
      // the object and try again
      QName qname = JAXBUtil.qnameFromNode(root);

      jaxbObject = new JAXBElement(qname, jaxbObject.getClass(), jaxbObject);

      skeleton = _context.findSkeletonForObject(jaxbObject);

      if (skeleton == null)
        throw new UnmarshalException(L.l("Type {0} is unknown to this context",
                                         jaxbObject.getClass()));
    }

    try {
      return skeleton.bindFrom(this, jaxbObject, new NodeIterator(root));
    }
    catch (IOException e) {
      throw new JAXBException(e);
    }
  }
View Full Code Here

    try {
      return skeleton.bindTo(this, xmlNode, jaxbObject, null, null);
    }
    catch (IOException e) {
      throw new JAXBException(e);
    }
  }
View Full Code Here

    }
    catch (JAXBException e) {
      throw e;
    }
    catch (Exception e) {
      throw new JAXBException(e);
    }
  }
View Full Code Here

      marshal(obj, out);

      out.flush();
    }
    catch (XMLStreamException e) {
      throw new JAXBException(e);
    }
  }
View Full Code Here

            extReg.mapExtensionTypes(Port.class, CorbaConstants.NE_CORBA_ADDRESS,
                                     org.apache.schemas.yoko.bindings.corba.AddressType.class);

        } catch (javax.xml.bind.JAXBException ex) {
            LOG.log(Level.SEVERE, "Failing to serialize/deserialize extensions", ex);
            throw new JAXBException(ex.getMessage());
        }
    }   
View Full Code Here

                                     TypeMappingType.class);
            extReg.mapExtensionTypes(Port.class, CorbaConstants.NE_CORBA_ADDRESS,
                                     org.apache.schemas.yoko.bindings.corba.AddressType.class);
        } catch (javax.xml.bind.JAXBException ex) {
            LOG.log(Level.SEVERE, "Failing to serialize/deserialize extensions", ex);
            throw new JAXBException(ex.getMessage());
        }
    }   
View Full Code Here

            extReg.mapExtensionTypes(Definition.class, CorbaConstants.NE_CORBA_TYPEMAPPING,
                                     TypeMappingType.class);
            extReg.mapExtensionTypes(Port.class, CorbaConstants.NE_CORBA_ADDRESS,
                                     org.apache.schemas.yoko.bindings.corba.AddressType.class);
        } catch (javax.xml.bind.JAXBException ex) {
            throw new JAXBException(ex.getMessage());
        }
    }   
View Full Code Here

           
            Object bridge = ctx.getClass().getMethod("createBridge", refClass).invoke(ctx, ref);
            return ReflectionInvokationHandler.createProxyWrapper(bridge,
                                                                  BridgeWrapper.class);
        } catch (Exception ex) {
            throw new JAXBException(ex);
        }
    }
View Full Code Here

TOP

Related Classes of javax.xml.bind.JAXBException

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.