5 Replies Latest reply on Mar 21, 2008 9:17 AM by martinmurphy

    IONA Fuse and Weblogic Service ..... Throws Nullpointer exception

    myilvahanan

      Hi All,

       

      Thanks in advance for your interest and responses.

       

      I am pretty new to ESB and am facing an issue. This may be a trivial mistake from my side. Please correct if my approach is wrong.

       

      I have a service running in the Weblogic.

       

      THE FLOW:

       

      Consumer -> Routing slip which then routs to the following Bean (I do String manipulation to change the namespace to the target service) -> Target service (Hosted in Weblogic) -> Bean (I do String manipulation to change the namespace back to the original)

       

      WHAT HAPPENS:

       

      Consumer -> Routing slip which then routes to Bean -> Target service (throws a null pointer error at the weblogic end)

       

      PROBLEM IN DETAIL

       

      1. The cousumer XBean

      <?xml version="1.0" encoding="UTF-8"?&gt;

       

      &lt;beans xmlns:http="http://servicemix.apache.org/http/1.0"

       

       

      &lt;/beans&gt;

       

      2. my-relay-in-transform-su XBean

      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

      &lt;beans xmlns:eip="http://servicemix.apache.org/eip/1.0"

       

      &lt;/beans&gt;

       

      3. my-relay-routing-slip-su XBean

      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

      &lt;beans xmlns:bean="http://servicemix.apache.org/bean/1.0"

      &lt;/beans&gt;

       

      4. my-relay-out-transform-su

      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

      &lt;beans xmlns:bean="http://servicemix.apache.org/bean/1.0"

      &lt;/beans&gt;

       

       

      5. my-relay-soap-producer-su

      &lt;?xml version="1.0" encoding="UTF-8"?&gt;

       

      &lt;beans xmlns:http="http://servicemix.apache.org/http/1.0"

       

      &lt;/beans&gt;

       

      ERROR DESCRIPTION

       

      a.  In Service mix console:

      EBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor

      EBUG - PhaseInterceptorChain - Invoking handleMessage on interceptor org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor

      NFO - PhaseInterceptorChain - Interceptor has thrown exception, unwinding now

      rg.apache.servicemix.soap.api.Fault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space

      etween public and system identifiers

      at row,col {unknown-source}: 1,55

      aused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system i

      entifiers

      at row,col {unknown-source}: 1,55

      EBUG - PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor

      EBUG - PhaseInterceptorChain - Invoking handleFault on interceptor org.apache.servicemix.soap.interceptors.mime.AttachmentsInInterceptor

      ARN - jetty - EXCEPTION

       

      b. In Weblogic console

      #### <[weblogic.servlet.internal.WebAppServletContext@1058579 - appName: '_appsdir_myapp-mockexternalservices-ear-1.1.7.1_ear', name: '/MyEndpointImpl', context-path: '/MyEndpointImpl'] Root cause of ServletException.

      javax.servlet.ServletException

           at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:39)

           at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:218)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)

           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)

           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)

           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)

           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)

           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

           at weblogic.security.service.SecurityManager.runAs(Unknown Source)

           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)

           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)

           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)

           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)

           at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

      java.lang.NullPointerException

           at com.sun.xml.ws.encoding.SOAPBindingCodec.compareStrings(SOAPBindingCodec.java:261)

           at com.sun.xml.ws.encoding.SOAPBindingCodec.isMultipartRelated(SOAPBindingCodec.java:245)

           at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:178)

           at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:151)

           at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:235)

           at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97)

           at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:36)

           at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:218)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

           at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)

           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)

           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)

           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)

           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)

           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

           at weblogic.security.service.SecurityManager.runAs(Unknown Source)

           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)

           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)

           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)

           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)

           at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

       

      FEW OBSERVATIONS:

      When captured the SOAP object through TCPMON, I could see the content type missing in the Header.  If I manualy add "Content-Type= application/xml" to the SOAP object and resend it through TCPMON to the destination service, it goes through successfully.

       

      It will be of help if some one of us can help me in resolving this issue.

       

      Thanks and Regards,

      Myilvahanan D

        • 1. Re: IONA Fuse and Weblogic Service ..... Throws Nullpointer exception
          bsnyder

          Please post the xbean.xml configuration you are using for the servicemix-http component.

           

          Bruce

          • 2. Re: IONA Fuse and Weblogic Service ..... Throws Nullpointer exception
            myilvahanan

            Hi Bruce,

             

            Thanks and appreciate the interest shown.

             

            THE CONSUMER

             

              <http:soap-consumer 
                   service="relay:MyWebService"
                endpoint="MyEndpoint"
                   targetService="relay:RoutingSlip"
                targetEndpoint="endpoint"    
                useJbiWrapper="false"
                wsdl="classpath:module3and4-relay.wsdl"
                locationURI="http://localhost:9090/MyWebService/"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                validateWsdl="false"
                />  
            

             

            THE PRODUCER

             

              <http:soap-provider 
                service="int:MyWebService"
                endpoint="MyEndpoint"
                useJbiWrapper="false"
                wsdl="classpath:my.wsdl"
                locationURI="http://localhost:7005/MyEndpointImpl/MyService"
                validateWsdl="false"
                />
            

             

            • 3. Re: IONA Fuse and Weblogic Service ..... Throws Nullpointer exception
              cnappin

              We've traced the problem to the lack of Content-Type created by the HTTP BC provider on the outgoing SOAP request to WebLogic. It doesn't seem to matter what it is set to, but WebLogic barfs if the HTTP header isn't there.

               

              This has been raised as (and a corresponding fault raised with BEA), and Adrian Trenaman is onsite today investigating further. He suggested we post here to see if anyone else has ever integrated FUSE ESB with WebLogic (or any other 3rd party system that doesn't like the lack of Content-Type) and has a work around?

               

              This is a very urgent issue and has halted all our ESB work on our project.

              • 4. Re: IONA Fuse and Weblogic Service ..... Throws Nullpointer exception
                bsnyder

                 

                We've traced the problem to the lack of Content-Type created by the HTTP BC provider on the outgoing SOAP request to WebLogic. It doesn't seem to matter what it is set to, but WebLogic barfs if the HTTP header isn't there.

                 

                 

                This problem can be addressed through the creation of a custom marshaler for the servicemix-http component. A custom marshaler is used for manipulating the inbound request before its wrapped in a message exchange. For an example of a custom marshaler for that handles RMI encoded requests from the Spring HTTP remoting API, see the SerializedMarshaler.

                 

                Bruce

                • 5. Re: IONA Fuse and Weblogic Service ..... Throws Nullpointer exception
                  martinmurphy

                  Unfortunately the soap-provider endpoint ignore the marshaller set in the xbean. There is a  bug raised against the ability to set the content type that includes a testcase that shows this.