2 Replies Latest reply on Mar 4, 2013 4:33 AM by varsha.g

    Jboss7.1.1.Final send big size JSON data via Http Post

    varsha.g

      Hello all,

       

             I'm having json which has large size and when it exceeds 5kb , it throws exception

       

             java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at

                org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149) at

                org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110) at

                org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:264) at

                org.apache.http.impl.conn.LoggingSessionInputBuffer.readLine(LoggingSessionInputBuffer.java:115) at

                 org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98)

       

         http://geekswithblogs.net/frankw/archive/2008/08/05/how-to-configure-maxjsonlength-in-asp.net-ajax-applications.aspx

            as per above link there is a following format

       

      <system.web.extensions>

          <scripting>

            <webServices>

              <jsonSerialization maxJsonLength="500000">

              </jsonSerialization>

            </webServices>

          </scripting>

      </system.web.extensions>

       

      we can set maxJsonLength

       

       

       

       

          So same way Is there any configuration needs to do in Jboss7.1.1.Final to  maximize size of json to accept large json?

           If yes please provide syntax.

       

          Also I've gone through some links about maxpostsize will it be helpful in this?

       

          I'm working on this using webservcie client

       

         as following

       

           

      Also am using Webservice client to send above data in string format via HttpPost using following.

      HttpPost request = new HttpPost(BASE_URL + SEND_URL + "/" + URLEncoder.encode(new Gson().toJson(input))); 
      request
      .addHeader("content-type", "application/x-www-form-urlencoded");
      HttpResponse response = httpClient.execute(request);

      I'm using javax.ws with version 6.0

       

           Main concern is when client sends large size json data  via HttpPost , it throws exception as above while Jboss7.1.1.Final is used.