[ 
http://issues.apache.org/jira/browse/AXIS2-849?page=comments#action_12422086 ] 
            
Michele Mazzucco commented on AXIS2-849:
----------------------------------------

Deepal, now the message is sent, however the control is not returned to the 
caller

This is the chunk of code calling the send method 

try {
                     if (log.isDebugEnabled()) {
                log.debug("Handler [" + super.service + "]: sending 
request...");
                     }
        send(request, node);
        if (log.isDebugEnabled()) {
                log.debug("Handler [" + super.service + "]: request sent");
        }
                        
                        
        this.busy.add(node);
} catch (AxisFault e) {
        this.idle.add(node);
        if (log.isEnabledFor(Level.ERROR)) {
                log.error("Handler [" + this.service + "]: send failed "
                + e.getLocalizedMessage());
        }
}



while this is the send() method using sendRobust()


protected final void send(Schedulable r, String node) throws AxisFault {
                
        // Creates the endpoint
        String target = createTargetPath(node);                         
        EndpointReference targetEPR = new EndpointReference(target);
                
        // Creates and fills the options
        Options options = new Options();
        options.setTo(targetEPR);
        options.setAction(r.getWSAction());
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
        // Uses 2 channels
        options.setUseSeparateListener(true);
                
        ServiceClient sender = new ServiceClient();
        sender.engageModule(QOSPConstants.MODULE_ADDRESSING);
        sender.setOptions(options);
                
        sender.addHeader(createHeader(r, System.currentTimeMillis()));
                
        //sender.fireAndForget(r.getRequest()); // fireAndForget + 
Thread.sleep() works fine
        sender.sendRobust(r.getRequest());
        if (log.isDebugEnabled()) {
                log.debug("Send robust successfully executed");
        }
}

And this is the log:

INFO  QueueSizeScheduler:queueRequest - Found node [10.8.149.156:18080]
DEBUG QueueSizeServiceHandler:submitRequest - Handler [MyService]: sending 
request...
DEBUG QueueSizeServiceHandler:computeLoad - Handler [MyService]:history size is 
[2]
DEBUG QueueSizeScheduler$LoadCalculationTask:run - Handler [MyService], load is 
[0.3563283922462942]
DEBUG QueueSizeScheduler$LoadCalculationTask:run - Sum is [0.35632839798927307]
....

As you can see the log after the send() method (or the log after the 
sendRobust() call) are missing. What happens there?

>  NullPointerException in OutInAxisOperationClient
> -------------------------------------------------
>
>                 Key: AXIS2-849
>                 URL: http://issues.apache.org/jira/browse/AXIS2-849
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.0
>         Environment: Windows XP SP2, Java J2SE 1.5.0_03, Axis 2 SNAPSHOT Jun 
> 08, 2006
>            Reporter: Michele Mazzucco
>         Assigned To: Deepal Jayasinghe
>
> I'm trying to send a message from a web service A to a web service B, but I 
> get this exception:
> ERROR
> ncl.qosp.controller.scheduler.weighted.WeightedAvgRespTimeServiceHandler
> - java.lang.NullPointerException
>       at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:260)
>       at 
> org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:350)
>       at 
> org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:330)
>       at
> ncl.qosp.controller.scheduler.weighted.WeightedAvgRespTimeServiceHandler.client(WeightedAvgRespTimeServiceHandler.java:609)
>       at
> ncl.qosp.controller.scheduler.weighted.WeightedAvgRespTimeServiceHandler.send(WeightedAvgRespTimeServiceHandler.java:560)
>       at
> ncl.qosp.controller.scheduler.weighted.WeightedAvgRespTimeServiceHandler.addResource(WeightedAvgRespTimeServiceHandler.java:333)
>       at
> ncl.qosp.controller.scheduler.weighted.WeightedAvgRespTimeScheduler.requireResources(WeightedAvgRespTimeScheduler.java:296)
>       at
> ncl.qosp.controller.scheduler.weighted.WeightedAvgRespTimeServiceHandler.setOptimalValue(WeightedAvgRespTimeServiceHandler.java:284)
>       at
> ncl.qosp.controller.scheduler.weighted.WeightedAvgRespTimeScheduler$ReminderTask.reallocateResources(WeightedAvgRespTimeScheduler.java:549)
>       at
> ncl.qosp.controller.scheduler.weighted.WeightedAvgRespTimeScheduler$ReminderTask.run(WeightedAvgRespTimeScheduler.java:519)
>       at java.util.TimerThread.mainLoop(Timer.java:512)
>       at java.util.TimerThread.run(Timer.java:462)
> The chunk of code generating the above exception is:
> EndpointReference targetEPR = new EndpointReference(target);
> Options options = new Options();
> options.setTo(targetEPR);
> options.setAction("urn:echo");
> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> options.setUseSeparateListener(true);
> ServiceClient sender = new ServiceClient();
> sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
> sender.setOptions(options);
>               
> try {
>       sender.sendRobust(r.request);
> } catch (Exception e) {
>       StringWriter sw = new StringWriter();
>       PrintWriter pw = new PrintWriter(sw);
>       e.printStackTrace(pw);
>       log.error(sw.getBuffer().toString());
>       pw.close();
> }
> Please note that this code works if a sendReceiveNonBlocking() call is
> used instead of sendRobust().

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to