4 Replies Latest reply on Mar 16, 2009 9:05 AM by sara1232007

    Urgent: Problems of running web service war on JBoss

      Hi,

      I have deployed the web service war on JBoss successfully. But I get the ServletException of "non-HTTP request or response" thrown by server after the client invoke an operation.

      The information on server is as following:

      ===============================================================================
      
       JBoss Bootstrap Environment
      
       JBOSS_HOME: F:\WORK_SOFTWARE_DOC\JBOSS\jboss-5.0.0.GA
      
       JAVA: D:\Program Files\Java\jdk1.5.0\bin\java
      
       JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=25
      6m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Ds
      un.rmi.dgc.server.gcInterval=3600000
      
       CLASSPATH: F:\WORK_SOFTWARE_DOC\JBOSS\jboss-5.0.0.GA\bin\run.jar
      
      ===============================================================================
      
      ........
      
      11:20:14,703 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=
      JBoss_5_0_0_GA date=200812041714)] Started in 1m:29s:532ms
      11:20:19,937 ERROR [[ApacheMuseServlet]] Servlet.service() for servlet ApacheMus
      eServlet threw exception
      javax.servlet.ServletException: non-HTTP request or response
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:818)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:235)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:191)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:190)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:92)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
      ss(SecurityContextEstablishmentValve.java:126)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
      e(SecurityContextEstablishmentValve.java:70)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
      onnectionValve.java:158)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:330)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :828)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ss(Http11Protocol.java:601)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
      7)
       at java.lang.Thread.run(Thread.java:595)
      
      


      The SOAP msg sent by client is as following:

      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
       <soap:Header>
       <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://127.0.0.1:8086/wsrf/services/ServiceGroup</wsa:To>
       <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsrf/rpw-2/GetResourcePropertyDocument/GetResourcePropertyDocumentRequest</wsa:Action>
       <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:1450698e-cf7b-2cf7-59f5-f0fd3cbb5477</wsa:MessageID>
       <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
       <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
       </wsa:From>
       </soap:Header>
       <soap:Body>
       <wsrf-rp:GetResourcePropertyDocument xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"/>
       </soap:Body>
      </soap:Envelope>
      
      


      Can anyone help me with this?

      Thanks.

      SARA

        • 1. Re: Urgent: Problems of running web service war on JBoss

          This web service war is an example of apache muse platform. So I guess there might be no problem of the code. What might be confliction with JBoss.

          Can anyone give me some indication?
          Urgently need help.

          Thanks.

          • 2. Re: Urgent: Problems of running web service war on JBoss

            I correct what I've said. This web service war is developed for tomcat and it is successfully deployed and runned on tomact.

            Since tomcat need an additional SOAP protocol stack which included in the web service war I mentioned above, I guess the problem is that the SOAP protocol stack provided in this web service war is conflicted with that on JBoss. One way to solve the problem is to replace the SOAP protocol stack by that provided in this web service war. Am I right?

            Can anyone tell me where is the JBoss SOAP protocol stack jar in JBoss?

            Thanks.

            • 3. Re: Urgent: Problems of running web service war on JBoss
              peterj

              Look for the jbossws*.jar files in common/lib.

              • 4. Re: Urgent: Problems of running web service war on JBoss

                Hi,

                I just get to know that this web service program does not use any SOAP stack but just build on but axiom with the library provided by itself. I've tried to delete some SOAP related jars but it cause exceptions when the JBoss server starting.

                I decompile the javax.servlet.http.servlet and add some print before where error occurs and found that the problem might be caused some other java class confliction.
                Hope someone to give me some further help.
                Thanks.

                The service() operation code is modified as following:

                
                public abstract class HttpServlet extends GenericServlet
                 implements Serializable
                {
                ... ...
                
                 public void service(ServletRequest req, ServletResponse res)
                 throws ServletException, IOException
                 {
                 HttpServletRequest request;
                 HttpServletResponse response;
                System.err.println("HttpServlet.service(): req class:"+req.getClass().getName()+"----------------------");
                
                System.err.println("HttpServlet.service():rsp class:"+res.getClass().getName()+"-----------------------");
                
                 try
                 {
                 request = (HttpServletRequest)req;
                 response = (HttpServletResponse)res;
                 }
                 catch(ClassCastException e)
                 {
                 throw new ServletException("non-HTTP request or response");
                 }
                 service(request, response);
                 }
                
                }
                

                After I call the web service operation, I get Message from server as following:

                11:41:46,265 ERROR [STDERR] HttpServlet.service(): req class:org.apache.catalina
                .connector.RequestFacade----------------------
                11:41:46,265 ERROR [STDERR] HttpServlet.service():rsp class:org.apache.catalina.
                connector.ResponseFacade-----------------------
                11:41:46,265 ERROR [[ApacheMuseServlet]] Servlet.service() for servlet ApacheMus
                eServlet threw exception
                javax.servlet.ServletException: non-HTTP request or response
                 at javax.servlet.http.HttpServlet.service(Unknown Source)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
                icationFilterChain.java:290)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
                ilterChain.java:206)
                 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
                lter.java:96)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
                icationFilterChain.java:235)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
                ilterChain.java:206)
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
                alve.java:235)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
                alve.java:191)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
                yAssociationValve.java:190)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
                e.java:92)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
                ss(SecurityContextEstablishmentValve.java:126)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
                e(SecurityContextEstablishmentValve.java:70)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
                ava:127)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
                ava:102)
                 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
                onnectionValve.java:158)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
                ve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
                a:330)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
                :828)
                 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
                ss(Http11Protocol.java:601)
                 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
                7)
                 at java.lang.Thread.run(Thread.java:595)