You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Scott S. McCoy (Created) (JIRA)" <ji...@apache.org> on 2011/09/29 23:11:46 UTC

[jira] [Created] (CXF-3836) Missing output parameters in wrapped method implementations generate NPE

Missing output parameters in wrapped method implementations generate NPE
------------------------------------------------------------------------

                 Key: CXF-3836
                 URL: https://issues.apache.org/jira/browse/CXF-3836
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.4.2, 2.3.6
            Reporter: Scott S. McCoy


When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in

{{{
        @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
        javax.xml.ws.Holder<java.lang.Boolean> created
}}}

Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.

{{{
java.lang.NullPointerException
	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
}}}

This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.

I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.

The work-around for the user is of course to provide a non-null value in the holder object.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-3836) Missing output parameters in wrapped method implementations generate NPE

Posted by "Freeman Fang (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang resolved CXF-3836.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.1
                   2.4.5
                   2.3.8

commit testcase
http://svn.apache.org/viewvc?rev=1200189&view=rev for trunk
http://svn.apache.org/viewvc?rev=1200196&view=rev for 2.4.x branch
http://svn.apache.org/viewvc?rev=1200205&view=rev for 2.3.x branch
                
> Missing output parameters in wrapped method implementations generate NPE
> ------------------------------------------------------------------------
>
>                 Key: CXF-3836
>                 URL: https://issues.apache.org/jira/browse/CXF-3836
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.6, 2.4.2
>            Reporter: Scott S. McCoy
>            Assignee: Freeman Fang
>             Fix For: 2.3.8, 2.4.5, 2.5.1
>
>
> When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in
> {code}
>         @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
>         javax.xml.ws.Holder<java.lang.Boolean> created
> {code}
> Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.
> {code}
> java.lang.NullPointerException
> 	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
> {code}
> This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.
> I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.
> The work-around for the user is of course to provide a non-null value in the holder object.
> It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3836) Missing output parameters in wrapped method implementations generate NPE

Posted by "Scott S. McCoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott S. McCoy updated CXF-3836:
--------------------------------

    Description: 
When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in

{{
        @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
        javax.xml.ws.Holder<java.lang.Boolean> created
}}

Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.

{{
java.lang.NullPointerException
	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
}}

This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.

I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.

The work-around for the user is of course to provide a non-null value in the holder object.

It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

  was:
When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in

{{{
        @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
        javax.xml.ws.Holder<java.lang.Boolean> created
}}}

Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.

{{{
java.lang.NullPointerException
	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
}}}

This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.

I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.

The work-around for the user is of course to provide a non-null value in the holder object.

    
> Missing output parameters in wrapped method implementations generate NPE
> ------------------------------------------------------------------------
>
>                 Key: CXF-3836
>                 URL: https://issues.apache.org/jira/browse/CXF-3836
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.6, 2.4.2
>            Reporter: Scott S. McCoy
>
> When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in
> {{
>         @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
>         javax.xml.ws.Holder<java.lang.Boolean> created
> }}
> Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.
> {{
> java.lang.NullPointerException
> 	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
> }}
> This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.
> I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.
> The work-around for the user is of course to provide a non-null value in the holder object.
> It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3836) Missing output parameters in wrapped method implementations generate NPE

Posted by "Scott S. McCoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott S. McCoy updated CXF-3836:
--------------------------------

    Description: 
When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in

{code}
        @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
        javax.xml.ws.Holder<java.lang.Boolean> created
{/code}

Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.

{code}
java.lang.NullPointerException
	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
{/code}

This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.

I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.

The work-around for the user is of course to provide a non-null value in the holder object.

It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

  was:
When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in

{{
        @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
        javax.xml.ws.Holder<java.lang.Boolean> created
}}

Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.

{{
java.lang.NullPointerException
	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
}}

This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.

I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.

The work-around for the user is of course to provide a non-null value in the holder object.

