Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 26986 invoked from network); 14 May 2006 11:15:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 May 2006 11:15:06 -0000 Received: (qmail 15650 invoked by uid 500); 14 May 2006 11:14:45 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 14658 invoked by uid 500); 14 May 2006 11:14:40 -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: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 13364 invoked by uid 99); 14 May 2006 11:14:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 May 2006 04:14:25 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.191.125.120] (HELO web38914.mail.mud.yahoo.com) (209.191.125.120) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 14 May 2006 03:43:02 -0700 Received: (qmail 82531 invoked by uid 60001); 14 May 2006 10:42:41 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=6NStgVai9rruWYwpM4izbCr9UgLLiJWXYQc9Cp4CD2vaIvbDBW67phLO6xFpHnz3ulPkpBV7S87FySP5lM5/76cgz6R/HGORk84TaXNSPnHqv4A1BZQX2mjLCIUcBuWS1XfFRA8Jy0e4tDpUiEJcF9kz4lzKFP18mHLkD+zurKw= ; Message-ID: <20060514104241.82529.qmail@web38914.mail.mud.yahoo.com> Received: from [88.224.178.5] by web38914.mail.mud.yahoo.com via HTTP; Sun, 14 May 2006 03:42:41 PDT Date: Sun, 14 May 2006 03:42:41 -0700 (PDT) From: Ali Sadik Kumlali Subject: Re: [Axis2][1.0] Unexpected EOF in prolog To: axis-user@ws.apache.org In-Reply-To: <9d4ec10b0605132222w179af1e6n3a09b557eea80fb6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Chamikara, Thank you very much for the valuable comments. With your help, I've discovered that my assumption was wrong. In sendResult(), I must have call fireAndForget() instead of sendReceive(), since I didn't expect a response from the client. By using fireAndForget() the code runs as expected. Now, only thing remained is to make my custom fireAndForget() that let me handle HTTP 500 situations ;-) Regards, Ali Sadik Kumlali --- Chamikara Jayalath wrote: > Hi Ali, > > Even though you have done changes to your service code you are still > using > the serviceClient.sendReceive() method in the client side which uses > the > OutInAxisOperationClient. > > When useSeperateListner=false, OutInAxisOperationClient expects a > same-channel response message and that should be the reason for this > exception. When it is true what is expected is a asnyc response which > you > send within your service code. > > Chamikara > > > On 5/14/06, Ali Sadik Kumlali wrote: > > > > Hi all, > > > > Has anyone ran into this exception? I could manage :) to get it > with > > following steps: > > > > - Used EchoBlockingDualClient sample. Didn't change client code. > > - Changed message receiver of MyService to > RawXMLINOnlyMessageReceiver > > - Changed MyService.java as following: > > > > > ---------------------------------------------------------------------- > > public class MyService { > > > > private MessageContext inMsgCtx; > > > > public void setOperationContext(OperationContext opctx) > > throws AxisFault { > > inMsgCtx = > > > opctx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); > > } > > > > public void echo (OMElement incomingPayload) > > > > throws XMLStreamException { > > incomingPayload.build(); > > incomingPayload.detach(); > > > > OMElement outgoingPayload = incomingPayload; > > > > oldOptions = inMsgCtx.getOptions(); > > String messageID = inMsgCtx.getMessageID(); > > EndpointReference targetEPR = oldOptions.getReplyTo(); > > String action = oldOptions.getAction(); > > sendResult(messageID, targetEPR, action, outgoingPayload); > > } > > > > public void sendResult(String messageId, EndpointReference > targetEPR, > > String action, OMElement payload) { > > ServiceClient sender = null; > > try { > > Options options = new Options(); > > options.setTo(targetEPR); > > options.setTransportInProtocol(Constants.TRANSPORT_HTTP); > > options.setUseSeparateListener(false); > > options.setAction(action); > > options.setMessageId(UUIDGenerator.getUUID()); > > options.setRelationships(new RelatesTo[] { > > new RelatesTo(messageId, > > AddressingConstants.Submission. > > WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE)}); > > > > ConfigurationContext confCtx = > > ListenerManager.defaultConfigurationContext; > > sender = new ServiceClient(confCtx, null); > > sender.setOptions(options); > > > > // Blocking Invocation > > sender.sendReceive(payload); > > } catch (AxisFault axisFault) { > > axisFault.printStackTrace(); > > } catch (Exception ex) { > > ex.printStackTrace(); > > } finally { > > try { > > sender.finalizeInvoke(); > > } catch (AxisFault axisFault) { > > // have to ignore this > > axisFault.printStackTrace(); > > } > > } > > } > > } > > > ---------------------------------------------------------------------- > > > > When I pass "true" to setUseSeparateListener(), there is no > problem. > > Otherwise I get following exception: > > > > > ---------------------------------------------------------------------- > > [DEBUG][2006-05-13 23:15:08,046] org.apache.axis2.engine.Phase - > > Checking post-conditions for phase "MessageOut" > > postMethod.getStatusCode(): 200 > > contentEncoding: null > > org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: > > Unexpected EOF in prolog > > at [row,col {unknown-source}]: [1,0]; nested exception is: > > org.apache.axiom.om.OMException: > com.ctc.wstx.exc.WstxEOFException > > : > > Unexpected EOF in prolog > > at [row,col {unknown-source}]: [1,0] > > at > > org.apache.axis2.transport.TransportUtils.createSOAPMessage( > > TransportUtils.java:126) > > at > > org.apache.axis2.transport.TransportUtils.createSOAPMessage( > > TransportUtils.java:67) > > at > > org.apache.axis2.description.OutInAxisOperationClient.send( > > OutInAxisOperation.java:349) > > at > > org.apache.axis2.description.OutInAxisOperationClient.execute( > > OutInAxisOperation.java:279) > > at > > > org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:513) > > ... > > > ---------------------------------------------------------------------- > > > > Is it normal behavior due to a missing point in my code, or is it a > > bug? > > > > Any help would be appreciated. > > > > Regards, > > > > Ali Sadik Kumlali > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com