public static String toString(Object bean){
  try {
    final ByteArrayOutputStream baos=new ByteArrayOutputStream();
    final Marshaller m=createMarshaller();
    m.setProperty(m.JAXB_FRAGMENT,Boolean.TRUE);
    m.marshal(bean,baos);
    return baos.toString();
  }
 catch (  JAXBException x) {
    final IllegalArgumentException iae=new IllegalArgumentException("Failed to write SessionConfigBean: " + x,x);
    throw iae;
  }
}

public static String toString ( Object bean ) { try { final ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; final Marshaller m = createMarshaller ( ) ; m . setProperty ( m . JAXB_FRAGMENT , Boolean . TRUE ) ; m . marshal ( bean , baos ) ; return baos . toString ( ) ; } catch ( JAXBException x ) { final IllegalArgumentException iae = new IllegalArgumentException ( "Failed to write SessionConfigBean: " + x , x ) ; throw iae ; } }
creates an xml string representation of the given bean .
