Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 96040 invoked from network); 1 Dec 2003 16:16:04 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Dec 2003 16:16:04 -0000 Received: (qmail 38439 invoked by uid 500); 1 Dec 2003 16:15:49 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 38421 invoked by uid 500); 1 Dec 2003 16:15:48 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 38410 invoked from network); 1 Dec 2003 16:15:48 -0000 Message-ID: <3FCB6935.40106@cornell.edu> Date: Mon, 01 Dec 2003 11:15:49 -0500 From: Aaron Hamid User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-user@ws.apache.org Subject: Re: soap over tcp References: <3FCB630F.90806@managedmail.com> In-Reply-To: <3FCB630F.90806@managedmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Do you know if is ever emitted on the client? For debugging purposes, read the stream entirely into a byte array and then print the contents out as a string. The parser may either not be getting the final tag (I doubt this, the flush() on client side should send it), OR it may be default have validation turned on, and is waiting for the real "end" of the document so that it can do some sort of validation or display errors. Maybe there is a way to turn this off. Otherwise your only solution will be to consume the message yourself somehow (maybe by sending a leading number of bytes written to stream, or just by checking until end tag is reached) then just provide a streamsource from bytearrayinputstream. Using BufferedReader.readLine will almost never work and is a frequent error in network programming as the readLine method will block until an EOL series is reached, which may well never come. Aaron Srilekha Mudumbai wrote: > Group, > > This is what I am trying to do and I am unable to read the last line of > the SOAP > message. > > ---- on the client side ---- > SOAPMessage msg; //created and loaded with contents > msg.writeTo(socket.getOutputStream()); > socket.getOutputStream().flush(); > > ----- on the server side ----- > SOAPPart sp // obtained from the soap message > sp.setContent(new StreamSource(socket.getInputStream()); // this > approach hangs invariably > > Hence tried using BufferedReader for the socket input stream > > while (buffreader.readLine() != null) { > // print line > } > > this waits indefinitely for the ( the last line of the > soap message) > When I kill the client, the server gets it. I do not want to close the > client socket. > I would like to keep it open. > > Any suggestions? > > Regards > Srilekha