[
http://issues.apache.org/jira/browse/AXIS2-619?page=comments#action_12376655 ]
Deepal Jayasinghe commented on AXIS2-619:
-----------------------------------------
The following line is not enough to create a Transport out
options.setTranportOut(new TransportOutDescription(new QName(
Constants.TRANSPORT_HTTP)));
You have to have TransportSender in side the description , so if you do smt
like below it will work.
TransportOutDescription transportOut = new TransportOutDescription(new QName(
Constants.TRANSPORT_HTTP));
transportOut.setSender(new TransportSender(){
public void cleanUp(MessageContext msgContext) throws AxisFault {}
public void init(ConfigurationContext confContext,
TransportOutDescription transportOut) throws AxisFault {}
public void cleanup() throws AxisFault {}
public void init(HandlerDescription handlerdesc) {}
public void invoke(MessageContext msgContext) throws AxisFault {}
public HandlerDescription getHandlerDesc() {
return null;
}
public QName getName() {
return null;
}
public Parameter getParameter(String name) {
return null;
}
});
options.setTransportOut(transportOut);
So if you create TranportoOutDescription correctly and set TransportSnder you
wont get any exception. And Axis2 will handle this scenario will perfectly I
tested that and it work for me. So I think I can resolve the issue .
> nullpointer when EPR not defined in client
> ------------------------------------------
>
> Key: AXIS2-619
> URL: http://issues.apache.org/jira/browse/AXIS2-619
> Project: Apache Axis 2.0 (Axis2)
> Type: Bug
> Components: core
> Versions: 0.95
> Reporter: Thomas Van de Velde
>
> You are expected to set the TransportOutDescription when the EPR is not
> defined in the client. The AxisEngine will now throw a nullpointer.
> Client:
> Options options = new Options();
>
> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> options.setTranportOut(new TransportOutDescription(new
> QName(
> Constants.TRANSPORT_HTTP)));
> //options.setTo(EPR);
> Problem Area:
> AxisEngine
> TransportOutDescription transportOut = msgContext.getTransportOut();
> TransportSender sender = transportOut.getSender();
> sender is null.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira