cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-660) org.apache.cxf.jaxb.WrapperHelper.getWrappedPart() throws NPE when element type is boolean
Date Thu, 17 May 2007 21:47:16 GMT

     [ https://issues.apache.org/jira/browse/CXF-660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-660.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.0


The patch isn't quite right as something like:

<element name="foo" type="xsd:boolean" maxOccurs="10"/>

is mapped to "getFoo", not "isFoo".     Your patch would just look for isFoo.


However, I updated the provided test case with a boolean[] case and got the tests to pass.
  Thanks for the testcase.

> org.apache.cxf.jaxb.WrapperHelper.getWrappedPart() throws NPE when element type is boolean
> ------------------------------------------------------------------------------------------
>
>                 Key: CXF-660
>                 URL: https://issues.apache.org/jira/browse/CXF-660
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-RC
>            Reporter: William Tam
>         Assigned To: Daniel Kulp
>             Fix For: 2.0
>
>         Attachments: patch.txt
>
>
> My method (setIsOK) looks like the following which has two parameters (boolean and int).
>     @ResponseWrapper(targetNamespace = "http://www.xyz.com/myservice", className = "com.xyz.myservice.SetIsOKResponse",
localName = "setIsOKResponse")
>     @RequestWrapper(targetNamespace = "http://www.xyz.com/myservice", className = "com.xyz.myservice.SetIsOK",
localName = "setIsOK")
>     @WebResult(targetNamespace = "http://www.xyz.com/myservice", name = "Count1")
>     @WebMethod
>     public java.lang.Integer setIsOK(
>         @WebParam(targetNamespace = "http://www.xyz.com/myservice", name = "Parameter1")
>         boolean parameter1,
>         @WebParam(targetNamespace = "http://www.xyz.com/myservice", name = "Parameter2")
>         int parameter2
>     ) throws SetIsOKFault_Exception;
> When I invoke my method, it fails with a NPE thrown by WrapperHellper.
> org.apache.cxf.interceptor.Fault 
> at org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor.handleMessage(WrapperClassInInterceptor.java:122)

> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:148)

> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:63)

> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:200)

> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:161)

> at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:54)

> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:690) 
> at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)

> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) 
> at org.mortbay.jetty.Server.handle(Server.java:285) 
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457) 
> at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765) 
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:710) 
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203) 
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357) 
> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329) 
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475) 
> Caused by: java.lang.NullPointerException 
> at org.apache.cxf.jaxb.WrapperHelper.getWrappedPart(WrapperHelper.java:194) 
> at org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor.handleMessage(WrapperClassInInterceptor.java:115)

> ... 16 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message