Examples of marshalDocument()


Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

        try {
            IBindingFactory bfact = BindingDirectory
                .getFactory(ReportingConfig.class);
            IMarshallingContext mctx = bfact.createMarshallingContext();
            mctx.setIndent(4, null, ' ');
            mctx.marshalDocument(config, "UTF-8", null, stream);
        } catch (JiBXException e) {
            throw new RuntimeException(e);
        }
    }
}
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

                             Writer writer)
            throws JiBXException {

        IMarshallingContext uctx = getMarshallingContext();

        uctx.marshalDocument(configuration, "UTF-8", null, writer);
    }

    /**
     * Write the ProjectConfiguration to the output stream.
     *
 
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

                             OutputStream stream)
            throws JiBXException {

        IMarshallingContext uctx = getMarshallingContext();

        uctx.marshalDocument(configuration, "UTF-8", null, stream);
    }

    private IMarshallingContext getMarshallingContext()
            throws JiBXException {
        IBindingFactory bfact =
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

            try {
                IBindingFactory bfact = BindingDirectory
                    .getFactory(TestAnonymousMarshallerElement.class);
                IMarshallingContext mctx = bfact.createMarshallingContext();
                mctx.setIndent(4, null, ' ');
                mctx.marshalDocument(config, "UTF-8", null, stream);
            } catch (JiBXException e) {
                throw new RuntimeException(e);
            }
        }
    }   
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

            try {
                IBindingFactory bfact = BindingDirectory
                    .getFactory(TestDefaultMarshallerElement.class);
                IMarshallingContext mctx = bfact.createMarshallingContext();
                mctx.setIndent(4, null, ' ');
                mctx.marshalDocument(config, "UTF-8", null, stream);
            } catch (JiBXException e) {
                throw new RuntimeException(e);
            }
        }
    }   
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

 
  public void marshall(Object obj, OutputStream out, String encoding) {
    try {
      IMarshallingContext mctx = bindingFactory.createMarshallingContext();
      doConfigureIndentation(mctx);
      mctx.marshalDocument(obj, encoding, null, out);
    }
    catch(JiBXException ex) {
      throw new JibxAccessException(ex.getMessage(), ex);
    }
    finally {
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

      ByteArrayOutputStream bout = new ByteArrayOutputStream(5000);
      out = new OutputStreamWriter(bout, options.getEncoding());
      IBindingFactory bf = BindingDirectory.getFactory(JibxBinding.class);
      IMarshallingContext mctx = bf.createMarshallingContext();
      mctx.setIndent(1, null, '\t');
      mctx.marshalDocument(root, options.getEncoding(), null, out);
      return bout.toByteArray();

    } finally {
      if(out!=null) try { out.close(); } catch(Exception ex) {}
    }
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

        try {
            IBindingFactory factory = BindingDirectory.getFactory(DefaultSendRequest.class);
            IMarshallingContext context = factory.createMarshallingContext();

            // @todo any indentation, etc?
            context.marshalDocument(sendRequest, "UTF-8", null, out);
        } catch (JiBXException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

        try {
            IBindingFactory factory = BindingDirectory.getFactory(DefaultFailures.class);
            IMarshallingContext context = factory.createMarshallingContext();

            // @todo any indentation, etc?
            context.marshalDocument(failures, "UTF-8", null, out);
        } catch (JiBXException e) {
            throw new RuntimeException(e);
        }
    }
}
View Full Code Here

Examples of org.jibx.runtime.IMarshallingContext.marshalDocument()

         repositoryEntries.add(repository.getConfiguration());

         RepositoryServiceConfiguration newRepositoryServiceConfiguration =
            new RepositoryServiceConfiguration(repositoryService.getConfig().getDefaultRepositoryName(),
               repositoryEntries);
         mctx.marshalDocument(newRepositoryServiceConfiguration, "ISO-8859-1", null, saveStream);
         saveStream.close();

         // 1st unmarshal
         factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
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.