2 Replies Latest reply on Mar 2, 2006 2:26 AM by itomer H

    why this exception comes out? org.apache.axis.soap.MessageFa

    itomer H Newbie

      hi, i am following the wiki page about JAXR configuration.

      i set up the system properties here.

      System.setProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");
      System.setProperty("jaxr.query.url", "http://uddi.xmethods.net/inquire");
      System.setProperty("jaxr.publish.url", "https://uddi.xmethods.net/publish");
      System.setProperty("juddi.proxy.transportClass", "org.jboss.jaxr.juddi.transport.SaajTransport");
      

      it works fine. i can obtain Connection connection, BusinessQueryManager bqm, BusinessLifeCycleManager blcm successfully.

      but when i came to this code.
      BulkResponse response = bqm.findOrganizations(findQualifiers,
       namePatterns,
       null,
       null,
       null,
       null);
      


      Exception comes out.
      but i would not be so confused if the exception were not about the org.apache.axis.soap.MessageFactoryImpl. I have known that JBoss is not using Axis anymore.

      and what is more, i have nothing about Axis in my PC.

      i have included ws4ee-axis.jar in my Eclipse IDE build path.
      and org.jboss.axis.soap.MessageFactoryImpl is right there.

      it seems that SaajTransport is sending the right message.
      but why comes such an exception about org.apache.axis?

      [main] DEBUG org.jboss.jaxr.juddi.transport.SaajTransport - Request message:<?xml version="1.0" encoding="UTF-8"?>
      <find_business generic="2.0" xmlns="urn:uddi-org:api_v2"><findQualifiers><findQualifier>sortByNameAsc</findQualifier></findQualifiers><name>%business%</name></find_business>
      
      javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
      1734 [main] ERROR org.jboss.jaxr.juddi.transport.SaajTransport - javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
       at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:119)
       at org.jboss.jaxr.juddi.transport.SaajTransport.send(SaajTransport.java:64)
       at org.apache.juddi.proxy.RegistryProxy.execute(RegistryProxy.java:368)
       at org.apache.juddi.AbstractRegistry.findBusiness(AbstractRegistry.java:243)
       at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findOrganizations(BusinessQueryManagerImpl.java:113)
       at TestJAXR.testJAXR1(TestJAXR.java:170)
       at TestJAXR.main(TestJAXR.java:40)
      


      any help will be much appriciated.

        • 1. Re: why this exception comes out? org.apache.axis.soap.Messa
          itomer H Newbie

          i see JaxrBaseTestCase.java in 4.04 source under testsuite\src\main\org\jboss\test\jaxr\scout\

          there is one different thing.

          String transportClass = System.getProperty("juddi.proxy.transportClass",
           "org.jboss.jaxr.juddi.axis.JBossJuddiAxisTransport");
          


          it is org.jboss.jaxr.juddi.axis.JBossJuddiAxisTransport
          not org.jboss.jaxr.juddi.transport.SaajTransport.

          my code and in wiki also:
          System.setProperty("juddi.proxy.transportClass", "org.jboss.jaxr.juddi.transport.SaajTransport");
          


          i could not find this class anywhere in the jar class file.
          is this the reason why i got the "Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found" exception?

          • 2. Re: why this exception comes out? org.apache.axis.soap.Messa
            itomer H Newbie

            well, i answered my own question.

            the root cause of such exception is the using Web Services 1.0 Library which comes with JBoss-IDE.

            there is 4 jar files under Web Services 1.0 library.
            the problematic one is saaj-api.jar, under \plugins\org.jboss.ide.eclipse.jdt.ws.core_1.5.0.M2\lib\wsi-1.0\

            for example,

             try {
             return (SOAPConnectionFactory) FactoryFinder.find(SF_PROPERTY, DEFAULT_SOAP_CONNECTION_FACTORY);
             } catch (Exception exception) {
             throw new SOAPException("Unable to create SOAP connection factory: "
             + exception.getMessage());
             }
            


            this code seems normal. but under this, it declares two String constants.
            private static final String DEFAULT_SOAP_CONNECTION_FACTORY =
             "org.apache.axis.soap.SOAPConnectionFactoryImpl";
            
             private static final String SF_PROPERTY =
             "javax.xml.soap.SOAPConnectionFactory";
            
            


            got it?
            that is why the application continuously looking for the AXIS stuff.

            there is another 2 places, including:
            javax.xml.soap.SOAPFactory" "javax.xml.soap.MessageFactory".

            i remove the Web Services 1.0 library in Eclipse.
            and import jboss-saaj.jar in JBoss installation package.

            then this exception is gone.

            at last, there are some confusing things here, why is the library coming with JBoss-IDE still looking for the Axis stuff. or is my Jboss-Ide too old?