Hi,

When a Camel CXF endpoint (where the data format = MESSAGE) processes a
SOAP HTTP request, then the Body is defined as InputStream but without
BodyType

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor
                                               Elapsed (ms)
[route3            ] [route3            ] [cxf://bean:cheeseServiceBean
                                             ] [         7]
[route3            ] [bean1             ] [bean[ref:utils method:
convertToDom]                                          ] [         2]

Exchange
---------------------------------------------------------------------------------------------------------------------------------------
Exchange[
Id                  ID-dabou-local-58987-1460456138378-0-2
ExchangePattern     InOut
Headers             {accept-encoding=gzip,deflate,
breadcrumbId=ID-dabou-local-58987-1460456138378-0-1, ... ,
CamelHttpCharacterEncoding=UTF-8, CamelHttpMethod=POST, CamelHttpPath=,
CamelHttpUri=/camel/CheeseService, CamelRedelivered=false,
CamelRedeliveryCounter=0, connection=keep-alive,
Content-Type=text/xml;charset=UTF-8, Host=localhost:9001,
User-Agent=Apache-HttpClient/4.1.1 (java 1.5)}
BodyType            null
Body                [Body is instance of java.io.InputStream]
]

Surprisingly, I can't cast it to a stream as the object is of type
AbtrstractHTTPDestination

java.lang.ClassCastException:
org.apache.cxf.transport.http.AbstractHTTPDestination$1 cannot be cast to
java.io.ByteArrayInputStream

Is there a trick to resolve that ?

Regards,

Charles

Reply via email to