13 Replies Latest reply on Dec 9, 2008 3:42 AM by ropalka

    Upgrading Scout/JUDDI combo

    anil.saldhana

      JUDDI can be upgraded to 2.0.rc5 without issues. The problem is in the scout project which has got dependencies on xml beans introduced.

      What is need to make the scout upgrade is an implementation of the Transport interface:
      http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/transport/Transport.java?revision=552031&view=markup

      The existing ones are not useful.
      http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/transport/

      If you look in the AS4 testsuite, we use the standard jaxr connection factory.
      http://anonsvn.jboss.org/repos/jbossas/branches/Branch_4_0/testsuite/build.xml

       <sysproperty key="javax.xml.registry.ConnectionFactoryClass"
       value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
      


      If you look at the source code of this impl.
      http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java?revision=552045&view=markup

      /**
       * Update the properties used by this ConnectionFactory to obtain a connection.
       *
       * @param properties the new properties for this ConnectionFactory
       */
       public void setProperties(Properties properties)
       {
       queryManagerURL = properties.getProperty(QUERYMANAGER_PROPERTY);
       lifeCycleManagerURL = properties.getProperty(LIFECYCLEMANAGER_PROPERTY);
       transportClass = properties.getProperty(RegistryImpl.TRANSPORT_CLASS_PROPERTY_NAME);
       semanticEquivalences = properties.getProperty(SEMANTICEQUIVALENCES_PROPERTY);
       authenticationMethod = properties.getProperty(AUTHENTICATIONMETHOD_PROPERTY);
       postalAddressScheme = properties.getProperty(POSTALADDRESSSCHEME_PROPERTY);
       String val = properties.getProperty(MAXROWS_PROPERTY);
       maxRows = (val == null) ? null : Integer.valueOf(val);
       }
      


      Now there is a property for the transportClass. For that look inside the RegistryImpl class
      http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java?revision=658811&view=markup

      public static final String TRANSPORT_CLASS_PROPERTY_NAME = "scout.proxy.transportClass";
      
      
      String transClass = props.getProperty(TRANSPORT_CLASS_PROPERTY_NAME);
       if (transClass != null)
       this.setTransport(this.getTransport(transClass));
       else
       this.setTransport(this.getTransport(DEFAULT_TRANSPORT_CLASS));
      


      So you will need to create a transport implementation and use the "scout.proxy.transportClass" to install your implementation on the client side that connects to the uddi urls. The transport class will do the marshalling/unmarshalling of request/response. You can use JAXB2.

      The branch 0.7 of scout uses juddi proxy as the transport. juddi proxy provides a IRegistry interface.

      http://svn.apache.org/viewvc/webservices/scout/tags/v0.7rc2/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionImpl.java?revision=469585&view=markup


        • 1. Re: Upgrading Scout/JUDDI combo
          anil.saldhana

          I think the issue is this implementation of IRegistry that introduces the xml beans dependency.
          http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java?view=log

          |scout core|->(IRegistry) ===N/W== (UDDI Registry)
          


          It is the IRegistry implementation that is the issue. The version in scout trunk has xmlbeans dependency. Kurt should have removed that. But he did not.

          • 2. Re: Upgrading Scout/JUDDI combo
            ropalka

            Are you working on that issue Anil? Or JBossWS team should solve it?
            Do we need upgrade Scout/JUDDI in JBossAS 5.0.0 GA?
            Who defines requirements for JBoss JAXR and plans its integration to JBoss AS?
            Last time I upgraded to JBoss JAXR 1.2.1 GA, see: JBAS-6121.
            This release uses scout 0.7rc2 and juddi 0.9RC4.

            • 3. Re: Upgrading Scout/JUDDI combo
              asoldano

              Richard, I asked Anil for any comments/suggestions about what to do to update to the latest Scout because of https://jira.jboss.org/jira/browse/JBPAPP-937.

              Anil, thanks, I'll read your posts carefully and let you know.

              • 4. Re: Upgrading Scout/JUDDI combo
                anil.saldhana

                Check with tcunning also. He has experience in scout/juddi. Any custom implementation of the IRegistry interface of scout can be done in the JBoss JAXR project.

                • 5. Re: Upgrading Scout/JUDDI combo
                  tcunning

                  https://issues.apache.org/jira/browse/SCOUT-43

                  represents the change from xmlbeans -> JAXB. I'll start looking into it but I think this involves changing the entire JAXR stub which is not a small change.

                  What Anil is saying sounds right for now - that AS should use the scout 0.72rc2 version, upgrade jUDDI to 2.0rc5, and we'll work on supporting JAXB so that we can move scout to the latest version.

                  • 6. Re: Upgrading Scout/JUDDI combo
                    asoldano

                    OK, thank you Tom and Anil.

                    • 7. Re: Upgrading Scout/JUDDI combo
                      anil.saldhana

                       

                      "tcunning" wrote:
                      https://issues.apache.org/jira/browse/SCOUT-43

                      represents the change from xmlbeans -> JAXB. I'll start looking into it but I think this involves changing the entire JAXR stub which is not a small change.


                      It is probably 10 mins to generate the JAXB2 code from UDDIv2 schema and maybe 1-2 days work, if you put your head into it.

                      JAXR is deprecated for EE6 for removal in the future which means we will remove scout/juddi combo from AS (maybe for JBoss AS7).

                      • 8. Re: Upgrading Scout/JUDDI combo
                        ropalka

                         

                        "tcunning" wrote:
                        What Anil is saying sounds right for now - that AS should use the scout 0.72rc2 version, upgrade jUDDI to 2.0rc5, and we'll work on supporting JAXB so that we can move scout to the latest version.


                        Why AS should use the scout 0.72rc2 version and not 1.0rc1 for example?

                        • 9. Re: Upgrading Scout/JUDDI combo
                          ropalka

                          I successfully ran jaxr TCK5 test suite with the following components:

                          AS trunk
                          Scout 1.0.rc1
                          JUDDI 2.0.rc5

                          However the switch from JUDDI 0.9rc4 -> 2.0.rc5 isn't painless.
                          There are DB schema changes, thus this upgrade can't be applied to AS 4.2.x series because of backward compatibility. However we're ready to go with JUDDI and Scout up2date components with AS trunk.

                          • 10. Re: Upgrading Scout/JUDDI combo
                            ropalka

                             

                            "tcunning" wrote:
                            What Anil is saying sounds right for now - that AS should use the scout 0.72rc2 version, upgrade jUDDI to 2.0rc5, and we'll work on supporting JAXB so that we can move scout to the latest version.


                            We will upgrade both JUDDI and Scout in AS trunk with XMLBeans dependency.
                            However this dependency will be removed from AS code base once SCOUT-43 issue will be fixed and Scout release incorporating that fix will be available.

                            • 11. Re: Upgrading Scout/JUDDI combo
                              anil.saldhana

                              Do not touch AS with any upgrades of scout and bring in xmlbeans dependency.

                              First try to understand what the problem is. This thread actually spoonfeeds you with info.

                              • 12. Re: Upgrading Scout/JUDDI combo
                                ropalka

                                 

                                "tcunning" wrote:
                                What Anil is saying sounds right for now - that AS should use the scout 0.72rc2 version, upgrade jUDDI to 2.0rc5, and we'll work on supporting JAXB so that we can move scout to the latest version.


                                Nice in theory but wrong in reality. Scout 0.7x tries to call jUDDI methods that doesn't exist in jUDDI 2.0rc5. Here's one example:


                                12-08-2008 14:56:56: ERROR: java.lang.NoSuchMethodError: org.apache.juddi.datatype.tmodel.TModel.getName()Ljava/lang/String;
                                at org.apache.ws.scout.util.ScoutUddiJaxrHelper.getConcept(ScoutUddiJaxrHelper.java:370)
                                at org.apache.ws.scout.registry.BusinessQueryManagerImpl.getRegistryObject(BusinessQueryManagerImpl.java:739)

                                ...


                                IOW, Scout 0.7rc2 can't be used in combination with jUDDI 2.0rc5.

                                • 13. Re: Upgrading Scout/JUDDI combo
                                  ropalka

                                  What about Scout 1.0rc1 it uses xml beans in multiple sources, not just IRegistry implementation:


                                  [/home/opalka][/home/opalka/THIRDPARTY/SCOUT/sources/tags]>grep -r "xmlbeans" * | grep -v "\.svn" | grep import
                                  v1.0rc1/scout/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java:import org.apache.xmlbeans.XmlObject;
                                  v1.0rc1/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java:import org.apache.xmlbeans.XmlCursor;
                                  v1.0rc1/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java:import org.apache.xmlbeans.XmlException;
                                  v1.0rc1/scout/src/main/java/org/apache/ws/scout/registry/RegistryImpl.java:import org.apache.xmlbeans.XmlObject;
                                  v1.0rc1/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java:import org.apache.xmlbeans.XmlObject;


                                  Thus it's not just about replacing the IRegistry implementation. Also ScoutJaxrUddiHelper is heavily reused in scout and there's no JVM property for replacing it with custom impl:(