Package org.jibx.runtime

Examples of org.jibx.runtime.IMarshaller


//        m_marshalContext.startTagNamespaces(s_wsdlNamespaceIndex, "definitions", indexes, prefs);
//        m_marshalContext.attribute(0, "targetNamespace", def.getWsdlNamespace());
//        m_marshalContext.closeStartContent();
       
        // marshal out remaining data
        IMarshaller mar = m_marshalContext.getMarshaller(Definitions.class.getName());
        mar.marshal(def, m_marshalContext);
        m_marshalContext.endDocument();
//       
//        // finish with close tag
//        m_marshalContext.endTag(s_wsdlNamespaceIndex, "definitions");
//        m_marshalContext.endDocument();
View Full Code Here


                if (clas == null) {
                    throw new JiBXException("Unable to load marshaller class " + mname);
                }
               
                // create and cache an instance of the class
                IMarshaller m = (IMarshaller)clas.newInstance();
                m_marshallers[index] = m;
               
            } catch (JiBXException e) {
                throw e;
            } catch (Exception e) {
View Full Code Here

                    System.arraycopy(m_nsIndexes, 0, copy, 0, m_nsIndexes.length);
                    m_context.startTagNamespaces(m_schemaIndex, node.name(), copy, m_nsPrefixes);
                } else {
                    m_context.startTagAttributes(m_schemaIndex, node.name());
                }
                IMarshaller marshaller = m_context.getMarshaller(node.getClass().getName());
                marshaller.marshal(node, m_context);
                m_context.closeStartContent();
               
                // check for separate class reference to determine content handling
                IClassHolder clas = (IClassHolder)m_componentClassMap.get(node);
                if (clas != null && (m_reference || node != m_component)) {
View Full Code Here

                    name = elementNamespacePrefix + ':' + name;
                }
                wrtr.startTagOpen(0, name);
               
                // marshal object representation (may include attributes) into element
                IMarshaller mrsh = ctx.getMarshaller(marshallerIndex,
                    bindingFactory.getMappedClasses()[marshallerIndex]);
                mrsh.marshal(dataObject, ctx);
                wrtr.endTag(0, name);
               
            } catch (IOException e) {
                throw new JiBXException("Error marshalling XML representation", e);
            }
View Full Code Here

        if (pos < 0) {
            throw new JiBXException(EXCEPTION_LOCALIZER.format(
                "marshaller-not-found", o.getClass().getName()));
        }

        IMarshaller marshaller =
            delegateContext.getMarshaller(pos, o.getClass().getName());

        marshaller.marshal(o, delegateContext);
        postprocessMarshallingContext(ctx);
    }
View Full Code Here

        if (pos < 0) {
            throw new JiBXException(EXCEPTION_LOCALIZER.format(
                "marshaller-not-found", o.getClass().getName()));
        }

        IMarshaller marshaller =
            delegateContext.getMarshaller(pos, getTargetClass().getName());

        marshaller.marshal(o, delegateContext);
    }
View Full Code Here

                    }
                    wrtr.startTagOpen(0, name);
                }
               
                // marshal object representation (may include attributes) into element
                IMarshaller mrsh = ctx.getMarshaller(marshallerIndex,
                                                     bindingFactory
                                                             .getMappedClasses()[marshallerIndex]);
                mrsh.marshal(dataObject, ctx);
                wrtr.endTag(nsidx, name);
            }
            ctx.getXmlWriter().flush();

        } catch (IOException e) {
View Full Code Here

                    }
                    wrtr.startTagOpen(0, name);
                }
               
                // marshal object representation (may include attributes) into element
                IMarshaller mrsh = ctx.getMarshaller(marshallerIndex,
                                                     bindingFactory
                                                             .getMappedClasses()[marshallerIndex]);
                mrsh.marshal(dataObject, ctx);
                wrtr.endTag(nsidx, name);
            }
            ctx.getXmlWriter().flush();

        } catch (IOException e) {
View Full Code Here

                    }
                    wrtr.startTagOpen(0, name);
                }
               
                // marshal object representation (may include attributes) into element
                IMarshaller mrsh = ctx.getMarshaller(marshallerName);
                mrsh.marshal(dataObject, ctx);
                wrtr.endTag(nsidx, name);
            }
            ctx.getXmlWriter().flush();

        } catch (IOException e) {
View Full Code Here

                    int[] indexes = new int[] { nsidx };
                    String[] prefixes = new String[] { "" };
                    wrtr.pushExtensionNamespaces(uris);
                    wrtr.startTagNamespaces(nsidx, elementName, indexes, prefixes);
                }
                IMarshaller mrsh = ctx.getMarshaller(marshallerIndex,
                    bindingFactory.getMappedClasses()[marshallerIndex]);
                mrsh.marshal(dataObject, ctx);
                wrtr.endTag(nsidx, elementName);
                if (!nsfound) {
                    wrtr.popExtensionNamespaces();
                }
            } catch (IOException e) {
View Full Code Here

TOP

Related Classes of org.jibx.runtime.IMarshaller

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.