jason created SMX4-1367:
---------------------------

             Summary: saaj-api couldn't load configured 
javax.xml.soap.MetaFactory from saaj-impl  for soap v1.2
                 Key: SMX4-1367
                 URL: https://issues.apache.org/jira/browse/SMX4-1367
             Project: ServiceMix 4
          Issue Type: Bug
            Reporter: jason


https://issues.apache.org/jira/browse/SMX4-1089

The default MessageFactory uses a FactoryFinder that correctly loads in OSGI 
and defaults to Soap v1.1

 public static MessageFactory newInstance() throws SOAPException {

        try {
            return (MessageFactory)FactoryFinder.find(
                    MESSAGE_FACTORY_PROPERTY,
                    DEFAULT_MESSAGE_FACTORY);
                    }


 static Object find(String factoryPropertyName,
                       String defaultFactoryClassName) throws SOAPException {
        try {
            // If we are deployed into an OSGi environment, leverage it
            Class spiClass = 
org.apache.servicemix.specs.locator.OsgiLocator.locate(factoryPropertyName);
            if (spiClass != null) {
                return spiClass.newInstance();
            }
        } catch (Throwable e) {
        }


but for a call such as
MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);

The overloaded newInstance does not use the the same mechanism and fails to 
load the class in an osgi environment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to