To be completely honest, this isn't really something that is "designed" to work for CXF. The CXF model really assumes that "root" stuff is completely describable in WSDL and thus would be an XML doc parseable as XML.
If you are going to be doing mostly work with non-xml things, it's strongly suggested that you use the JAX-RS stuff which is much better aligned for relatively arbitrary posts and such. Dan On Friday 21 May 2010 5:40:36 am Enrico Boldrini wrote: > Dear all, > > I've got a runtime exception while sending this message to a CXF > endpoint binded to a Provider<DataSource>. > > POST /gi-cat-7.0.4-SNAPSHOT/services/oaipmh HTTP/1.1 > TE: deflate,gzip;q=0.3 > Connection: TE, close > From: [email protected] > Host: ade.pin.unifi.it:8080 > User-Agent: OAISchemaVal > Content-Length: 13 > Content-Type: application/x-www-form-urlencoded > > key=value > > Excerpt from the stacktrace: > > Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected > character 'k' (code 118) in prolog; expected '<' > at [row,col {unknown-source}]: [1,1] > at > com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:648) > at > com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:204 > 7) > > It seems to happen because an XMLMessageInInterceptor intercepts the > message, although the content type isn't xml. > > I am attaching a maven test project wich reproduces the problem. > > The JUnit test case passes if using JAXWS-RI for the service (by > disabling cxf dependencies from the pom). > > Let me know if further information is needed, thanks > > Enrico -- Daniel Kulp [email protected] http://dankulp.com/blog
