[
https://issues.apache.org/jira/browse/CXF-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506799
]
willem Jiang commented on CXF-739:
----------------------------------
the test case that you raised fails for me. It really stems from a
problem with expectations about how wrapped mode should work. You're
operating in unwrapped mode. Which means that the expression in the brackets
{} is mapped to the field on the first parameter. That is, instead of this:
@HttpResource(location = "/topics/{id}")
public String getTopics(@WebParam(name = "id") long id)
You actually want to do this:
@HttpResource(location = "/topics/{id}")
public String getTopics(GetTopics getTopics)
The first one will work in wrapped mode. The second one will work in
unwrapped mode.
> CXF http-binding method parament with the simple type element will get the
> NPE exception
> ----------------------------------------------------------------------------------------
>
> Key: CXF-739
> URL: https://issues.apache.org/jira/browse/CXF-739
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.0
> Reporter: willem Jiang
> Assignee: Dan Diephouse
>
> Here is the method definition
> @Get
> @HttpResource(location = "/topics/{id}")
> public String getTopics(@WebParam(name = "id") long id);
> But when I tried to use the borrower to invoke the getTopics method
> (http://localhost:8080/xml/topics/123). I got the below error.
> INFO: Interceptor has thrown exception, unwinding now
> java.lang.NullPointerException
> at
> org.apache.cxf.binding.http.IriDecoderHelper.buildDocument(IriDecoderHelper.java:213)
> at
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.mergeParams(URIParameterInInterceptor.java:129)
> at
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleMessage(URIParameterInInterceptor.java:105)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:67)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:253)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:213)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:54)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
> 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:502)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
> at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.