On Tue January 19 2010 12:08:20 am Coder One wrote:
> I got my custom Conduit setup and thought a custom Destination would be
>  "easy" to write, but after reading through Http/Local/JMS transport source
>  code, I ran headlong into a wall upon trying to implement my own custom
>  Destination.  I would appreciate all insights into the following 2 issues:
> 
> 1. AbstractDestination versus AbstractMultiplexDestination, when to use
>  what? 

I think WS-Addressing requires some stuff from AbstractMultiplexDestination, 
but I'm not 100% sure on that. 


> 2. How do I deliver the SOAP message to CXF such that it will invoke the
>  right bean?  

When the service starts up, the runtime will call the "setMessageObserver(..)" 
method on the Destination.   When a request comes in, you need to create a 
Message and call the observer with it.   Something like:

Message inMessage = new MessageImpl();
inMessage.setContent(InputStream.class, inStream);
//... set other things like Content type, headers, etc...
inMessage.setDestination(this);
ExchangeImpl exchange = new ExchangeImpl();
exchange.setInMessage(inMessage);

incomingObserver.onMessage(inMessage);

That should pretty much be it.

Dan



>  Below is the Spring snippet that I use to expose my service. 
>  How do I setup my custom Destination such that CXF will invoke the
>  organizerService bean? 
> 
>     <simple:server id="organizerWS"
>                   
>  serviceClass="com.acme.organizer.services.OrganizerService"
>  address="/organizerService">
>         <simple:serviceBean>
>             <ref bean="organizerService"/>
>         </simple:serviceBean>
>         <simple:dataBinding>
>             <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding"
>  /> </simple:dataBinding>
>     </simple:server>
> 
> All help would be greatly appreciated!
> 
> Thanks...
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to