2 Replies Latest reply on Feb 4, 2008 4:54 PM by Sergey Petrov

    Juddi broken on 4.2.1 + 4.2.2

    Patrick Leamon Newbie

      Not sure if this is the right forum or not, so feel free to move it.

      I've been using jboss AS 4.0.5 GA and 4.2.0 GA and have been successfully using the juddi service as my uddi registry. When I move to 4.2.1 GA or 4.2.2 GA I now get this:
      ERROR [org.jboss.jaxr.juddi.JUDDIServlet] org.jboss.ws.core.soap.TextImpl
      java.lang.ClassCastException: org.jboss.ws.core.soap.TextImpl
      at org.jboss.jaxr.juddi.JUDDIServlet.doPost(JUDDIServlet.java:120)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      ...

      There seem to be a few related posts/jira issues, but I'm not sure if they are the same issue or not.

      Basically I'm trying to publish to the registry. I've tried using various server configs, but even the 'all' config doesn't work.

      Is this something that will be fixed in a future release?

        • 1. Re: Juddi broken on 4.2.1 + 4.2.2
          John Kurtz Newbie

          I got Juddi version 2.0 working on JBoss 4.2.2. I created a new server instance and am connecting with an Oracle Database.

          I am now striving to publish to the UDDI registry. Something has changed with the new version of jUDDI that requires the BusinessQueryManager to accept only SOAP messages instead of strings. This effectively breaks the example at

          http://wiki.jboss.org/wiki/Wiki.jsp?page=UDDIExample

          ============

          This is how it breaks now

          When the following is called on a BusinessQueryManager object

          businessQueryManager.getRegistryObject("some String", LifeCycleManager.CLASSIFICATION_SCHEME);

          the following error occurs:
          Cannot unmarshall SOAPMessage
          javax.xml.soap.SOAPException: Unsupported content type: text/html; charset=utf-8
          at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:248)
          at org.jboss.ws.core.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:84)
          at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:502)
          at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:306)
          at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:136)
          at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
          at org.jboss.remoting.Client.invoke(Client.java:1634)
          at org.jboss.remoting.Client.invoke(Client.java:548)
          at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:183)
          at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
          at org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal(SOAPConnectionImpl.java:106)
          at org.jboss.ws.core.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:66)
          at org.jboss.jaxr.juddi.transport.SaajTransport.send(SaajTransport.java:81)
          at org.apache.juddi.proxy.RegistryProxy.execute(RegistryProxy.java:368)
          at org.apache.juddi.AbstractRegistry.getTModelDetail(AbstractRegistry.java:547)
          at org.apache.juddi.AbstractRegistry.getTModelDetail(AbstractRegistry.java:532)
          at org.apache.ws.scout.registry.BusinessQueryManagerImpl.getRegistryObject(BusinessQueryManagerImpl.java:681)
          at com.boeing.pw.uddi.publisher.WSDLConverter.(WSDLConverter.java:59)
          at com.boeing.pw.uddi.publisher.RegConnectionFactory.createOrganization(RegConnectionFactory.java:106)
          at com.boeing.pw.uddi.publisher.WSDLPublisher.init(WSDLPublisher.java:108)
          at com.boeing.pw.uddi.test.TestMain.testPublisher(TestMain.java:63)
          at com.boeing.pw.uddi.test.TestMain.main(TestMain.java:21)
          - Exception::
          javax.xml.soap.SOAPException: java.io.IOException: Could not transmit message
          at org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal(SOAPConnectionImpl.java:115)
          at org.jboss.ws.core.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:66)
          at org.jboss.jaxr.juddi.transport.SaajTransport.send(SaajTransport.java:81)
          at org.apache.juddi.proxy.RegistryProxy.execute(RegistryProxy.java:368)
          at org.apache.juddi.AbstractRegistry.getTModelDetail(AbstractRegistry.java:547)
          at org.apache.juddi.AbstractRegistry.getTModelDetail(AbstractRegistry.java:532)
          at org.apache.ws.scout.registry.BusinessQueryManagerImpl.getRegistryObject(BusinessQueryManagerImpl.java:681)
          at com.boeing.pw.uddi.publisher.WSDLConverter.(WSDLConverter.java:59)
          at com.boeing.pw.uddi.publisher.RegConnectionFactory.createOrganization(RegConnectionFactory.java:106)
          at com.boeing.pw.uddi.publisher.WSDLPublisher.init(WSDLPublisher.java:108)
          at com.boeing.pw.uddi.test.TestMain.testPublisher(TestMain.java:63)
          at com.boeing.pw.uddi.test.TestMain.main(TestMain.java:21)

          • 2. Re: Juddi broken on 4.2.1 + 4.2.2
            Sergey Petrov Newbie

            pleamon wrote on Dec 4, 2007:

            I've been using jboss AS 4.0.5 GA and 4.2.0 GA and have been successfully using the juddi service as my uddi registry. When I move to 4.2.1 GA or 4.2.2 GA I now get this:
            ERROR [org.jboss.jaxr.juddi.JUDDIServlet] org.jboss.ws.core.soap.TextImpl
            java.lang.ClassCastException: org.jboss.ws.core.soap.TextImpl
            at org.jboss.jaxr.juddi.JUDDIServlet.doPost(JUDDIServlet.java:120)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            ...

            Yes, JBoss 4.2.2 ships with a broken jUDDI implementation. JBoss adds its own org.jboss.jaxr.juddi.JUDDIServlet (located under ${JUDDI_SAR}/juddi.war/WEB-INF/classes) on the top of Apache's juddi. This class contains a bug in doPost() method.

            The cause of the problem is mentioned in JBossWS JIRA (you have to scroll all the way down to Richard Oplaka's comment from Jan 8, 2008):
            http://jira.jboss.com/jira/browse/JBWS-1905
            On JUDDI side this problem is documented here: https://issues.apache.org/jira/browse/JUDDI-114

            Looks like JBoss developers changed JBossWS code to follow SOAP specification (see discussion here: http://www.jboss.org/?module=bb&op=viewtopic&t=100782) but forgot to fix multiple clients of their code (JUDDIServlet included). The problematic pattern is here:
            SOAPBody soapReqBody = soapReq.getSOAPBody();
            Element uddiReq = (Element)soapReqBody.getFirstChild();


            If you can patch JUDDIServlet, replace the above fragment with something like this and it will work fine:
            SOAPBody soapReqBody = soapReq.getSOAPBody();
            Iterator elements = soapReqBody.getChildElements();
            Element uddiReq = null;
            while ( elements.hasNext() ){
             Object element = elements.next();
             if ( element instanceof Element ){
             uddiReq = (Element) element;
             break;
             }
            }