On Thursday, May 03, 2012 04:36:14 AM Ron Grabowski wrote:
> I understand how to serialize an object to XML. I used to work "guts" to
> convey this is sort of a weird request. I'll grep the code.

Won't be easy...   CXF is designed around streaming.   As such the various 
parts for the SOAP message are built up in steps through a bunch of 
interceptors.    There isn't really an easy way to do it.   I GUESS you 
could build a PhaseInterceptorChain with all the various interceptors on it, 
fill in details on the exchange, and pass in a message.   Likely no easy.

Dan


> 
> 
> 
> ________________________________
>  From: Johan Edstrom <[email protected]>
> To: [email protected]; Ron Grabowski <[email protected]>
> Sent: Wednesday, May 2, 2012 10:45 PM
> Subject: Re: Can I manually serialize an object into a String soap
> envelope?
> 
> You can use anything that is handy for you to marshal objects to xml?
> I'm not sure I get the question?
> 
> On May 2, 2012, at 6:58 PM, Ron Grabowski wrote:
> > Is there a class in the guts of CXF that I could use to serialize an
> > object into a String soap envelope?
> > 
> > 
> > INFO: Outbound Message
> > ---------------------------
> > ID: 2
> > Address: http://...
> > Encoding: UTF-8
> > Content-Type: text/xml
> > Headers: {Accept=[*/*], SOAPAction=["http://..."]}
> > Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap...
> > 
> > SoapHandler handler = new SoapHandler(); // ???
> > String envelope = handler.handle(foo); // ???
> > 
> > assertTrue(envelope.startsWith("<soap:Envelope"));
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to