mace-opensaml-users - XML altered after basic unmarshal-marshall sequence
Subject: OpenSAML user discussion
List archive
- From: Paolo Selvini <>
- To: "" <>
- Subject: XML altered after basic unmarshal-marshall sequence
- Date: Thu, 8 May 2008 16:52:21 +0200
- Accept-language: it-IT, en-US
- Acceptlanguage: it-IT, en-US
I am doing a very simple test in order to better understand the cause of another problem about XML encoding with OpenSAML.
The test is the following: take a very simple and empty SAML metadata file like
<?
xml version="1.0" encoding="ISO-8859-1"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"/>
and process it with the code attached to this message. The code parses the file with a Reader forcing ISO-8859-1 encoding, processes it through unmarshalling and marshalling and then, without doing any modification to it, saves it back to disk with a Writer, forcing encoding ISO-8859-1. The output is the following:
<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"/>You may notice the difference in the <?xml... > header, where the encoding has been altered.
Does anybody know the cause and any possible solution / workaround?
I'm using OpenSAML-J 2.1.0.
thanks,
Paolo
Le informazioni contenute in questa comunicazione e negli allegati sono riservate; e' vietato a soggetti diversi dai destinatari qualsiasi uso, copia, diffusione di quanto in essi contenuto.
Se avete ricevuto questa copia per errore, vi preghiamo di distruggerla immediatamente ed informarci via e-mail.
Prima di stampare questa e-mail consideratene l’impatto sull’ambiente. Grazie per la collaborazione.
This e-mail and any attachment(s) are strictly confidential. This message must not be copied, disclosed or used by anybody other than the intended recipient(s).
If you are not the intended recipient, please inform the sender by e-mail and destroy this message immediately.
Please consider the environment before printing this e-mail. Thank you for your cooperation.
Attachment:
XmlReadWrite.java
Description: XmlReadWrite.java
- XML altered after basic unmarshal-marshall sequence, Paolo Selvini, 05/08/2008
- Re: [OpenSAML] XML altered after basic unmarshal-marshall sequence, Chad La Joie, 05/08/2008
- RE: [OpenSAML] XML altered after basic unmarshal-marshall sequence, Paolo Selvini, 05/08/2008
- Re: [OpenSAML] XML altered after basic unmarshal-marshall sequence, Chad La Joie, 05/08/2008
Archive powered by MHonArc 2.6.16.