AbstractSerializer.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.message.context.utils.serializer;

  21. import org.openspcoop2.generic_project.exception.SerializerException;
  22. import org.openspcoop2.utils.beans.WriteToSerializerType;
  23. import org.openspcoop2.utils.xml.JaxbUtils;

  24. import org.openspcoop2.message.context.StringParameter;
  25. import org.openspcoop2.message.context.UrlParameters;
  26. import org.openspcoop2.message.context.ContentLength;
  27. import org.openspcoop2.message.context.TransportRequestContext;
  28. import org.openspcoop2.message.context.HeaderParameters;
  29. import org.openspcoop2.message.context.Credentials;
  30. import org.openspcoop2.message.context.SerializedParameter;
  31. import org.openspcoop2.message.context.SerializedContext;
  32. import org.openspcoop2.message.context.ForcedResponse;
  33. import org.openspcoop2.message.context.ForcedResponseMessage;
  34. import org.openspcoop2.message.context.TransportResponseContext;
  35. import org.openspcoop2.message.context.Soap;
  36. import org.openspcoop2.message.context.MessageContext;
  37. import org.openspcoop2.message.context.ContentTypeParameters;

  38. import java.io.ByteArrayOutputStream;
  39. import java.io.FileOutputStream;
  40. import java.io.OutputStream;
  41. import java.io.File;
  42. import java.lang.reflect.Method;

  43. import javax.xml.bind.JAXBElement;

  44. /**    
  45.  * XML Serializer of beans
  46.  *
  47.  * @author Poli Andrea (poli@link.it)
  48.  * @author $Author$
  49.  * @version $Rev$, $Date$
  50.  */
  51. public abstract class AbstractSerializer {


  52.     protected abstract WriteToSerializerType getType();
  53.    
  54.     protected void _objToXml(OutputStream out, Class<?> c, Object object,
  55.             boolean prettyPrint) throws Exception {
  56.         if(object instanceof JAXBElement){
  57.             // solo per il tipo WriteToSerializerType.JAXB
  58.             JaxbUtils.objToXml(out, c, object, prettyPrint);
  59.         }else{
  60.             Method m = c.getMethod("writeTo", OutputStream.class, WriteToSerializerType.class);
  61.             m.invoke(object, out, this.getType());
  62.         }
  63.     }
  64.    
  65.     protected void objToXml(OutputStream out,Class<?> c,Object object,boolean prettyPrint) throws SerializerException{
  66.         try{
  67.             this._objToXml(out, c, object, prettyPrint);
  68.         }catch(Exception e){
  69.             throw new SerializerException(e.getMessage(), e);
  70.         }
  71.         finally{
  72.             try{
  73.                 out.flush();
  74.             }catch(Exception e){
  75.                 // ignore
  76.             }
  77.         }
  78.     }
  79.     protected void objToXml(String fileName,Class<?> c,Object object,boolean prettyPrint) throws SerializerException{
  80.         try{
  81.             this.objToXml(new File(fileName), c, object, prettyPrint);
  82.         }catch(Exception e){
  83.             throw new SerializerException(e.getMessage(), e);
  84.         }
  85.     }
  86.     protected void objToXml(File file,Class<?> c,Object object,boolean prettyPrint) throws SerializerException{
  87.         FileOutputStream fout = null;
  88.         try{
  89.             fout = new FileOutputStream(file);
  90.             this._objToXml(fout, c, object, prettyPrint);
  91.         }catch(Exception e){
  92.             throw new SerializerException(e.getMessage(), e);
  93.         }
  94.         finally{
  95.             try{
  96.                 if(fout!=null){
  97.                     fout.flush();
  98.                 }
  99.             }catch(Exception e){
  100.                 // ignore
  101.             }
  102.             try{
  103.                 if(fout!=null){
  104.                     fout.close();
  105.                 }
  106.             }catch(Exception e){
  107.                 // ignore
  108.             }
  109.         }
  110.     }
  111.     protected ByteArrayOutputStream objToXml(Class<?> c,Object object,boolean prettyPrint) throws SerializerException{
  112.         ByteArrayOutputStream bout = null;
  113.         try{
  114.             bout = new ByteArrayOutputStream();
  115.             this._objToXml(bout, c, object, prettyPrint);
  116.         }catch(Exception e){
  117.             throw new SerializerException(e.getMessage(), e);
  118.         }
  119.         finally{
  120.             try{
  121.                 if(bout!=null){
  122.                     bout.flush();
  123.                 }
  124.             }catch(Exception e){
  125.                 // ignore
  126.             }
  127.             try{
  128.                 if(bout!=null){
  129.                     bout.close();
  130.                 }
  131.             }catch(Exception e){
  132.                 // ignore
  133.             }
  134.         }
  135.         return bout;
  136.     }




  137.     /*
  138.      =================================================================================
  139.      Object: string-parameter
  140.      =================================================================================
  141.     */
  142.    
  143.     /**
  144.      * Serialize to file system in <var>fileName</var> the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  145.      *
  146.      * @param fileName Xml file to serialize the object <var>stringParameter</var>
  147.      * @param stringParameter Object to be serialized in xml file <var>fileName</var>
  148.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  149.      */
  150.     public void write(String fileName,StringParameter stringParameter) throws SerializerException {
  151.         this.objToXml(fileName, StringParameter.class, stringParameter, false);
  152.     }
  153.     /**
  154.      * Serialize to file system in <var>fileName</var> the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  155.      *
  156.      * @param fileName Xml file to serialize the object <var>stringParameter</var>
  157.      * @param stringParameter Object to be serialized in xml file <var>fileName</var>
  158.      * @param prettyPrint if true output the XML with indenting
  159.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  160.      */
  161.     public void write(String fileName,StringParameter stringParameter,boolean prettyPrint) throws SerializerException {
  162.         this.objToXml(fileName, StringParameter.class, stringParameter, prettyPrint);
  163.     }
  164.    
  165.     /**
  166.      * Serialize to file system in <var>file</var> the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  167.      *
  168.      * @param file Xml file to serialize the object <var>stringParameter</var>
  169.      * @param stringParameter Object to be serialized in xml file <var>fileName</var>
  170.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  171.      */
  172.     public void write(File file,StringParameter stringParameter) throws SerializerException {
  173.         this.objToXml(file, StringParameter.class, stringParameter, false);
  174.     }
  175.     /**
  176.      * Serialize to file system in <var>file</var> the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  177.      *
  178.      * @param file Xml file to serialize the object <var>stringParameter</var>
  179.      * @param stringParameter Object to be serialized in xml file <var>fileName</var>
  180.      * @param prettyPrint if true output the XML with indenting
  181.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  182.      */
  183.     public void write(File file,StringParameter stringParameter,boolean prettyPrint) throws SerializerException {
  184.         this.objToXml(file, StringParameter.class, stringParameter, prettyPrint);
  185.     }
  186.    
  187.     /**
  188.      * Serialize to output stream <var>out</var> the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  189.      *
  190.      * @param out OutputStream to serialize the object <var>stringParameter</var>
  191.      * @param stringParameter Object to be serialized in xml file <var>fileName</var>
  192.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  193.      */
  194.     public void write(OutputStream out,StringParameter stringParameter) throws SerializerException {
  195.         this.objToXml(out, StringParameter.class, stringParameter, false);
  196.     }
  197.     /**
  198.      * Serialize to output stream <var>out</var> the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  199.      *
  200.      * @param out OutputStream to serialize the object <var>stringParameter</var>
  201.      * @param stringParameter Object to be serialized in xml file <var>fileName</var>
  202.      * @param prettyPrint if true output the XML with indenting
  203.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  204.      */
  205.     public void write(OutputStream out,StringParameter stringParameter,boolean prettyPrint) throws SerializerException {
  206.         this.objToXml(out, StringParameter.class, stringParameter, prettyPrint);
  207.     }
  208.            
  209.     /**
  210.      * Serialize to byte array the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  211.      *
  212.      * @param stringParameter Object to be serialized
  213.      * @return Object to be serialized in byte array
  214.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  215.      */
  216.     public byte[] toByteArray(StringParameter stringParameter) throws SerializerException {
  217.         return this.objToXml(StringParameter.class, stringParameter, false).toByteArray();
  218.     }
  219.     /**
  220.      * Serialize to byte array the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  221.      *
  222.      * @param stringParameter Object to be serialized
  223.      * @param prettyPrint if true output the XML with indenting
  224.      * @return Object to be serialized in byte array
  225.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  226.      */
  227.     public byte[] toByteArray(StringParameter stringParameter,boolean prettyPrint) throws SerializerException {
  228.         return this.objToXml(StringParameter.class, stringParameter, prettyPrint).toByteArray();
  229.     }
  230.    
  231.     /**
  232.      * Serialize to String the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  233.      *
  234.      * @param stringParameter Object to be serialized
  235.      * @return Object to be serialized as String
  236.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  237.      */
  238.     public String toString(StringParameter stringParameter) throws SerializerException {
  239.         return this.objToXml(StringParameter.class, stringParameter, false).toString();
  240.     }
  241.     /**
  242.      * Serialize to String the object <var>stringParameter</var> of type {@link org.openspcoop2.message.context.StringParameter}
  243.      *
  244.      * @param stringParameter Object to be serialized
  245.      * @param prettyPrint if true output the XML with indenting
  246.      * @return Object to be serialized as String
  247.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  248.      */
  249.     public String toString(StringParameter stringParameter,boolean prettyPrint) throws SerializerException {
  250.         return this.objToXml(StringParameter.class, stringParameter, prettyPrint).toString();
  251.     }
  252.    
  253.    
  254.    
  255.     /*
  256.      =================================================================================
  257.      Object: url-parameters
  258.      =================================================================================
  259.     */
  260.    
  261.     /**
  262.      * Serialize to file system in <var>fileName</var> the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  263.      *
  264.      * @param fileName Xml file to serialize the object <var>urlParameters</var>
  265.      * @param urlParameters Object to be serialized in xml file <var>fileName</var>
  266.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  267.      */
  268.     public void write(String fileName,UrlParameters urlParameters) throws SerializerException {
  269.         this.objToXml(fileName, UrlParameters.class, urlParameters, false);
  270.     }
  271.     /**
  272.      * Serialize to file system in <var>fileName</var> the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  273.      *
  274.      * @param fileName Xml file to serialize the object <var>urlParameters</var>
  275.      * @param urlParameters Object to be serialized in xml file <var>fileName</var>
  276.      * @param prettyPrint if true output the XML with indenting
  277.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  278.      */
  279.     public void write(String fileName,UrlParameters urlParameters,boolean prettyPrint) throws SerializerException {
  280.         this.objToXml(fileName, UrlParameters.class, urlParameters, prettyPrint);
  281.     }
  282.    
  283.     /**
  284.      * Serialize to file system in <var>file</var> the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  285.      *
  286.      * @param file Xml file to serialize the object <var>urlParameters</var>
  287.      * @param urlParameters Object to be serialized in xml file <var>fileName</var>
  288.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  289.      */
  290.     public void write(File file,UrlParameters urlParameters) throws SerializerException {
  291.         this.objToXml(file, UrlParameters.class, urlParameters, false);
  292.     }
  293.     /**
  294.      * Serialize to file system in <var>file</var> the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  295.      *
  296.      * @param file Xml file to serialize the object <var>urlParameters</var>
  297.      * @param urlParameters Object to be serialized in xml file <var>fileName</var>
  298.      * @param prettyPrint if true output the XML with indenting
  299.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  300.      */
  301.     public void write(File file,UrlParameters urlParameters,boolean prettyPrint) throws SerializerException {
  302.         this.objToXml(file, UrlParameters.class, urlParameters, prettyPrint);
  303.     }
  304.    
  305.     /**
  306.      * Serialize to output stream <var>out</var> the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  307.      *
  308.      * @param out OutputStream to serialize the object <var>urlParameters</var>
  309.      * @param urlParameters Object to be serialized in xml file <var>fileName</var>
  310.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  311.      */
  312.     public void write(OutputStream out,UrlParameters urlParameters) throws SerializerException {
  313.         this.objToXml(out, UrlParameters.class, urlParameters, false);
  314.     }
  315.     /**
  316.      * Serialize to output stream <var>out</var> the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  317.      *
  318.      * @param out OutputStream to serialize the object <var>urlParameters</var>
  319.      * @param urlParameters Object to be serialized in xml file <var>fileName</var>
  320.      * @param prettyPrint if true output the XML with indenting
  321.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  322.      */
  323.     public void write(OutputStream out,UrlParameters urlParameters,boolean prettyPrint) throws SerializerException {
  324.         this.objToXml(out, UrlParameters.class, urlParameters, prettyPrint);
  325.     }
  326.            
  327.     /**
  328.      * Serialize to byte array the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  329.      *
  330.      * @param urlParameters Object to be serialized
  331.      * @return Object to be serialized in byte array
  332.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  333.      */
  334.     public byte[] toByteArray(UrlParameters urlParameters) throws SerializerException {
  335.         return this.objToXml(UrlParameters.class, urlParameters, false).toByteArray();
  336.     }
  337.     /**
  338.      * Serialize to byte array the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  339.      *
  340.      * @param urlParameters Object to be serialized
  341.      * @param prettyPrint if true output the XML with indenting
  342.      * @return Object to be serialized in byte array
  343.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  344.      */
  345.     public byte[] toByteArray(UrlParameters urlParameters,boolean prettyPrint) throws SerializerException {
  346.         return this.objToXml(UrlParameters.class, urlParameters, prettyPrint).toByteArray();
  347.     }
  348.    
  349.     /**
  350.      * Serialize to String the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  351.      *
  352.      * @param urlParameters Object to be serialized
  353.      * @return Object to be serialized as String
  354.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  355.      */
  356.     public String toString(UrlParameters urlParameters) throws SerializerException {
  357.         return this.objToXml(UrlParameters.class, urlParameters, false).toString();
  358.     }
  359.     /**
  360.      * Serialize to String the object <var>urlParameters</var> of type {@link org.openspcoop2.message.context.UrlParameters}
  361.      *
  362.      * @param urlParameters Object to be serialized
  363.      * @param prettyPrint if true output the XML with indenting
  364.      * @return Object to be serialized as String
  365.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  366.      */
  367.     public String toString(UrlParameters urlParameters,boolean prettyPrint) throws SerializerException {
  368.         return this.objToXml(UrlParameters.class, urlParameters, prettyPrint).toString();
  369.     }
  370.    
  371.    
  372.    
  373.     /*
  374.      =================================================================================
  375.      Object: content-length
  376.      =================================================================================
  377.     */
  378.    
  379.     /**
  380.      * Serialize to file system in <var>fileName</var> the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  381.      *
  382.      * @param fileName Xml file to serialize the object <var>contentLength</var>
  383.      * @param contentLength Object to be serialized in xml file <var>fileName</var>
  384.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  385.      */
  386.     public void write(String fileName,ContentLength contentLength) throws SerializerException {
  387.         this.objToXml(fileName, ContentLength.class, contentLength, false);
  388.     }
  389.     /**
  390.      * Serialize to file system in <var>fileName</var> the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  391.      *
  392.      * @param fileName Xml file to serialize the object <var>contentLength</var>
  393.      * @param contentLength Object to be serialized in xml file <var>fileName</var>
  394.      * @param prettyPrint if true output the XML with indenting
  395.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  396.      */
  397.     public void write(String fileName,ContentLength contentLength,boolean prettyPrint) throws SerializerException {
  398.         this.objToXml(fileName, ContentLength.class, contentLength, prettyPrint);
  399.     }
  400.    
  401.     /**
  402.      * Serialize to file system in <var>file</var> the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  403.      *
  404.      * @param file Xml file to serialize the object <var>contentLength</var>
  405.      * @param contentLength Object to be serialized in xml file <var>fileName</var>
  406.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  407.      */
  408.     public void write(File file,ContentLength contentLength) throws SerializerException {
  409.         this.objToXml(file, ContentLength.class, contentLength, false);
  410.     }
  411.     /**
  412.      * Serialize to file system in <var>file</var> the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  413.      *
  414.      * @param file Xml file to serialize the object <var>contentLength</var>
  415.      * @param contentLength Object to be serialized in xml file <var>fileName</var>
  416.      * @param prettyPrint if true output the XML with indenting
  417.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  418.      */
  419.     public void write(File file,ContentLength contentLength,boolean prettyPrint) throws SerializerException {
  420.         this.objToXml(file, ContentLength.class, contentLength, prettyPrint);
  421.     }
  422.    
  423.     /**
  424.      * Serialize to output stream <var>out</var> the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  425.      *
  426.      * @param out OutputStream to serialize the object <var>contentLength</var>
  427.      * @param contentLength Object to be serialized in xml file <var>fileName</var>
  428.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  429.      */
  430.     public void write(OutputStream out,ContentLength contentLength) throws SerializerException {
  431.         this.objToXml(out, ContentLength.class, contentLength, false);
  432.     }
  433.     /**
  434.      * Serialize to output stream <var>out</var> the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  435.      *
  436.      * @param out OutputStream to serialize the object <var>contentLength</var>
  437.      * @param contentLength Object to be serialized in xml file <var>fileName</var>
  438.      * @param prettyPrint if true output the XML with indenting
  439.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  440.      */
  441.     public void write(OutputStream out,ContentLength contentLength,boolean prettyPrint) throws SerializerException {
  442.         this.objToXml(out, ContentLength.class, contentLength, prettyPrint);
  443.     }
  444.            
  445.     /**
  446.      * Serialize to byte array the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  447.      *
  448.      * @param contentLength Object to be serialized
  449.      * @return Object to be serialized in byte array
  450.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  451.      */
  452.     public byte[] toByteArray(ContentLength contentLength) throws SerializerException {
  453.         return this.objToXml(ContentLength.class, contentLength, false).toByteArray();
  454.     }
  455.     /**
  456.      * Serialize to byte array the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  457.      *
  458.      * @param contentLength Object to be serialized
  459.      * @param prettyPrint if true output the XML with indenting
  460.      * @return Object to be serialized in byte array
  461.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  462.      */
  463.     public byte[] toByteArray(ContentLength contentLength,boolean prettyPrint) throws SerializerException {
  464.         return this.objToXml(ContentLength.class, contentLength, prettyPrint).toByteArray();
  465.     }
  466.    
  467.     /**
  468.      * Serialize to String the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  469.      *
  470.      * @param contentLength Object to be serialized
  471.      * @return Object to be serialized as String
  472.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  473.      */
  474.     public String toString(ContentLength contentLength) throws SerializerException {
  475.         return this.objToXml(ContentLength.class, contentLength, false).toString();
  476.     }
  477.     /**
  478.      * Serialize to String the object <var>contentLength</var> of type {@link org.openspcoop2.message.context.ContentLength}
  479.      *
  480.      * @param contentLength Object to be serialized
  481.      * @param prettyPrint if true output the XML with indenting
  482.      * @return Object to be serialized as String
  483.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  484.      */
  485.     public String toString(ContentLength contentLength,boolean prettyPrint) throws SerializerException {
  486.         return this.objToXml(ContentLength.class, contentLength, prettyPrint).toString();
  487.     }
  488.    
  489.    
  490.    
  491.     /*
  492.      =================================================================================
  493.      Object: transport-request-context
  494.      =================================================================================
  495.     */
  496.    
  497.     /**
  498.      * Serialize to file system in <var>fileName</var> the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  499.      *
  500.      * @param fileName Xml file to serialize the object <var>transportRequestContext</var>
  501.      * @param transportRequestContext Object to be serialized in xml file <var>fileName</var>
  502.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  503.      */
  504.     public void write(String fileName,TransportRequestContext transportRequestContext) throws SerializerException {
  505.         this.objToXml(fileName, TransportRequestContext.class, transportRequestContext, false);
  506.     }
  507.     /**
  508.      * Serialize to file system in <var>fileName</var> the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  509.      *
  510.      * @param fileName Xml file to serialize the object <var>transportRequestContext</var>
  511.      * @param transportRequestContext Object to be serialized in xml file <var>fileName</var>
  512.      * @param prettyPrint if true output the XML with indenting
  513.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  514.      */
  515.     public void write(String fileName,TransportRequestContext transportRequestContext,boolean prettyPrint) throws SerializerException {
  516.         this.objToXml(fileName, TransportRequestContext.class, transportRequestContext, prettyPrint);
  517.     }
  518.    
  519.     /**
  520.      * Serialize to file system in <var>file</var> the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  521.      *
  522.      * @param file Xml file to serialize the object <var>transportRequestContext</var>
  523.      * @param transportRequestContext Object to be serialized in xml file <var>fileName</var>
  524.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  525.      */
  526.     public void write(File file,TransportRequestContext transportRequestContext) throws SerializerException {
  527.         this.objToXml(file, TransportRequestContext.class, transportRequestContext, false);
  528.     }
  529.     /**
  530.      * Serialize to file system in <var>file</var> the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  531.      *
  532.      * @param file Xml file to serialize the object <var>transportRequestContext</var>
  533.      * @param transportRequestContext Object to be serialized in xml file <var>fileName</var>
  534.      * @param prettyPrint if true output the XML with indenting
  535.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  536.      */
  537.     public void write(File file,TransportRequestContext transportRequestContext,boolean prettyPrint) throws SerializerException {
  538.         this.objToXml(file, TransportRequestContext.class, transportRequestContext, prettyPrint);
  539.     }
  540.    
  541.     /**
  542.      * Serialize to output stream <var>out</var> the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  543.      *
  544.      * @param out OutputStream to serialize the object <var>transportRequestContext</var>
  545.      * @param transportRequestContext Object to be serialized in xml file <var>fileName</var>
  546.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  547.      */
  548.     public void write(OutputStream out,TransportRequestContext transportRequestContext) throws SerializerException {
  549.         this.objToXml(out, TransportRequestContext.class, transportRequestContext, false);
  550.     }
  551.     /**
  552.      * Serialize to output stream <var>out</var> the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  553.      *
  554.      * @param out OutputStream to serialize the object <var>transportRequestContext</var>
  555.      * @param transportRequestContext Object to be serialized in xml file <var>fileName</var>
  556.      * @param prettyPrint if true output the XML with indenting
  557.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  558.      */
  559.     public void write(OutputStream out,TransportRequestContext transportRequestContext,boolean prettyPrint) throws SerializerException {
  560.         this.objToXml(out, TransportRequestContext.class, transportRequestContext, prettyPrint);
  561.     }
  562.            
  563.     /**
  564.      * Serialize to byte array the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  565.      *
  566.      * @param transportRequestContext Object to be serialized
  567.      * @return Object to be serialized in byte array
  568.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  569.      */
  570.     public byte[] toByteArray(TransportRequestContext transportRequestContext) throws SerializerException {
  571.         return this.objToXml(TransportRequestContext.class, transportRequestContext, false).toByteArray();
  572.     }
  573.     /**
  574.      * Serialize to byte array the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  575.      *
  576.      * @param transportRequestContext Object to be serialized
  577.      * @param prettyPrint if true output the XML with indenting
  578.      * @return Object to be serialized in byte array
  579.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  580.      */
  581.     public byte[] toByteArray(TransportRequestContext transportRequestContext,boolean prettyPrint) throws SerializerException {
  582.         return this.objToXml(TransportRequestContext.class, transportRequestContext, prettyPrint).toByteArray();
  583.     }
  584.    
  585.     /**
  586.      * Serialize to String the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  587.      *
  588.      * @param transportRequestContext Object to be serialized
  589.      * @return Object to be serialized as String
  590.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  591.      */
  592.     public String toString(TransportRequestContext transportRequestContext) throws SerializerException {
  593.         return this.objToXml(TransportRequestContext.class, transportRequestContext, false).toString();
  594.     }
  595.     /**
  596.      * Serialize to String the object <var>transportRequestContext</var> of type {@link org.openspcoop2.message.context.TransportRequestContext}
  597.      *
  598.      * @param transportRequestContext Object to be serialized
  599.      * @param prettyPrint if true output the XML with indenting
  600.      * @return Object to be serialized as String
  601.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  602.      */
  603.     public String toString(TransportRequestContext transportRequestContext,boolean prettyPrint) throws SerializerException {
  604.         return this.objToXml(TransportRequestContext.class, transportRequestContext, prettyPrint).toString();
  605.     }
  606.    
  607.    
  608.    
  609.     /*
  610.      =================================================================================
  611.      Object: header-parameters
  612.      =================================================================================
  613.     */
  614.    
  615.     /**
  616.      * Serialize to file system in <var>fileName</var> the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  617.      *
  618.      * @param fileName Xml file to serialize the object <var>headerParameters</var>
  619.      * @param headerParameters Object to be serialized in xml file <var>fileName</var>
  620.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  621.      */
  622.     public void write(String fileName,HeaderParameters headerParameters) throws SerializerException {
  623.         this.objToXml(fileName, HeaderParameters.class, headerParameters, false);
  624.     }
  625.     /**
  626.      * Serialize to file system in <var>fileName</var> the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  627.      *
  628.      * @param fileName Xml file to serialize the object <var>headerParameters</var>
  629.      * @param headerParameters Object to be serialized in xml file <var>fileName</var>
  630.      * @param prettyPrint if true output the XML with indenting
  631.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  632.      */
  633.     public void write(String fileName,HeaderParameters headerParameters,boolean prettyPrint) throws SerializerException {
  634.         this.objToXml(fileName, HeaderParameters.class, headerParameters, prettyPrint);
  635.     }
  636.    
  637.     /**
  638.      * Serialize to file system in <var>file</var> the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  639.      *
  640.      * @param file Xml file to serialize the object <var>headerParameters</var>
  641.      * @param headerParameters Object to be serialized in xml file <var>fileName</var>
  642.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  643.      */
  644.     public void write(File file,HeaderParameters headerParameters) throws SerializerException {
  645.         this.objToXml(file, HeaderParameters.class, headerParameters, false);
  646.     }
  647.     /**
  648.      * Serialize to file system in <var>file</var> the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  649.      *
  650.      * @param file Xml file to serialize the object <var>headerParameters</var>
  651.      * @param headerParameters Object to be serialized in xml file <var>fileName</var>
  652.      * @param prettyPrint if true output the XML with indenting
  653.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  654.      */
  655.     public void write(File file,HeaderParameters headerParameters,boolean prettyPrint) throws SerializerException {
  656.         this.objToXml(file, HeaderParameters.class, headerParameters, prettyPrint);
  657.     }
  658.    
  659.     /**
  660.      * Serialize to output stream <var>out</var> the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  661.      *
  662.      * @param out OutputStream to serialize the object <var>headerParameters</var>
  663.      * @param headerParameters Object to be serialized in xml file <var>fileName</var>
  664.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  665.      */
  666.     public void write(OutputStream out,HeaderParameters headerParameters) throws SerializerException {
  667.         this.objToXml(out, HeaderParameters.class, headerParameters, false);
  668.     }
  669.     /**
  670.      * Serialize to output stream <var>out</var> the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  671.      *
  672.      * @param out OutputStream to serialize the object <var>headerParameters</var>
  673.      * @param headerParameters Object to be serialized in xml file <var>fileName</var>
  674.      * @param prettyPrint if true output the XML with indenting
  675.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  676.      */
  677.     public void write(OutputStream out,HeaderParameters headerParameters,boolean prettyPrint) throws SerializerException {
  678.         this.objToXml(out, HeaderParameters.class, headerParameters, prettyPrint);
  679.     }
  680.            
  681.     /**
  682.      * Serialize to byte array the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  683.      *
  684.      * @param headerParameters Object to be serialized
  685.      * @return Object to be serialized in byte array
  686.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  687.      */
  688.     public byte[] toByteArray(HeaderParameters headerParameters) throws SerializerException {
  689.         return this.objToXml(HeaderParameters.class, headerParameters, false).toByteArray();
  690.     }
  691.     /**
  692.      * Serialize to byte array the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  693.      *
  694.      * @param headerParameters Object to be serialized
  695.      * @param prettyPrint if true output the XML with indenting
  696.      * @return Object to be serialized in byte array
  697.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  698.      */
  699.     public byte[] toByteArray(HeaderParameters headerParameters,boolean prettyPrint) throws SerializerException {
  700.         return this.objToXml(HeaderParameters.class, headerParameters, prettyPrint).toByteArray();
  701.     }
  702.    
  703.     /**
  704.      * Serialize to String the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  705.      *
  706.      * @param headerParameters Object to be serialized
  707.      * @return Object to be serialized as String
  708.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  709.      */
  710.     public String toString(HeaderParameters headerParameters) throws SerializerException {
  711.         return this.objToXml(HeaderParameters.class, headerParameters, false).toString();
  712.     }
  713.     /**
  714.      * Serialize to String the object <var>headerParameters</var> of type {@link org.openspcoop2.message.context.HeaderParameters}
  715.      *
  716.      * @param headerParameters Object to be serialized
  717.      * @param prettyPrint if true output the XML with indenting
  718.      * @return Object to be serialized as String
  719.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  720.      */
  721.     public String toString(HeaderParameters headerParameters,boolean prettyPrint) throws SerializerException {
  722.         return this.objToXml(HeaderParameters.class, headerParameters, prettyPrint).toString();
  723.     }
  724.    
  725.    
  726.    
  727.     /*
  728.      =================================================================================
  729.      Object: credentials
  730.      =================================================================================
  731.     */
  732.    
  733.     /**
  734.      * Serialize to file system in <var>fileName</var> the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  735.      *
  736.      * @param fileName Xml file to serialize the object <var>credentials</var>
  737.      * @param credentials Object to be serialized in xml file <var>fileName</var>
  738.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  739.      */
  740.     public void write(String fileName,Credentials credentials) throws SerializerException {
  741.         this.objToXml(fileName, Credentials.class, credentials, false);
  742.     }
  743.     /**
  744.      * Serialize to file system in <var>fileName</var> the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  745.      *
  746.      * @param fileName Xml file to serialize the object <var>credentials</var>
  747.      * @param credentials Object to be serialized in xml file <var>fileName</var>
  748.      * @param prettyPrint if true output the XML with indenting
  749.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  750.      */
  751.     public void write(String fileName,Credentials credentials,boolean prettyPrint) throws SerializerException {
  752.         this.objToXml(fileName, Credentials.class, credentials, prettyPrint);
  753.     }
  754.    
  755.     /**
  756.      * Serialize to file system in <var>file</var> the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  757.      *
  758.      * @param file Xml file to serialize the object <var>credentials</var>
  759.      * @param credentials Object to be serialized in xml file <var>fileName</var>
  760.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  761.      */
  762.     public void write(File file,Credentials credentials) throws SerializerException {
  763.         this.objToXml(file, Credentials.class, credentials, false);
  764.     }
  765.     /**
  766.      * Serialize to file system in <var>file</var> the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  767.      *
  768.      * @param file Xml file to serialize the object <var>credentials</var>
  769.      * @param credentials Object to be serialized in xml file <var>fileName</var>
  770.      * @param prettyPrint if true output the XML with indenting
  771.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  772.      */
  773.     public void write(File file,Credentials credentials,boolean prettyPrint) throws SerializerException {
  774.         this.objToXml(file, Credentials.class, credentials, prettyPrint);
  775.     }
  776.    
  777.     /**
  778.      * Serialize to output stream <var>out</var> the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  779.      *
  780.      * @param out OutputStream to serialize the object <var>credentials</var>
  781.      * @param credentials Object to be serialized in xml file <var>fileName</var>
  782.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  783.      */
  784.     public void write(OutputStream out,Credentials credentials) throws SerializerException {
  785.         this.objToXml(out, Credentials.class, credentials, false);
  786.     }
  787.     /**
  788.      * Serialize to output stream <var>out</var> the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  789.      *
  790.      * @param out OutputStream to serialize the object <var>credentials</var>
  791.      * @param credentials Object to be serialized in xml file <var>fileName</var>
  792.      * @param prettyPrint if true output the XML with indenting
  793.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  794.      */
  795.     public void write(OutputStream out,Credentials credentials,boolean prettyPrint) throws SerializerException {
  796.         this.objToXml(out, Credentials.class, credentials, prettyPrint);
  797.     }
  798.            
  799.     /**
  800.      * Serialize to byte array the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  801.      *
  802.      * @param credentials Object to be serialized
  803.      * @return Object to be serialized in byte array
  804.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  805.      */
  806.     public byte[] toByteArray(Credentials credentials) throws SerializerException {
  807.         return this.objToXml(Credentials.class, credentials, false).toByteArray();
  808.     }
  809.     /**
  810.      * Serialize to byte array the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  811.      *
  812.      * @param credentials Object to be serialized
  813.      * @param prettyPrint if true output the XML with indenting
  814.      * @return Object to be serialized in byte array
  815.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  816.      */
  817.     public byte[] toByteArray(Credentials credentials,boolean prettyPrint) throws SerializerException {
  818.         return this.objToXml(Credentials.class, credentials, prettyPrint).toByteArray();
  819.     }
  820.    
  821.     /**
  822.      * Serialize to String the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  823.      *
  824.      * @param credentials Object to be serialized
  825.      * @return Object to be serialized as String
  826.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  827.      */
  828.     public String toString(Credentials credentials) throws SerializerException {
  829.         return this.objToXml(Credentials.class, credentials, false).toString();
  830.     }
  831.     /**
  832.      * Serialize to String the object <var>credentials</var> of type {@link org.openspcoop2.message.context.Credentials}
  833.      *
  834.      * @param credentials Object to be serialized
  835.      * @param prettyPrint if true output the XML with indenting
  836.      * @return Object to be serialized as String
  837.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  838.      */
  839.     public String toString(Credentials credentials,boolean prettyPrint) throws SerializerException {
  840.         return this.objToXml(Credentials.class, credentials, prettyPrint).toString();
  841.     }
  842.    
  843.    
  844.    
  845.     /*
  846.      =================================================================================
  847.      Object: serialized-parameter
  848.      =================================================================================
  849.     */
  850.    
  851.     /**
  852.      * Serialize to file system in <var>fileName</var> the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  853.      *
  854.      * @param fileName Xml file to serialize the object <var>serializedParameter</var>
  855.      * @param serializedParameter Object to be serialized in xml file <var>fileName</var>
  856.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  857.      */
  858.     public void write(String fileName,SerializedParameter serializedParameter) throws SerializerException {
  859.         this.objToXml(fileName, SerializedParameter.class, serializedParameter, false);
  860.     }
  861.     /**
  862.      * Serialize to file system in <var>fileName</var> the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  863.      *
  864.      * @param fileName Xml file to serialize the object <var>serializedParameter</var>
  865.      * @param serializedParameter Object to be serialized in xml file <var>fileName</var>
  866.      * @param prettyPrint if true output the XML with indenting
  867.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  868.      */
  869.     public void write(String fileName,SerializedParameter serializedParameter,boolean prettyPrint) throws SerializerException {
  870.         this.objToXml(fileName, SerializedParameter.class, serializedParameter, prettyPrint);
  871.     }
  872.    
  873.     /**
  874.      * Serialize to file system in <var>file</var> the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  875.      *
  876.      * @param file Xml file to serialize the object <var>serializedParameter</var>
  877.      * @param serializedParameter Object to be serialized in xml file <var>fileName</var>
  878.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  879.      */
  880.     public void write(File file,SerializedParameter serializedParameter) throws SerializerException {
  881.         this.objToXml(file, SerializedParameter.class, serializedParameter, false);
  882.     }
  883.     /**
  884.      * Serialize to file system in <var>file</var> the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  885.      *
  886.      * @param file Xml file to serialize the object <var>serializedParameter</var>
  887.      * @param serializedParameter Object to be serialized in xml file <var>fileName</var>
  888.      * @param prettyPrint if true output the XML with indenting
  889.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  890.      */
  891.     public void write(File file,SerializedParameter serializedParameter,boolean prettyPrint) throws SerializerException {
  892.         this.objToXml(file, SerializedParameter.class, serializedParameter, prettyPrint);
  893.     }
  894.    
  895.     /**
  896.      * Serialize to output stream <var>out</var> the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  897.      *
  898.      * @param out OutputStream to serialize the object <var>serializedParameter</var>
  899.      * @param serializedParameter Object to be serialized in xml file <var>fileName</var>
  900.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  901.      */
  902.     public void write(OutputStream out,SerializedParameter serializedParameter) throws SerializerException {
  903.         this.objToXml(out, SerializedParameter.class, serializedParameter, false);
  904.     }
  905.     /**
  906.      * Serialize to output stream <var>out</var> the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  907.      *
  908.      * @param out OutputStream to serialize the object <var>serializedParameter</var>
  909.      * @param serializedParameter Object to be serialized in xml file <var>fileName</var>
  910.      * @param prettyPrint if true output the XML with indenting
  911.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  912.      */
  913.     public void write(OutputStream out,SerializedParameter serializedParameter,boolean prettyPrint) throws SerializerException {
  914.         this.objToXml(out, SerializedParameter.class, serializedParameter, prettyPrint);
  915.     }
  916.            
  917.     /**
  918.      * Serialize to byte array the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  919.      *
  920.      * @param serializedParameter Object to be serialized
  921.      * @return Object to be serialized in byte array
  922.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  923.      */
  924.     public byte[] toByteArray(SerializedParameter serializedParameter) throws SerializerException {
  925.         return this.objToXml(SerializedParameter.class, serializedParameter, false).toByteArray();
  926.     }
  927.     /**
  928.      * Serialize to byte array the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  929.      *
  930.      * @param serializedParameter Object to be serialized
  931.      * @param prettyPrint if true output the XML with indenting
  932.      * @return Object to be serialized in byte array
  933.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  934.      */
  935.     public byte[] toByteArray(SerializedParameter serializedParameter,boolean prettyPrint) throws SerializerException {
  936.         return this.objToXml(SerializedParameter.class, serializedParameter, prettyPrint).toByteArray();
  937.     }
  938.    
  939.     /**
  940.      * Serialize to String the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  941.      *
  942.      * @param serializedParameter Object to be serialized
  943.      * @return Object to be serialized as String
  944.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  945.      */
  946.     public String toString(SerializedParameter serializedParameter) throws SerializerException {
  947.         return this.objToXml(SerializedParameter.class, serializedParameter, false).toString();
  948.     }
  949.     /**
  950.      * Serialize to String the object <var>serializedParameter</var> of type {@link org.openspcoop2.message.context.SerializedParameter}
  951.      *
  952.      * @param serializedParameter Object to be serialized
  953.      * @param prettyPrint if true output the XML with indenting
  954.      * @return Object to be serialized as String
  955.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  956.      */
  957.     public String toString(SerializedParameter serializedParameter,boolean prettyPrint) throws SerializerException {
  958.         return this.objToXml(SerializedParameter.class, serializedParameter, prettyPrint).toString();
  959.     }
  960.    
  961.    
  962.    
  963.     /*
  964.      =================================================================================
  965.      Object: serialized-context
  966.      =================================================================================
  967.     */
  968.    
  969.     /**
  970.      * Serialize to file system in <var>fileName</var> the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  971.      *
  972.      * @param fileName Xml file to serialize the object <var>serializedContext</var>
  973.      * @param serializedContext Object to be serialized in xml file <var>fileName</var>
  974.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  975.      */
  976.     public void write(String fileName,SerializedContext serializedContext) throws SerializerException {
  977.         this.objToXml(fileName, SerializedContext.class, serializedContext, false);
  978.     }
  979.     /**
  980.      * Serialize to file system in <var>fileName</var> the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  981.      *
  982.      * @param fileName Xml file to serialize the object <var>serializedContext</var>
  983.      * @param serializedContext Object to be serialized in xml file <var>fileName</var>
  984.      * @param prettyPrint if true output the XML with indenting
  985.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  986.      */
  987.     public void write(String fileName,SerializedContext serializedContext,boolean prettyPrint) throws SerializerException {
  988.         this.objToXml(fileName, SerializedContext.class, serializedContext, prettyPrint);
  989.     }
  990.    
  991.     /**
  992.      * Serialize to file system in <var>file</var> the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  993.      *
  994.      * @param file Xml file to serialize the object <var>serializedContext</var>
  995.      * @param serializedContext Object to be serialized in xml file <var>fileName</var>
  996.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  997.      */
  998.     public void write(File file,SerializedContext serializedContext) throws SerializerException {
  999.         this.objToXml(file, SerializedContext.class, serializedContext, false);
  1000.     }
  1001.     /**
  1002.      * Serialize to file system in <var>file</var> the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  1003.      *
  1004.      * @param file Xml file to serialize the object <var>serializedContext</var>
  1005.      * @param serializedContext Object to be serialized in xml file <var>fileName</var>
  1006.      * @param prettyPrint if true output the XML with indenting
  1007.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1008.      */
  1009.     public void write(File file,SerializedContext serializedContext,boolean prettyPrint) throws SerializerException {
  1010.         this.objToXml(file, SerializedContext.class, serializedContext, prettyPrint);
  1011.     }
  1012.    
  1013.     /**
  1014.      * Serialize to output stream <var>out</var> the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  1015.      *
  1016.      * @param out OutputStream to serialize the object <var>serializedContext</var>
  1017.      * @param serializedContext Object to be serialized in xml file <var>fileName</var>
  1018.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1019.      */
  1020.     public void write(OutputStream out,SerializedContext serializedContext) throws SerializerException {
  1021.         this.objToXml(out, SerializedContext.class, serializedContext, false);
  1022.     }
  1023.     /**
  1024.      * Serialize to output stream <var>out</var> the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  1025.      *
  1026.      * @param out OutputStream to serialize the object <var>serializedContext</var>
  1027.      * @param serializedContext Object to be serialized in xml file <var>fileName</var>
  1028.      * @param prettyPrint if true output the XML with indenting
  1029.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1030.      */
  1031.     public void write(OutputStream out,SerializedContext serializedContext,boolean prettyPrint) throws SerializerException {
  1032.         this.objToXml(out, SerializedContext.class, serializedContext, prettyPrint);
  1033.     }
  1034.            
  1035.     /**
  1036.      * Serialize to byte array the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  1037.      *
  1038.      * @param serializedContext Object to be serialized
  1039.      * @return Object to be serialized in byte array
  1040.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1041.      */
  1042.     public byte[] toByteArray(SerializedContext serializedContext) throws SerializerException {
  1043.         return this.objToXml(SerializedContext.class, serializedContext, false).toByteArray();
  1044.     }
  1045.     /**
  1046.      * Serialize to byte array the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  1047.      *
  1048.      * @param serializedContext Object to be serialized
  1049.      * @param prettyPrint if true output the XML with indenting
  1050.      * @return Object to be serialized in byte array
  1051.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1052.      */
  1053.     public byte[] toByteArray(SerializedContext serializedContext,boolean prettyPrint) throws SerializerException {
  1054.         return this.objToXml(SerializedContext.class, serializedContext, prettyPrint).toByteArray();
  1055.     }
  1056.    
  1057.     /**
  1058.      * Serialize to String the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  1059.      *
  1060.      * @param serializedContext Object to be serialized
  1061.      * @return Object to be serialized as String
  1062.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1063.      */
  1064.     public String toString(SerializedContext serializedContext) throws SerializerException {
  1065.         return this.objToXml(SerializedContext.class, serializedContext, false).toString();
  1066.     }
  1067.     /**
  1068.      * Serialize to String the object <var>serializedContext</var> of type {@link org.openspcoop2.message.context.SerializedContext}
  1069.      *
  1070.      * @param serializedContext Object to be serialized
  1071.      * @param prettyPrint if true output the XML with indenting
  1072.      * @return Object to be serialized as String
  1073.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1074.      */
  1075.     public String toString(SerializedContext serializedContext,boolean prettyPrint) throws SerializerException {
  1076.         return this.objToXml(SerializedContext.class, serializedContext, prettyPrint).toString();
  1077.     }
  1078.    
  1079.    
  1080.    
  1081.     /*
  1082.      =================================================================================
  1083.      Object: forced-response
  1084.      =================================================================================
  1085.     */
  1086.    
  1087.     /**
  1088.      * Serialize to file system in <var>fileName</var> the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1089.      *
  1090.      * @param fileName Xml file to serialize the object <var>forcedResponse</var>
  1091.      * @param forcedResponse Object to be serialized in xml file <var>fileName</var>
  1092.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1093.      */
  1094.     public void write(String fileName,ForcedResponse forcedResponse) throws SerializerException {
  1095.         this.objToXml(fileName, ForcedResponse.class, forcedResponse, false);
  1096.     }
  1097.     /**
  1098.      * Serialize to file system in <var>fileName</var> the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1099.      *
  1100.      * @param fileName Xml file to serialize the object <var>forcedResponse</var>
  1101.      * @param forcedResponse Object to be serialized in xml file <var>fileName</var>
  1102.      * @param prettyPrint if true output the XML with indenting
  1103.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1104.      */
  1105.     public void write(String fileName,ForcedResponse forcedResponse,boolean prettyPrint) throws SerializerException {
  1106.         this.objToXml(fileName, ForcedResponse.class, forcedResponse, prettyPrint);
  1107.     }
  1108.    
  1109.     /**
  1110.      * Serialize to file system in <var>file</var> the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1111.      *
  1112.      * @param file Xml file to serialize the object <var>forcedResponse</var>
  1113.      * @param forcedResponse Object to be serialized in xml file <var>fileName</var>
  1114.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1115.      */
  1116.     public void write(File file,ForcedResponse forcedResponse) throws SerializerException {
  1117.         this.objToXml(file, ForcedResponse.class, forcedResponse, false);
  1118.     }
  1119.     /**
  1120.      * Serialize to file system in <var>file</var> the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1121.      *
  1122.      * @param file Xml file to serialize the object <var>forcedResponse</var>
  1123.      * @param forcedResponse Object to be serialized in xml file <var>fileName</var>
  1124.      * @param prettyPrint if true output the XML with indenting
  1125.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1126.      */
  1127.     public void write(File file,ForcedResponse forcedResponse,boolean prettyPrint) throws SerializerException {
  1128.         this.objToXml(file, ForcedResponse.class, forcedResponse, prettyPrint);
  1129.     }
  1130.    
  1131.     /**
  1132.      * Serialize to output stream <var>out</var> the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1133.      *
  1134.      * @param out OutputStream to serialize the object <var>forcedResponse</var>
  1135.      * @param forcedResponse Object to be serialized in xml file <var>fileName</var>
  1136.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1137.      */
  1138.     public void write(OutputStream out,ForcedResponse forcedResponse) throws SerializerException {
  1139.         this.objToXml(out, ForcedResponse.class, forcedResponse, false);
  1140.     }
  1141.     /**
  1142.      * Serialize to output stream <var>out</var> the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1143.      *
  1144.      * @param out OutputStream to serialize the object <var>forcedResponse</var>
  1145.      * @param forcedResponse Object to be serialized in xml file <var>fileName</var>
  1146.      * @param prettyPrint if true output the XML with indenting
  1147.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1148.      */
  1149.     public void write(OutputStream out,ForcedResponse forcedResponse,boolean prettyPrint) throws SerializerException {
  1150.         this.objToXml(out, ForcedResponse.class, forcedResponse, prettyPrint);
  1151.     }
  1152.            
  1153.     /**
  1154.      * Serialize to byte array the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1155.      *
  1156.      * @param forcedResponse Object to be serialized
  1157.      * @return Object to be serialized in byte array
  1158.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1159.      */
  1160.     public byte[] toByteArray(ForcedResponse forcedResponse) throws SerializerException {
  1161.         return this.objToXml(ForcedResponse.class, forcedResponse, false).toByteArray();
  1162.     }
  1163.     /**
  1164.      * Serialize to byte array the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1165.      *
  1166.      * @param forcedResponse Object to be serialized
  1167.      * @param prettyPrint if true output the XML with indenting
  1168.      * @return Object to be serialized in byte array
  1169.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1170.      */
  1171.     public byte[] toByteArray(ForcedResponse forcedResponse,boolean prettyPrint) throws SerializerException {
  1172.         return this.objToXml(ForcedResponse.class, forcedResponse, prettyPrint).toByteArray();
  1173.     }
  1174.    
  1175.     /**
  1176.      * Serialize to String the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1177.      *
  1178.      * @param forcedResponse Object to be serialized
  1179.      * @return Object to be serialized as String
  1180.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1181.      */
  1182.     public String toString(ForcedResponse forcedResponse) throws SerializerException {
  1183.         return this.objToXml(ForcedResponse.class, forcedResponse, false).toString();
  1184.     }
  1185.     /**
  1186.      * Serialize to String the object <var>forcedResponse</var> of type {@link org.openspcoop2.message.context.ForcedResponse}
  1187.      *
  1188.      * @param forcedResponse Object to be serialized
  1189.      * @param prettyPrint if true output the XML with indenting
  1190.      * @return Object to be serialized as String
  1191.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1192.      */
  1193.     public String toString(ForcedResponse forcedResponse,boolean prettyPrint) throws SerializerException {
  1194.         return this.objToXml(ForcedResponse.class, forcedResponse, prettyPrint).toString();
  1195.     }
  1196.    
  1197.    
  1198.    
  1199.     /*
  1200.      =================================================================================
  1201.      Object: forced-response-message
  1202.      =================================================================================
  1203.     */
  1204.    
  1205.     /**
  1206.      * Serialize to file system in <var>fileName</var> the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1207.      *
  1208.      * @param fileName Xml file to serialize the object <var>forcedResponseMessage</var>
  1209.      * @param forcedResponseMessage Object to be serialized in xml file <var>fileName</var>
  1210.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1211.      */
  1212.     public void write(String fileName,ForcedResponseMessage forcedResponseMessage) throws SerializerException {
  1213.         this.objToXml(fileName, ForcedResponseMessage.class, forcedResponseMessage, false);
  1214.     }
  1215.     /**
  1216.      * Serialize to file system in <var>fileName</var> the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1217.      *
  1218.      * @param fileName Xml file to serialize the object <var>forcedResponseMessage</var>
  1219.      * @param forcedResponseMessage Object to be serialized in xml file <var>fileName</var>
  1220.      * @param prettyPrint if true output the XML with indenting
  1221.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1222.      */
  1223.     public void write(String fileName,ForcedResponseMessage forcedResponseMessage,boolean prettyPrint) throws SerializerException {
  1224.         this.objToXml(fileName, ForcedResponseMessage.class, forcedResponseMessage, prettyPrint);
  1225.     }
  1226.    
  1227.     /**
  1228.      * Serialize to file system in <var>file</var> the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1229.      *
  1230.      * @param file Xml file to serialize the object <var>forcedResponseMessage</var>
  1231.      * @param forcedResponseMessage Object to be serialized in xml file <var>fileName</var>
  1232.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1233.      */
  1234.     public void write(File file,ForcedResponseMessage forcedResponseMessage) throws SerializerException {
  1235.         this.objToXml(file, ForcedResponseMessage.class, forcedResponseMessage, false);
  1236.     }
  1237.     /**
  1238.      * Serialize to file system in <var>file</var> the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1239.      *
  1240.      * @param file Xml file to serialize the object <var>forcedResponseMessage</var>
  1241.      * @param forcedResponseMessage Object to be serialized in xml file <var>fileName</var>
  1242.      * @param prettyPrint if true output the XML with indenting
  1243.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1244.      */
  1245.     public void write(File file,ForcedResponseMessage forcedResponseMessage,boolean prettyPrint) throws SerializerException {
  1246.         this.objToXml(file, ForcedResponseMessage.class, forcedResponseMessage, prettyPrint);
  1247.     }
  1248.    
  1249.     /**
  1250.      * Serialize to output stream <var>out</var> the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1251.      *
  1252.      * @param out OutputStream to serialize the object <var>forcedResponseMessage</var>
  1253.      * @param forcedResponseMessage Object to be serialized in xml file <var>fileName</var>
  1254.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1255.      */
  1256.     public void write(OutputStream out,ForcedResponseMessage forcedResponseMessage) throws SerializerException {
  1257.         this.objToXml(out, ForcedResponseMessage.class, forcedResponseMessage, false);
  1258.     }
  1259.     /**
  1260.      * Serialize to output stream <var>out</var> the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1261.      *
  1262.      * @param out OutputStream to serialize the object <var>forcedResponseMessage</var>
  1263.      * @param forcedResponseMessage Object to be serialized in xml file <var>fileName</var>
  1264.      * @param prettyPrint if true output the XML with indenting
  1265.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1266.      */
  1267.     public void write(OutputStream out,ForcedResponseMessage forcedResponseMessage,boolean prettyPrint) throws SerializerException {
  1268.         this.objToXml(out, ForcedResponseMessage.class, forcedResponseMessage, prettyPrint);
  1269.     }
  1270.            
  1271.     /**
  1272.      * Serialize to byte array the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1273.      *
  1274.      * @param forcedResponseMessage Object to be serialized
  1275.      * @return Object to be serialized in byte array
  1276.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1277.      */
  1278.     public byte[] toByteArray(ForcedResponseMessage forcedResponseMessage) throws SerializerException {
  1279.         return this.objToXml(ForcedResponseMessage.class, forcedResponseMessage, false).toByteArray();
  1280.     }
  1281.     /**
  1282.      * Serialize to byte array the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1283.      *
  1284.      * @param forcedResponseMessage Object to be serialized
  1285.      * @param prettyPrint if true output the XML with indenting
  1286.      * @return Object to be serialized in byte array
  1287.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1288.      */
  1289.     public byte[] toByteArray(ForcedResponseMessage forcedResponseMessage,boolean prettyPrint) throws SerializerException {
  1290.         return this.objToXml(ForcedResponseMessage.class, forcedResponseMessage, prettyPrint).toByteArray();
  1291.     }
  1292.    
  1293.     /**
  1294.      * Serialize to String the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1295.      *
  1296.      * @param forcedResponseMessage Object to be serialized
  1297.      * @return Object to be serialized as String
  1298.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1299.      */
  1300.     public String toString(ForcedResponseMessage forcedResponseMessage) throws SerializerException {
  1301.         return this.objToXml(ForcedResponseMessage.class, forcedResponseMessage, false).toString();
  1302.     }
  1303.     /**
  1304.      * Serialize to String the object <var>forcedResponseMessage</var> of type {@link org.openspcoop2.message.context.ForcedResponseMessage}
  1305.      *
  1306.      * @param forcedResponseMessage Object to be serialized
  1307.      * @param prettyPrint if true output the XML with indenting
  1308.      * @return Object to be serialized as String
  1309.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1310.      */
  1311.     public String toString(ForcedResponseMessage forcedResponseMessage,boolean prettyPrint) throws SerializerException {
  1312.         return this.objToXml(ForcedResponseMessage.class, forcedResponseMessage, prettyPrint).toString();
  1313.     }
  1314.    
  1315.    
  1316.    
  1317.     /*
  1318.      =================================================================================
  1319.      Object: transport-response-context
  1320.      =================================================================================
  1321.     */
  1322.    
  1323.     /**
  1324.      * Serialize to file system in <var>fileName</var> the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1325.      *
  1326.      * @param fileName Xml file to serialize the object <var>transportResponseContext</var>
  1327.      * @param transportResponseContext Object to be serialized in xml file <var>fileName</var>
  1328.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1329.      */
  1330.     public void write(String fileName,TransportResponseContext transportResponseContext) throws SerializerException {
  1331.         this.objToXml(fileName, TransportResponseContext.class, transportResponseContext, false);
  1332.     }
  1333.     /**
  1334.      * Serialize to file system in <var>fileName</var> the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1335.      *
  1336.      * @param fileName Xml file to serialize the object <var>transportResponseContext</var>
  1337.      * @param transportResponseContext Object to be serialized in xml file <var>fileName</var>
  1338.      * @param prettyPrint if true output the XML with indenting
  1339.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1340.      */
  1341.     public void write(String fileName,TransportResponseContext transportResponseContext,boolean prettyPrint) throws SerializerException {
  1342.         this.objToXml(fileName, TransportResponseContext.class, transportResponseContext, prettyPrint);
  1343.     }
  1344.    
  1345.     /**
  1346.      * Serialize to file system in <var>file</var> the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1347.      *
  1348.      * @param file Xml file to serialize the object <var>transportResponseContext</var>
  1349.      * @param transportResponseContext Object to be serialized in xml file <var>fileName</var>
  1350.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1351.      */
  1352.     public void write(File file,TransportResponseContext transportResponseContext) throws SerializerException {
  1353.         this.objToXml(file, TransportResponseContext.class, transportResponseContext, false);
  1354.     }
  1355.     /**
  1356.      * Serialize to file system in <var>file</var> the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1357.      *
  1358.      * @param file Xml file to serialize the object <var>transportResponseContext</var>
  1359.      * @param transportResponseContext Object to be serialized in xml file <var>fileName</var>
  1360.      * @param prettyPrint if true output the XML with indenting
  1361.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1362.      */
  1363.     public void write(File file,TransportResponseContext transportResponseContext,boolean prettyPrint) throws SerializerException {
  1364.         this.objToXml(file, TransportResponseContext.class, transportResponseContext, prettyPrint);
  1365.     }
  1366.    
  1367.     /**
  1368.      * Serialize to output stream <var>out</var> the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1369.      *
  1370.      * @param out OutputStream to serialize the object <var>transportResponseContext</var>
  1371.      * @param transportResponseContext Object to be serialized in xml file <var>fileName</var>
  1372.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1373.      */
  1374.     public void write(OutputStream out,TransportResponseContext transportResponseContext) throws SerializerException {
  1375.         this.objToXml(out, TransportResponseContext.class, transportResponseContext, false);
  1376.     }
  1377.     /**
  1378.      * Serialize to output stream <var>out</var> the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1379.      *
  1380.      * @param out OutputStream to serialize the object <var>transportResponseContext</var>
  1381.      * @param transportResponseContext Object to be serialized in xml file <var>fileName</var>
  1382.      * @param prettyPrint if true output the XML with indenting
  1383.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1384.      */
  1385.     public void write(OutputStream out,TransportResponseContext transportResponseContext,boolean prettyPrint) throws SerializerException {
  1386.         this.objToXml(out, TransportResponseContext.class, transportResponseContext, prettyPrint);
  1387.     }
  1388.            
  1389.     /**
  1390.      * Serialize to byte array the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1391.      *
  1392.      * @param transportResponseContext Object to be serialized
  1393.      * @return Object to be serialized in byte array
  1394.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1395.      */
  1396.     public byte[] toByteArray(TransportResponseContext transportResponseContext) throws SerializerException {
  1397.         return this.objToXml(TransportResponseContext.class, transportResponseContext, false).toByteArray();
  1398.     }
  1399.     /**
  1400.      * Serialize to byte array the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1401.      *
  1402.      * @param transportResponseContext Object to be serialized
  1403.      * @param prettyPrint if true output the XML with indenting
  1404.      * @return Object to be serialized in byte array
  1405.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1406.      */
  1407.     public byte[] toByteArray(TransportResponseContext transportResponseContext,boolean prettyPrint) throws SerializerException {
  1408.         return this.objToXml(TransportResponseContext.class, transportResponseContext, prettyPrint).toByteArray();
  1409.     }
  1410.    
  1411.     /**
  1412.      * Serialize to String the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1413.      *
  1414.      * @param transportResponseContext Object to be serialized
  1415.      * @return Object to be serialized as String
  1416.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1417.      */
  1418.     public String toString(TransportResponseContext transportResponseContext) throws SerializerException {
  1419.         return this.objToXml(TransportResponseContext.class, transportResponseContext, false).toString();
  1420.     }
  1421.     /**
  1422.      * Serialize to String the object <var>transportResponseContext</var> of type {@link org.openspcoop2.message.context.TransportResponseContext}
  1423.      *
  1424.      * @param transportResponseContext Object to be serialized
  1425.      * @param prettyPrint if true output the XML with indenting
  1426.      * @return Object to be serialized as String
  1427.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1428.      */
  1429.     public String toString(TransportResponseContext transportResponseContext,boolean prettyPrint) throws SerializerException {
  1430.         return this.objToXml(TransportResponseContext.class, transportResponseContext, prettyPrint).toString();
  1431.     }
  1432.    
  1433.    
  1434.    
  1435.     /*
  1436.      =================================================================================
  1437.      Object: soap
  1438.      =================================================================================
  1439.     */
  1440.    
  1441.     /**
  1442.      * Serialize to file system in <var>fileName</var> the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1443.      *
  1444.      * @param fileName Xml file to serialize the object <var>soap</var>
  1445.      * @param soap Object to be serialized in xml file <var>fileName</var>
  1446.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1447.      */
  1448.     public void write(String fileName,Soap soap) throws SerializerException {
  1449.         this.objToXml(fileName, Soap.class, soap, false);
  1450.     }
  1451.     /**
  1452.      * Serialize to file system in <var>fileName</var> the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1453.      *
  1454.      * @param fileName Xml file to serialize the object <var>soap</var>
  1455.      * @param soap Object to be serialized in xml file <var>fileName</var>
  1456.      * @param prettyPrint if true output the XML with indenting
  1457.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1458.      */
  1459.     public void write(String fileName,Soap soap,boolean prettyPrint) throws SerializerException {
  1460.         this.objToXml(fileName, Soap.class, soap, prettyPrint);
  1461.     }
  1462.    
  1463.     /**
  1464.      * Serialize to file system in <var>file</var> the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1465.      *
  1466.      * @param file Xml file to serialize the object <var>soap</var>
  1467.      * @param soap Object to be serialized in xml file <var>fileName</var>
  1468.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1469.      */
  1470.     public void write(File file,Soap soap) throws SerializerException {
  1471.         this.objToXml(file, Soap.class, soap, false);
  1472.     }
  1473.     /**
  1474.      * Serialize to file system in <var>file</var> the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1475.      *
  1476.      * @param file Xml file to serialize the object <var>soap</var>
  1477.      * @param soap Object to be serialized in xml file <var>fileName</var>
  1478.      * @param prettyPrint if true output the XML with indenting
  1479.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1480.      */
  1481.     public void write(File file,Soap soap,boolean prettyPrint) throws SerializerException {
  1482.         this.objToXml(file, Soap.class, soap, prettyPrint);
  1483.     }
  1484.    
  1485.     /**
  1486.      * Serialize to output stream <var>out</var> the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1487.      *
  1488.      * @param out OutputStream to serialize the object <var>soap</var>
  1489.      * @param soap Object to be serialized in xml file <var>fileName</var>
  1490.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1491.      */
  1492.     public void write(OutputStream out,Soap soap) throws SerializerException {
  1493.         this.objToXml(out, Soap.class, soap, false);
  1494.     }
  1495.     /**
  1496.      * Serialize to output stream <var>out</var> the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1497.      *
  1498.      * @param out OutputStream to serialize the object <var>soap</var>
  1499.      * @param soap Object to be serialized in xml file <var>fileName</var>
  1500.      * @param prettyPrint if true output the XML with indenting
  1501.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1502.      */
  1503.     public void write(OutputStream out,Soap soap,boolean prettyPrint) throws SerializerException {
  1504.         this.objToXml(out, Soap.class, soap, prettyPrint);
  1505.     }
  1506.            
  1507.     /**
  1508.      * Serialize to byte array the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1509.      *
  1510.      * @param soap Object to be serialized
  1511.      * @return Object to be serialized in byte array
  1512.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1513.      */
  1514.     public byte[] toByteArray(Soap soap) throws SerializerException {
  1515.         return this.objToXml(Soap.class, soap, false).toByteArray();
  1516.     }
  1517.     /**
  1518.      * Serialize to byte array the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1519.      *
  1520.      * @param soap Object to be serialized
  1521.      * @param prettyPrint if true output the XML with indenting
  1522.      * @return Object to be serialized in byte array
  1523.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1524.      */
  1525.     public byte[] toByteArray(Soap soap,boolean prettyPrint) throws SerializerException {
  1526.         return this.objToXml(Soap.class, soap, prettyPrint).toByteArray();
  1527.     }
  1528.    
  1529.     /**
  1530.      * Serialize to String the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1531.      *
  1532.      * @param soap Object to be serialized
  1533.      * @return Object to be serialized as String
  1534.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1535.      */
  1536.     public String toString(Soap soap) throws SerializerException {
  1537.         return this.objToXml(Soap.class, soap, false).toString();
  1538.     }
  1539.     /**
  1540.      * Serialize to String the object <var>soap</var> of type {@link org.openspcoop2.message.context.Soap}
  1541.      *
  1542.      * @param soap Object to be serialized
  1543.      * @param prettyPrint if true output the XML with indenting
  1544.      * @return Object to be serialized as String
  1545.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1546.      */
  1547.     public String toString(Soap soap,boolean prettyPrint) throws SerializerException {
  1548.         return this.objToXml(Soap.class, soap, prettyPrint).toString();
  1549.     }
  1550.    
  1551.    
  1552.    
  1553.     /*
  1554.      =================================================================================
  1555.      Object: message-context
  1556.      =================================================================================
  1557.     */
  1558.    
  1559.     /**
  1560.      * Serialize to file system in <var>fileName</var> the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1561.      *
  1562.      * @param fileName Xml file to serialize the object <var>messageContext</var>
  1563.      * @param messageContext Object to be serialized in xml file <var>fileName</var>
  1564.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1565.      */
  1566.     public void write(String fileName,MessageContext messageContext) throws SerializerException {
  1567.         this.objToXml(fileName, MessageContext.class, messageContext, false);
  1568.     }
  1569.     /**
  1570.      * Serialize to file system in <var>fileName</var> the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1571.      *
  1572.      * @param fileName Xml file to serialize the object <var>messageContext</var>
  1573.      * @param messageContext Object to be serialized in xml file <var>fileName</var>
  1574.      * @param prettyPrint if true output the XML with indenting
  1575.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1576.      */
  1577.     public void write(String fileName,MessageContext messageContext,boolean prettyPrint) throws SerializerException {
  1578.         this.objToXml(fileName, MessageContext.class, messageContext, prettyPrint);
  1579.     }
  1580.    
  1581.     /**
  1582.      * Serialize to file system in <var>file</var> the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1583.      *
  1584.      * @param file Xml file to serialize the object <var>messageContext</var>
  1585.      * @param messageContext Object to be serialized in xml file <var>fileName</var>
  1586.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1587.      */
  1588.     public void write(File file,MessageContext messageContext) throws SerializerException {
  1589.         this.objToXml(file, MessageContext.class, messageContext, false);
  1590.     }
  1591.     /**
  1592.      * Serialize to file system in <var>file</var> the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1593.      *
  1594.      * @param file Xml file to serialize the object <var>messageContext</var>
  1595.      * @param messageContext Object to be serialized in xml file <var>fileName</var>
  1596.      * @param prettyPrint if true output the XML with indenting
  1597.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1598.      */
  1599.     public void write(File file,MessageContext messageContext,boolean prettyPrint) throws SerializerException {
  1600.         this.objToXml(file, MessageContext.class, messageContext, prettyPrint);
  1601.     }
  1602.    
  1603.     /**
  1604.      * Serialize to output stream <var>out</var> the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1605.      *
  1606.      * @param out OutputStream to serialize the object <var>messageContext</var>
  1607.      * @param messageContext Object to be serialized in xml file <var>fileName</var>
  1608.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1609.      */
  1610.     public void write(OutputStream out,MessageContext messageContext) throws SerializerException {
  1611.         this.objToXml(out, MessageContext.class, messageContext, false);
  1612.     }
  1613.     /**
  1614.      * Serialize to output stream <var>out</var> the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1615.      *
  1616.      * @param out OutputStream to serialize the object <var>messageContext</var>
  1617.      * @param messageContext Object to be serialized in xml file <var>fileName</var>
  1618.      * @param prettyPrint if true output the XML with indenting
  1619.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1620.      */
  1621.     public void write(OutputStream out,MessageContext messageContext,boolean prettyPrint) throws SerializerException {
  1622.         this.objToXml(out, MessageContext.class, messageContext, prettyPrint);
  1623.     }
  1624.            
  1625.     /**
  1626.      * Serialize to byte array the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1627.      *
  1628.      * @param messageContext Object to be serialized
  1629.      * @return Object to be serialized in byte array
  1630.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1631.      */
  1632.     public byte[] toByteArray(MessageContext messageContext) throws SerializerException {
  1633.         return this.objToXml(MessageContext.class, messageContext, false).toByteArray();
  1634.     }
  1635.     /**
  1636.      * Serialize to byte array the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1637.      *
  1638.      * @param messageContext Object to be serialized
  1639.      * @param prettyPrint if true output the XML with indenting
  1640.      * @return Object to be serialized in byte array
  1641.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1642.      */
  1643.     public byte[] toByteArray(MessageContext messageContext,boolean prettyPrint) throws SerializerException {
  1644.         return this.objToXml(MessageContext.class, messageContext, prettyPrint).toByteArray();
  1645.     }
  1646.    
  1647.     /**
  1648.      * Serialize to String the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1649.      *
  1650.      * @param messageContext Object to be serialized
  1651.      * @return Object to be serialized as String
  1652.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1653.      */
  1654.     public String toString(MessageContext messageContext) throws SerializerException {
  1655.         return this.objToXml(MessageContext.class, messageContext, false).toString();
  1656.     }
  1657.     /**
  1658.      * Serialize to String the object <var>messageContext</var> of type {@link org.openspcoop2.message.context.MessageContext}
  1659.      *
  1660.      * @param messageContext Object to be serialized
  1661.      * @param prettyPrint if true output the XML with indenting
  1662.      * @return Object to be serialized as String
  1663.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1664.      */
  1665.     public String toString(MessageContext messageContext,boolean prettyPrint) throws SerializerException {
  1666.         return this.objToXml(MessageContext.class, messageContext, prettyPrint).toString();
  1667.     }
  1668.    
  1669.    
  1670.    
  1671.     /*
  1672.      =================================================================================
  1673.      Object: content-type-parameters
  1674.      =================================================================================
  1675.     */
  1676.    
  1677.     /**
  1678.      * Serialize to file system in <var>fileName</var> the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1679.      *
  1680.      * @param fileName Xml file to serialize the object <var>contentTypeParameters</var>
  1681.      * @param contentTypeParameters Object to be serialized in xml file <var>fileName</var>
  1682.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1683.      */
  1684.     public void write(String fileName,ContentTypeParameters contentTypeParameters) throws SerializerException {
  1685.         this.objToXml(fileName, ContentTypeParameters.class, contentTypeParameters, false);
  1686.     }
  1687.     /**
  1688.      * Serialize to file system in <var>fileName</var> the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1689.      *
  1690.      * @param fileName Xml file to serialize the object <var>contentTypeParameters</var>
  1691.      * @param contentTypeParameters Object to be serialized in xml file <var>fileName</var>
  1692.      * @param prettyPrint if true output the XML with indenting
  1693.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1694.      */
  1695.     public void write(String fileName,ContentTypeParameters contentTypeParameters,boolean prettyPrint) throws SerializerException {
  1696.         this.objToXml(fileName, ContentTypeParameters.class, contentTypeParameters, prettyPrint);
  1697.     }
  1698.    
  1699.     /**
  1700.      * Serialize to file system in <var>file</var> the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1701.      *
  1702.      * @param file Xml file to serialize the object <var>contentTypeParameters</var>
  1703.      * @param contentTypeParameters Object to be serialized in xml file <var>fileName</var>
  1704.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1705.      */
  1706.     public void write(File file,ContentTypeParameters contentTypeParameters) throws SerializerException {
  1707.         this.objToXml(file, ContentTypeParameters.class, contentTypeParameters, false);
  1708.     }
  1709.     /**
  1710.      * Serialize to file system in <var>file</var> the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1711.      *
  1712.      * @param file Xml file to serialize the object <var>contentTypeParameters</var>
  1713.      * @param contentTypeParameters Object to be serialized in xml file <var>fileName</var>
  1714.      * @param prettyPrint if true output the XML with indenting
  1715.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1716.      */
  1717.     public void write(File file,ContentTypeParameters contentTypeParameters,boolean prettyPrint) throws SerializerException {
  1718.         this.objToXml(file, ContentTypeParameters.class, contentTypeParameters, prettyPrint);
  1719.     }
  1720.    
  1721.     /**
  1722.      * Serialize to output stream <var>out</var> the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1723.      *
  1724.      * @param out OutputStream to serialize the object <var>contentTypeParameters</var>
  1725.      * @param contentTypeParameters Object to be serialized in xml file <var>fileName</var>
  1726.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1727.      */
  1728.     public void write(OutputStream out,ContentTypeParameters contentTypeParameters) throws SerializerException {
  1729.         this.objToXml(out, ContentTypeParameters.class, contentTypeParameters, false);
  1730.     }
  1731.     /**
  1732.      * Serialize to output stream <var>out</var> the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1733.      *
  1734.      * @param out OutputStream to serialize the object <var>contentTypeParameters</var>
  1735.      * @param contentTypeParameters Object to be serialized in xml file <var>fileName</var>
  1736.      * @param prettyPrint if true output the XML with indenting
  1737.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1738.      */
  1739.     public void write(OutputStream out,ContentTypeParameters contentTypeParameters,boolean prettyPrint) throws SerializerException {
  1740.         this.objToXml(out, ContentTypeParameters.class, contentTypeParameters, prettyPrint);
  1741.     }
  1742.            
  1743.     /**
  1744.      * Serialize to byte array the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1745.      *
  1746.      * @param contentTypeParameters Object to be serialized
  1747.      * @return Object to be serialized in byte array
  1748.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1749.      */
  1750.     public byte[] toByteArray(ContentTypeParameters contentTypeParameters) throws SerializerException {
  1751.         return this.objToXml(ContentTypeParameters.class, contentTypeParameters, false).toByteArray();
  1752.     }
  1753.     /**
  1754.      * Serialize to byte array the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1755.      *
  1756.      * @param contentTypeParameters Object to be serialized
  1757.      * @param prettyPrint if true output the XML with indenting
  1758.      * @return Object to be serialized in byte array
  1759.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1760.      */
  1761.     public byte[] toByteArray(ContentTypeParameters contentTypeParameters,boolean prettyPrint) throws SerializerException {
  1762.         return this.objToXml(ContentTypeParameters.class, contentTypeParameters, prettyPrint).toByteArray();
  1763.     }
  1764.    
  1765.     /**
  1766.      * Serialize to String the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1767.      *
  1768.      * @param contentTypeParameters Object to be serialized
  1769.      * @return Object to be serialized as String
  1770.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1771.      */
  1772.     public String toString(ContentTypeParameters contentTypeParameters) throws SerializerException {
  1773.         return this.objToXml(ContentTypeParameters.class, contentTypeParameters, false).toString();
  1774.     }
  1775.     /**
  1776.      * Serialize to String the object <var>contentTypeParameters</var> of type {@link org.openspcoop2.message.context.ContentTypeParameters}
  1777.      *
  1778.      * @param contentTypeParameters Object to be serialized
  1779.      * @param prettyPrint if true output the XML with indenting
  1780.      * @return Object to be serialized as String
  1781.      * @throws SerializerException The exception that is thrown when an error occurs during serialization
  1782.      */
  1783.     public String toString(ContentTypeParameters contentTypeParameters,boolean prettyPrint) throws SerializerException {
  1784.         return this.objToXml(ContentTypeParameters.class, contentTypeParameters, prettyPrint).toString();
  1785.     }
  1786.    
  1787.    
  1788.    

  1789. }