Author: anil.saldhana(a)jboss.com
Date: 2009-07-29 15:33:43 -0400 (Wed, 29 Jul 2009)
New Revision: 663
Modified:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/util/JAXBUtil.java
Log:
JBID-146: marshaller should not format output
Modified:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/util/JAXBUtil.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/util/JAXBUtil.java 2009-07-29
19:04:59 UTC (rev 662)
+++
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/util/JAXBUtil.java 2009-07-29
19:33:43 UTC (rev 663)
@@ -58,8 +58,8 @@
public static Marshaller getValidatingMarshaller(String pkgName, String
schemaLocation)
throws JAXBException, SAXException
{
- Marshaller marshaller = JAXBUtil.getMarshaller(pkgName);
- marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+ Marshaller marshaller = getMarshaller(pkgName);
+
//Validate against schema
Schema schema = getJAXPSchemaInstance(schemaLocation);
marshaller.setSchema(schema);
@@ -81,6 +81,7 @@
JAXBContext jc = JAXBContext.newInstance(pkgName);
Marshaller marshaller = jc.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
+ marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE); //Breaks
signatures
return marshaller;
}
@@ -124,7 +125,7 @@
throw new IllegalStateException("Schema URL is null:" +
schemaLocation);
SchemaFactory scFact = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
- //Always install the resolver unless the system propery is set
+ //Always install the resolver unless the system property is set
if(SecurityActions.getSystemProperty("org.jboss.identity.federation.jaxb.ls",
null) == null)
scFact.setResourceResolver( new IDFedLSInputResolver());
Show replies by date