It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

    
> Missing output parameters in wrapped method implementations generate NPE
> ------------------------------------------------------------------------
>
>                 Key: CXF-3836
>                 URL: https://issues.apache.org/jira/browse/CXF-3836
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.6, 2.4.2
>            Reporter: Scott S. McCoy
>
> When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in
> {code}
>         @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
>         javax.xml.ws.Holder<java.lang.Boolean> created
> {/code}
> Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.
> {code}
> java.lang.NullPointerException
> 	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
> {/code}
> This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.
> I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.
> The work-around for the user is of course to provide a non-null value in the holder object.
> It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-3836) Missing output parameters in wrapped method implementations generate NPE

Posted by "Scott S. McCoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott S. McCoy updated CXF-3836:
--------------------------------

    Description: 
When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in

{code}
        @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
        javax.xml.ws.Holder<java.lang.Boolean> created
{code}

Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.

{code}
java.lang.NullPointerException
	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
{code}

This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.

I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.

The work-around for the user is of course to provide a non-null value in the holder object.

It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

  was:
When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in

{code}
        @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
        javax.xml.ws.Holder<java.lang.Boolean> created
{/code}

Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.

{code}
java.lang.NullPointerException
	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
{/code}

This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.

I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.

The work-around for the user is of course to provide a non-null value in the holder object.

It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

    
> Missing output parameters in wrapped method implementations generate NPE
> ------------------------------------------------------------------------
>
>                 Key: CXF-3836
>                 URL: https://issues.apache.org/jira/browse/CXF-3836
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.6, 2.4.2
>            Reporter: Scott S. McCoy
>
> When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in
> {code}
>         @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
>         javax.xml.ws.Holder<java.lang.Boolean> created
> {code}
> Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.
> {code}
> java.lang.NullPointerException
> 	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
> {code}
> This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.
> I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.
> The work-around for the user is of course to provide a non-null value in the holder object.
> It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CXF-3836) Missing output parameters in wrapped method implementations generate NPE

Posted by "Freeman Fang (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang reassigned CXF-3836:
---------------------------------

    Assignee: Freeman Fang
    
> Missing output parameters in wrapped method implementations generate NPE
> ------------------------------------------------------------------------
>
>                 Key: CXF-3836
>                 URL: https://issues.apache.org/jira/browse/CXF-3836
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.6, 2.4.2
>            Reporter: Scott S. McCoy
>            Assignee: Freeman Fang
>
> When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in
> {code}
>         @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
>         javax.xml.ws.Holder<java.lang.Boolean> created
> {code}
> Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.
> {code}
> java.lang.NullPointerException
> 	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
> {code}
> This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.
> I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.
> The work-around for the user is of course to provide a non-null value in the holder object.
> It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-3836) Missing output parameters in wrapped method implementations generate NPE

Posted by "Freeman Fang (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13147538#comment-13147538 ] 

Freeman Fang commented on CXF-3836:
-----------------------------------

Hi,
I just write a testcase which can verify null value for output Holder parameter works, so I believe this issue already get resolved after CXF 2.4.2, I'll commit the testcase soon.

Could you run your test with latest released CXF 2.4.4 or even CXF 2.5?

Freeman 
                
> Missing output parameters in wrapped method implementations generate NPE
> ------------------------------------------------------------------------
>
>                 Key: CXF-3836
>                 URL: https://issues.apache.org/jira/browse/CXF-3836
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.6, 2.4.2
>            Reporter: Scott S. McCoy
>            Assignee: Freeman Fang
>
> When implementing an interface generated from a WSDL which has an output parameter stored in a holder, as in
> {code}
>         @WebParam(mode = WebParam.Mode.OUT, name = "created", targetNamespace = "")
>         javax.xml.ws.Holder<java.lang.Boolean> created
> {code}
> Failing to provide a value in the supplied holder results in an NPE, originating from the runtime-generated WrapperTypeHelper class, e.g.
> {code}
> java.lang.NullPointerException
> 	at com.vindicia.soap.v3_6.account.UpdateResponse_WrapperTypeHelper1.createWrapperObject(Unknown Source)
> 	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
> {code}
> This fails to inform the user of the cause of the issue or how to diagnose it.  Instead, required parameters should be validated to atleast be not null before they are assumed to have been provided.
> I have validated this behavior on 2.4.2, 2.4.0 and 2.3.6.
> The work-around for the user is of course to provide a non-null value in the holder object.
> It is worth noting this appears to only happen for output parameters that are normally mapped to primitive types.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira