1 Reply Latest reply on Jun 15, 2009 6:40 AM by Gareth Carter

    SOAP POST request not working under Jboss app server but out

    Gareth Carter Newbie

      (I hope I have posted in the right place, I'm new to this stuff)

      Hi, I'm developing a web service in Jboss that talks to a .net web service. I've done all the wsimport things and generated the classes and it all looks good. BUT if I send data from JBoss the .net service returns a web page with the error "404 not found". If I send the data from a normal java class run standalone the data works and I get back a correct response. I have sniffed the TCP data we are sending and notice the only difference is the TCP headers.

      This FAILS (I have changed the host names) run under Jboss

      POST /webservices/Session.asmx HTTP/1.1
      SOAPAction: "http://example.com/webservices/Create"
      Content-Type: application/soap+xml; charset=UTF-8
      JBoss-Remoting-Version: 22
      User-Agent: JBossRemoting - 2.2.2.SP8
      Host: dev.test.com
      Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
      Connection: keep-alive
      Transfer-Encoding: chunked


      This works as a standalone application

      POST /webservices/Session.asmx HTTP/1.1
      SOAPAction: "http://example.com/webservices/Create"
      Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
      Content-Type: text/xml; charset=utf-8
      User-Agent: Java/1.6.0_11
      Host: dev.test.com
      Connection: keep-alive
      Content-Length: 276


      The source code is identical, as you can see JBoss is using JBossRemoting and this is causing the problem (I think). Does anyone know a solution??

      Thanks,

      Gart


        • 1. Re: SOAP POST request not working under Jboss app server but
          Gareth Carter Newbie

          I'll answer my own question.

          By default the JBossWS doesn't send the Content-Length and it sends the data chunked.

          After searching around I discovered that changing
          jboss-4.2.3.GA\server\default\deploy\jbossws.sar\META-INF\standard-jaxws-client-config.xml
          from the default 2048 to -1 means that the Content-Length is sent in the POST message

          <client-config>
           <config-name>Standard Client</config-name>
           <feature>http://org.jboss.ws/dispatch/validate</feature>
           <property>
           <property-name>http://org.jboss.ws/http#chunksize</property-name>
           <property-value>-1</property-value>
           </property>
           </client-config>


          Before IIS was rejecting the message with a 404 Page not found, now it works!

          I hope someone else finds this useful!

          Gart