On Friday 28 May 2010 5:01:24 am Enrico Boldrini wrote:
> Dear Dan,
> 
> thank you very much for the response. For this particular case we need
> both XML messages and generic payload (we have to implement the OAI-PMH
> specification).
> It's a bad surprise that CXF doesn't support entirely the JAX-WS
> specification :-/ (as far I can understand JAX-WS has also support for
> non-xml message and WSDL supports also mime binding
> "application/x-www-form-urlencoded").

Just FYI:  there is nothing in the JAX-WS spec mandating (or even suggesting) 
any support for non-xml things for the providers.    In fact, section 5.1 of 
the JAX-WS spec (that talks about the Provider stuff)  specifically says:

"The Provider interface offers an alternative to SEIs and may be implemented 
by services wishing to work at the XML message level."

If you go further into the spec, Chapter 11 talks about the "HTTP" binding (as 
apposed to the SOAP binding).    A major point of note is that the spec 
specifically calls it the XML/HTTP binding to provide "raw XML over HTTP 
messaging capabilities".

Thus, in this case, CXF is supporting the full JAX-WS spec as written.   I'm 
not saying what you are trying to do isn't a useful enhancement, but to 
suggest that CXF doesn't support the full  JAX-WS spec in this case is 
definitely wrong.

Dan


> 
> We really hope that this feature will be supported in the future, as we
> think CXF has been proved a great implementation so far and we have
> always appreciated the great work you have put in it!
> 
> Kind regards,
> 
> Enrico & the GI-cat team http://zeus.pin.unifi.it/gi-cat
> 
> Daniel Kulp wrote:
> > 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

Reply via email to