If this is a java code, maybe the SO Posts below can help you determine what's wrong and where did you messed up in your code. Since I am not sure what code you are using, I'll give you an example where this error always occur.
- SO post 1
"Exception in thread "main" java.net.SocketException: Connection
reset" error occurs when the opponent is forcibly terminated without
calling close().
Maybe there is something in your code that forced the opponent to be terminated without calling the close()
function.
If that's the case, you can add this two line in both
Client
skt.close();
and ServerSock
ss.close();
Note: java.io.Closeable implementing object must call close ().
- SO post 2
javadoc for SocketException states that
Thrown to indicate that there is an error in the underlying protocol
such as a TCP error
The connection in the server end maybe closed and caused the issue when sending the issue at their end.
To aid debugging you could look at using a tool such as Wireshark to
view the actual network packets. Also, is there an alternative client
to your Java code that you could use to test the web service? If this
was successful it could indicate a bug in the Java code.
As you are using Commons HTTP Client have a look at the Common HTTP
Client Logging Guide. This will tell you how to log the request at the
HTTP level.
Hope 1 of these two answers will help you.