The point is that I do not want to set an EPR in the client but defer that decision until later in the handler chain.
That way I could write a dynamic addressing handler.
Thomas
On 4/25/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
Hi Thomas,
You don't need to call setTranportOut, if your toEPR says it over HTTP.
Anyway, please create a JIRA on this and if possible please explain a
way to re-produce this. You might want to attach some code you have
already written :).
-- Chinthaka
Thomas Van de Velde wrote:
> Hello,
>
> I am trying to set the endpointreference in a module so that the client
> code does not need to be aware of the endpoint details. The goal is
> that this module takes over responsibility of setting the endpoint.
>
> When taking out options.setTo(...) from the client, I get an error
> indicating that the transport cannot be determined.("Cannot infer
> transport information from the URL information provided") I've fixed
> this by setting the TransportIn and TransportOut options. Now Axis is
> able to determine the transport details. However I am getting now
> getting a nullpointer exception in AxisEngine.send() line 544.
>
> I am using axis2 v0.95
>
> Client options:
>
> Options options = new Options();
> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> options.setTranportOut(new TransportOutDescription(new QName(
> Constants.TRANSPORT_HTTP)));
> options.setUseSeparateListener (false);
>
> Handler code:
>
> public void invoke(MessageContext msgContext) throws AxisFault {
> public static EndpointReference EPR = new EndpointReference(
> " http://localhost:8080/axis2/services/sample-provider");
> msgContext.setTo(EPR);
> log.info(msgContext.getEnvelope().toString());
> }
>
> All the rest of the configuration ( axis2.xml and module.xml) is
> identical to the LoggingModule sample.
>
> I guess this should be raised as a JIRA issue. Anything I can do to get
> past the nullpointer?
>
> Cheers,
> Thomas