[jboss-user] [JBossWS] - Re: Juddi broken on 4.2.1 + 4.2.2

petrovs do-not-reply at jboss.com
Mon Feb 4 16:55:00 EST 2008


pleamon wrote on Dec 4, 2007: anonymous wrote : 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;
  |   }
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126361#4126361

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126361



More information about the jboss-user mailing list