Package org.eclipse.persistence.oxm.record

Examples of org.eclipse.persistence.oxm.record.XMLStreamWriterRecord


        if (object instanceof JAXBElement) {
            // use the JAXBElement's properties to populate an XMLRoot
            object = createXMLRootFromJAXBElement((JAXBElement) object);
        }
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }


            }
        }

        Object oxmObject = validateAndTransformIfNeeded(object); // xml bindings + object
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(oxmObject, record);
        } catch (BeanValidationException bve) {
            throw new MarshalException(bve.getMessage(), String.valueOf(bve.getErrorCode()), bve);
        } catch (Exception ex) {
            throw new MarshalException(ex);

    if (object instanceof JAXBElement) {
      // use the JAXBElement's properties to populate an XMLRoot
      object = createXMLRootFromJAXBElement((JAXBElement) object);
    }
      try {
          XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
          record.setMarshaller(this.xmlMarshaller);
          this.xmlMarshaller.marshal(object, record);
      } catch (Exception ex) {
          throw new MarshalException(ex);
      }
  }

        if (object instanceof JAXBElement) {
            // use the JAXBElement's properties to populate an XMLRoot
            object = createXMLRootFromJAXBElement((JAXBElement) object);
        }
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

        if (object instanceof JAXBElement) {
            // use the JAXBElement's properties to populate an XMLRoot
            object = createXMLRootFromJAXBElement((JAXBElement) object);
        }
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

            }
        }

        Object oxmObject = modifyObjectIfNeeded(object);
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(oxmObject, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }

            throw new IllegalArgumentException();
        }
        object = modifyObjectIfNeeded(object);
       
        try {
            XMLStreamWriterRecord record = new XMLStreamWriterRecord(streamWriter);
            record.setMarshaller(this.xmlMarshaller);
            this.xmlMarshaller.marshal(object, record);
        } catch (Exception ex) {
            throw new MarshalException(ex);
        }
    }

TOP

Related Classes of org.eclipse.persistence.oxm.record.XMLStreamWriterRecord

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.