Fault-messages cause JbiChannel to throw NullPointerException
-------------------------------------------------------------

                 Key: SM-732
                 URL: https://issues.apache.org/activemq/browse/SM-732
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-jsr181
    Affects Versions: 3.0
         Environment: not relevant
            Reporter: Horst Studer


>From a service (jsr181 pojo), I am calling another service (also implemented 
>as a 
jsr181 pojo), using a jsr181 proxy. This works fine if the called service 
returns 
an out message. 

If, however, the called service throws an exception (i.e. returns a fault), 
there 
is a NullPointerException in ...jsr181.xfire.JbiChannel. 

There are two problems: 

After the sendSync, there is a check to see if the exchange 
status is ERROR, and if not, getOutMessage().getContent() is called. 
The code assumes that after a fault, the exchange status is ERROR, 
but in fact, it is ACTIVE and the fault-Message is set, while the 
out-Message is null. So this causes the NullPointerException. 

The other problem is that the code for handling the fault-Message 
is missing (marked as // TODO, but as stated above, with the wrong 
assumption that the exchange status is ERROR). It would be nice, 
if the fault message would be processed an cause xfire to throw a 
corresponding exception on the proxy. 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to