You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by hohteri <ha...@tecnomen.com> on 2007/12/16 14:04:24 UTC

wrapped mode false fails in IriDecoderHelper

I have configured a working set for a service with aegis data binding, http
binding and jettison for content formatting to JSON.

When changing wrapped = false in serviceFactory bean configuration (using
Spring), the GET request fails with the exception below. When wrapped = true
everything works as expected.

The service itself is wrapped with Spring proxy but implementorClass is
defined for the endpoint.

Br,

Harri

The exception:

ERROR STDERR - Dec 16, 2007 5:52:25 PM
org.apache.cxf.interceptor.AttachmentInInterceptor handleMessage
INFO: AttachmentInInterceptor skipped in HTTP GET method
ERROR STDERR - Dec 16, 2007 5:52:25 PM
org.apache.cxf.binding.http.interceptor.DispatchInterceptor handleMessage
INFO: Invoking GET on /domainByIds/0
ERROR STDERR - Dec 16, 2007 5:52:25 PM
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor
handleMessage
INFO: URIParameterInterceptor handle message on path [/domainByIds/0] with
content-type [null]
ERROR STDERR - Dec 16, 2007 5:52:25 PM
org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.IllegalStateException: Unexpected character '/' at index 0
	at
org.apache.cxf.binding.http.IriDecoderHelper.expect(IriDecoderHelper.java:154)
	at
org.apache.cxf.binding.http.IriDecoderHelper.decodeIri(IriDecoderHelper.java:86)
	at
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleMessage(URIParameterInInterceptor.java:100)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
	at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
	at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79)
	at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:256)
	at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:123)
	at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
	at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:152)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
	at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:613)


-- 
View this message in context: http://www.nabble.com/wrapped-mode-false-fails-in-IriDecoderHelper-tp14361373p14361373.html
Sent from the cxf-user mailing list archive at Nabble.com.


RE: wrapped mode false fails in IriDecoderHelper

Posted by hohteri <ha...@tecnomen.com>.
The aegis is required, as we are using interfaces to hide both the transfer
object and service implementation. I could not get it working with JAXB
while Aegis seemed to work fine.

Br,
Harri


Liu, Jervis wrote:
> 
> CXF JAX-RS currently supports JAXB binding, not Aegis binding, but it
> should be straightforward to add Aegis binding by writing a new
> EntityProvider.
> 
-- 
View this message in context: http://www.nabble.com/wrapped-mode-false-fails-in-IriDecoderHelper-tp14361373p14373920.html
Sent from the cxf-user mailing list archive at Nabble.com.


RE: wrapped mode false fails in IriDecoderHelper

Posted by "Liu, Jervis" <jl...@iona.com>.
This looks like a bug. Could you create a jira for this with a complete test case please. At the same time, I would recommend you to give CXF JSR-311 (JAX-RS) implementation a try, it has similar functionalities as CXF HTTP binding provides, but it is more standard based. CXF JAX-RS currently supports JAXB binding, not Aegis binding, but it should be straightforward to add Aegis binding by writing a new EntityProvider. File a feature request for Aegis binding if you find this useful for your project, and it will be handled.

CXF JSR-311 (JAX-RS) support: http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html

Cheers,
Jervis

> -----Original Message-----
> From: hohteri [mailto:harri.hohteri@tecnomen.com]
> Sent: 2007年12月16日 21:04
> To: cxf-user@incubator.apache.org
> Subject: wrapped mode false fails in IriDecoderHelper
> 
> 
> I have configured a working set for a service with aegis data binding, http
> binding and jettison for content formatting to JSON.
> 
> When changing wrapped = false in serviceFactory bean configuration (using
> Spring), the GET request fails with the exception below. When wrapped =
> true
> everything works as expected.
> 
> The service itself is wrapped with Spring proxy but implementorClass is
> defined for the endpoint.
> 
> Br,
> 
> Harri
> 
> The exception:
> 
> ERROR STDERR - Dec 16, 2007 5:52:25 PM
> org.apache.cxf.interceptor.AttachmentInInterceptor handleMessage
> INFO: AttachmentInInterceptor skipped in HTTP GET method
> ERROR STDERR - Dec 16, 2007 5:52:25 PM
> org.apache.cxf.binding.http.interceptor.DispatchInterceptor handleMessage
> INFO: Invoking GET on /domainByIds/0
> ERROR STDERR - Dec 16, 2007 5:52:25 PM
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor
> handleMessage
> INFO: URIParameterInterceptor handle message on path [/domainByIds/0]
> with
> content-type [null]
> ERROR STDERR - Dec 16, 2007 5:52:25 PM
> org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> java.lang.IllegalStateException: Unexpected character '/' at index 0
> 	at
> org.apache.cxf.binding.http.IriDecoderHelper.expect(IriDecoderHelper.java:1
> 54)
> 	at
> org.apache.cxf.binding.http.IriDecoderHelper.decodeIri(IriDecoderHelper.jav
> a:86)
> 	at
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleM
> essage(URIParameterInInterceptor.java:100)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hain.java:207)
> 	at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiation
> Observer.java:73)
> 	at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDesti
> nation.java:79)
> 	at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(Servlet
> Controller.java:256)
> 	at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.ja
> va:123)
> 	at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServl
> et.java:170)
> 	at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServl
> et.java:152)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:206)
> 	at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.jav
> a:96)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:235)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:206)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
> lve.java:230)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:175)
> 	at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAsso
> ciationValve.java:179)
> 	at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.ja
> va:84)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :128)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
> 04)
> 	at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedCo
> nnectionValve.java:157)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j
> ava:109)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
> 41)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
> 4)
> 	at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ss(Http11Protocol.java:580)
> 	at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:613)
> 
> 
> --
> View this message in context:
> http://www.nabble.com/wrapped-mode-false-fails-in-IriDecoderHelper-tp1
> 4361373p14361373.html
> Sent from the cxf-user mailing list archive at Nabble.com.

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland