You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by to...@comptel.com on 2006/03/16 18:41:00 UTC
[Axis2] Resend:Sender=null trying to use version 0.95-SNAPSHOT
Hi developers,
I've got no answers on this on axis-user, so I'm trying the dev-list.
Using a SNAPSHOT of 0.95 I got the sender object = null as described a few
days ago. As far as I can see, I coded the client right. Is this a bug in the
code or do you have test clients that are able to send the SOAP-message using
generated stub and configuration with Options like I do? If it is a bug,
please tell me so I can file it in Jira.
Best regards / vennlig hilsen
Tore Larsen
Senior Software Engineer
Comptel Communication AS
e-mail : tore.larsen@comptel.com <ma...@comptel.com>
Original message below:
Hei,
I have tried to use generated stub from my client class:
<client-snip>
/* Create the client stub for service invokation */
DLExternalInformationStub stub = new
DLExternalInformationStub(null, endpointServiceURL);
/* get serviceClient */
ServiceClient serviceClient = stub._getServiceClient();
/* set client options */
Options clientOptions = new Options();
clientOptions.setTimeOutInMilliSeconds(connectionTimeout);
clientOptions.setTranportOut(new TransportOutDescription(new
QName(Constants.TRANSPORT_HTTP)));
clientOptions.setTransportIn(new TransportInDescription(new
QName(Constants.TRANSPORT_HTTP)));
clientOptions.setUseSeparateListener(false);
serviceClient.setOptions(clientOptions);
stub._setServiceClient(serviceClient);
/* Service invocation */
QueryExternalInformationResponseDocument responseDoc =
stub.queryExternalInformation(requestDoc);
</client-snip>
I receive 'null' in response and the soap-message never leaves my client side
implementation. I have debugged it and found that in the AxisEngine class the
following method invoke the remote service:
<AxisEngine-snip>
public void send(MessageContext msgContext) throws AxisFault {
.......
if (!msgContext.isPaused()) {
// write the Message to the Wire
TransportOutDescription transportOut =
msgContext.getTransportOut();
TransportSender sender = transportOut.getSender();
// This boolean property only used in client side fireAndForget
invocation
//It will set a property into message context and if some one has
set the
//property then transport sender will invoke in a diffrent thread
Object isTranportBlocking = msgContext.getProperty(
MessageContext.TRANSPORT_NON_BLOCKING);
if (isTranportBlocking != null && ((Boolean)
isTranportBlocking).booleanValue()) {
msgContext.getConfigurationContext().getThreadPool().execute(
new TranportNonBlockingInvocationWorker(msgContext,
sender));
} else {
sender.invoke(msgContext);
}
}
}
</AxisEngine-snip>
The problem is that the sender object is NULL at the time it is ment to be
used to invoke.
A bug or am I lacking any configuration in my client class using the
generated stub?
Best regards / vennlig hilsen
Tore Larsen
Senior Software Engineer
Comptel Communication AS
e-mail : tore.larsen@comptel.com
<ma...@edbtelesciences.com>