[ 
https://issues.apache.org/jira/browse/AXIS2-5943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17008460#comment-17008460
 ] 

Robert Lazarski commented on AXIS2-5943:
----------------------------------------

A couple of users on the mailing list have run into this issue now, seems that 
the samples/json code doesn't run.

I committed the code in the description of this issue. Its been running in my 
own projects that way for a while now.

After some more testing on my end and giving a few days for feedback, I expect 
to then close the issue. 

 

> GSON, MessageContext.isFault() NPE because getEnvelope() returns null
> ---------------------------------------------------------------------
>
>                 Key: AXIS2-5943
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5943
>             Project: Axis2
>          Issue Type: Bug
>            Reporter: Robert Lazarski
>            Priority: Major
>
> As discussed on the user list, after a GSON service completes, this code in 
> MessageContext throws an NPE:
> public boolean isFault() {
>         return getEnvelope().hasFault();
> }
> The code I compiled myself and is running on my production systems is as 
> follows, [~veithen] do you have a suggestion on a better fix? 
> public boolean isFault() {
>         if (getEnvelope() == null) {
>             log.warn(getLogIDString() + ": ****WARNING**** " + myClassName +
>                     " , found null envelope, returning false");
>             return false;
>         }
>         return getEnvelope().hasFault();
> }
>  
> See user list discussion:
>  
> http://mail-archives.apache.org/mod_mbox/axis-java-user/201808.mbox/%3ccabpplbvtwaa54j1rnjvhrkdtreeqq9fwzuh-ak-xnr782pm...@mail.gmail.com%3E
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to