You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Taylor, Paul" <Pa...@iona.com> on 2007/04/24 12:37:46 UTC

Custom invoker to access message parts


Hi all,

I am looking at using CXF to integrate with an application that requires
acccess the request data at the level of message parts.  So, given a
WSDL file and service/port name it listens for requests and builds a map
between WSDL message parts and the request data for that part and passes
this map to the application.

I presume that the way to go here is to use a custom invoker together
with a data binding interceptor.  The interceptor would use the
information from BindingOperationInfo and MessageInfo to turn the StaX
stream to a mapping between message parts and DOM objects representing
the message data.  This map becomes the message content which the custom
invoker can then extract.  Does this approach sound reasonable or is
there a better way?  

Is the information provided by the BindingOperationInfo and releated
classes sufficient to do this mapping in a generic way (independent of
the underlying wsdl binding)? I've been looking at the DocLiteral
/RPCInInterceptor classes which gives me hope that this can be done
without having an interceptor for each possible binding but I'm probably
missing something.

Regards,
Paul.

RE: Custom invoker to access message parts

Posted by "Taylor, Paul" <Pa...@iona.com>.
To try to answer my own question I think this can be done by creating a
new data-binding class (MessagePartDataBinding) together with a service
factory bean (derived from ReflectionServiceFactoryBean) so that the
each data binding interceptors will call the MessagePartDataBinding
class to create a DOM for each message part.  I also need to turn off
the wrapping of the args so the message parts are delivered intact.

Paul


> -----Original Message-----
> From: Taylor, Paul [mailto:Paul.Taylor@iona.com]
> Sent: 24 April 2007 11:38
> To: cxf-user@incubator.apache.org
> Subject: Custom invoker to access message parts
> 
> 
> 
> Hi all,
> 
> I am looking at using CXF to integrate with an application that
requires
> acccess the request data at the level of message parts.  So, given a
> WSDL file and service/port name it listens for requests and builds a
map
> between WSDL message parts and the request data for that part and
passes
> this map to the application.
> 
> I presume that the way to go here is to use a custom invoker together
> with a data binding interceptor.  The interceptor would use the
> information from BindingOperationInfo and MessageInfo to turn the StaX
> stream to a mapping between message parts and DOM objects representing
> the message data.  This map becomes the message content which the
custom
> invoker can then extract.  Does this approach sound reasonable or is
> there a better way?
> 
> Is the information provided by the BindingOperationInfo and releated
> classes sufficient to do this mapping in a generic way (independent of
> the underlying wsdl binding)? I've been looking at the DocLiteral
> /RPCInInterceptor classes which gives me hope that this can be done
> without having an interceptor for each possible binding but I'm
probably
> missing something.
> 
> Regards,
> Paul.