You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Michele Mazzucco <Mi...@ncl.ac.uk> on 2006/08/17 13:21:45 UTC

[Axis2] Asynchronous receiver misses messages

Hi all,

I'm experience a big problem when using an asynchronous (dual channel)
client: some messages are lost.
More formally, is the client has to wait for one message only, it works
fine, while if it has to wait for many responses some messages are lost
(please note that they are sent by the server). The callback receiver
I'm using is the following:

private static final class QospCallback extends Callback {

	private final int toReceive;

	private int received;

		
	QospCallback(int toSend) {
		this.toReceive = toSend;
		this.received = 0;
	}

		
	public void onComplete(AsyncResult result) {
		this.received++;
		if (log.isInfoEnabled()) {
		log.info("Received respose [" + 							(received) + "/" +
this.toReceive + "]");
		}
	} // -- onComplete()

	public void onError(Exception e) {
		this.received++;
		if (log.isEnabledFor(Level.ERROR)) {
			log.error("Failed to receive msg #" + 							this.received);
			logException(e);
		}
	} // -- onError()

	public void setComplete(boolean complete) {
		super.setComplete(this.received == 						this.toReceive);
	}

	public boolean isComplete() {
		return (this.received == this.toReceive);
	}

} // END QospCallback


The options used by the ServiceClient are just:

options.setUseSeparateListener(true);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);

This (as expected) makes no difference for what concerns the message
delivery:
options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);

while this
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
prevent messages from beeing delivered




Any suggest would be appreciated,
Michele

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org