Author: anil.saldhana(a)jboss.com
Date: 2009-04-16 11:29:51 -0400 (Thu, 16 Apr 2009)
New Revision: 440
Modified:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories/JBossSAMLBaseFactory.java
Log:
localize the constant to fix the tug of war between JDK5 and Stax API in eclipse for
javax.xml.XMLConstants
Modified:
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories/JBossSAMLBaseFactory.java
===================================================================
---
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories/JBossSAMLBaseFactory.java 2009-04-16
14:40:59 UTC (rev 439)
+++
identity-federation/trunk/jboss-identity-fed-core/src/main/java/org/jboss/identity/federation/core/saml/v2/factories/JBossSAMLBaseFactory.java 2009-04-16
15:29:51 UTC (rev 440)
@@ -23,7 +23,6 @@
import java.net.URL;
-import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
@@ -51,6 +50,8 @@
{
private static ObjectFactory assertionObjectFactory = new ObjectFactory();
+ public static final String W3C_XML_SCHEMA_NS_URI =
"http://www.w3.org/2001/XMLSchema";
+
public static AssertionType createAssertion()
{
return assertionObjectFactory.createAssertionType();
@@ -195,7 +196,7 @@
URL schemaURL = tcl.getResource(schemaLocation);
if(schemaURL == null)
throw new IllegalStateException("Schema URL is null:" +
schemaLocation);
- SchemaFactory scFact =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ SchemaFactory scFact = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
Schema schema = scFact.newSchema(schemaURL);
marshaller.setSchema(schema);
@@ -232,7 +233,7 @@
URL schemaURL = tcl.getResource(schemaLocation);
if(schemaURL == null)
throw new IllegalStateException("Schema URL is null:" +
schemaLocation);
- SchemaFactory scFact =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ SchemaFactory scFact = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
Schema schema = scFact.newSchema(schemaURL);
unmarshaller.setSchema(schema);
Show replies by date