Wednesday Jun 13, 2007

Strange "Software caused connection abort: recv failed"

Recently I was investigating Grizzly related bug, which appeared when Grizzly tried to redirect (HTTP response code 302) Java HTTPS client. And the bug appeared only in situations, when client tried to send some payload data to server, not just HTTP headers.
Finally I realize, that it has nothing to do neither with Grizzly nor HTTPS/SSL. Following scenario fully reproduces the problem with clear Sockets:
1) Client -> Server: client sends request chunk#1
2) Server -> Client: server reads chunk#1, processes, writes response
3) Server closes connection
4) Client -> Server: client sends request chunk#2
5) Client tries to read server response: "java.net.SocketException: Software caused connection abort: recv failed"

As the result client will not be able to read any byte from server's response!
What is interesting on step (4) we don't see any exception, but this step (sending data over connection, which is closed by peer) is the reason of the exception we're getting on (5). Removing step (4) from our scenario, or putting it before step (3) - makes everything work.
Actual exception looks strange for me, as it is thrown not from the place, which causes the problem.

Wednesday Apr 11, 2007

SOAP/TCP support in NetBeans WSIT plugin

Sometime ago I described how it's possible to use SOAP/TCP transport Web services communication, adding required policy assertion directly to WSIT config files. That way is not easy, as there are several deployment cases, with own specifics and own descriptor files.

Now I want to show, how you can do that much easier with NetBeans. There is WSIT plugin for NetBeans IDE, which is being written by Martin Grebac. This plugin takes care about possible cases you can meat, and with its help you can easily turn on SOAP/TCP transport for Web service and Web service client. All you need - just mark the SOAP/TCP transport checkbox! Web service and Web service client will start to use SOAP/TCP in communications only if both are marked to support SOAP/TCP transport.

In Martin's blog there is info where to get and how to install WSIT plugin. I will just attach two WSIT plugin screenshots: one for Web service, one for Web service client to help you find required check boxes :)

Web service SOAP/TCP configuration:

SOAP/TCP checkbox (for Web service) in WSIT plugin
 

Web service client SOAP/TCP configuration:

SOAP/TCP checkbox (for Web service client) in WSIT plugin
 

About

oleksiys

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today