servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1241750 - /servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java
Date Wed, 08 Feb 2012 02:54:49 GMT
Author: ffang
Date: Wed Feb  8 02:54:48 2012
New Revision: 1241750

URL: http://svn.apache.org/viewvc?rev=1241750&view=rev
Log:
[SMX4-1089]saaj-api couldn't load configured javax.xml.soap.MetaFactory from saaj-impl

Modified:
    servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java

Modified: servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java?rev=1241750&r1=1241749&r2=1241750&view=diff
==============================================================================
--- servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java
(original)
+++ servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java
Wed Feb  8 02:54:48 2012
@@ -83,7 +83,14 @@ class FactoryFinder {
                        String defaultFactoryClassName) throws SOAPException {
         try {
             // If we are deployed into an OSGi environment, leverage it
-            Class factoryClass = FactoryFinder.class.getClassLoader().loadClass(factoryPropertyName);
+            String factoryClassName = factoryPropertyName;
+            if (factoryPropertyName.equals("javax.xml.soap.MetaFactory")) {
+                //this is an exception that the factoryPropertyName isn't
+                //the actual factory class name, there is no class
+                //javax.xml.soap.MetaFactory at all
+                factoryClassName = "javax.xml.soap.SAAJMetaFactory";
+            }
+            Class factoryClass = FactoryFinder.class.getClassLoader().loadClass(factoryClassName);
             Class spiClass = org.apache.servicemix.specs.locator.OsgiLocator.locate(factoryClass,
factoryPropertyName);
             if (spiClass != null) {
                 return spiClass.newInstance();



Mime
View raw message