Source to SoapMessage Conversion

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Source to SoapMessage Conversion

Isuranga Perera
Hi,

I'm using DefaultSecurityTokenServiceProvider  as a independent component
to generate security token. Since it returns a Source type object I'm using
[1] to convert Source into a SOAPMessage. Appreciate if you can suggest a
better method.

** I don't use cxf Transport so I have to manually create the SoapMessage

[1] https://gist.github.com/IsurangaPerera/373652c3693e1cca688863d030736dbc

Best Regards
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Source to SoapMessage Conversion

coheigea
Administrator
You could use one of the CXF StaxUtils methods instead, e.g.:

copy(Source source, OutputStream os)

Colm.

On Thu, Jul 27, 2017 at 6:46 AM, Isuranga Perera <[hidden email]>
wrote:

> Hi,
>
> I'm using DefaultSecurityTokenServiceProvider  as a independent component
> to generate security token. Since it returns a Source type object I'm using
> [1] to convert Source into a SOAPMessage. Appreciate if you can suggest a
> better method.
>
> ** I don't use cxf Transport so I have to manually create the SoapMessage
>
> [1] https://gist.github.com/IsurangaPerera/373652c3693e1cca688863d030736d
> bc
>
> Best Regards
>



--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Source to SoapMessage Conversion

Isuranga Perera
Thanks, I'll try that

On Thu, Jul 27, 2017 at 4:46 PM, Colm O hEigeartaigh <[hidden email]>
wrote:

> You could use one of the CXF StaxUtils methods instead, e.g.:
>
> copy(Source source, OutputStream os)
>
> Colm.
>
> On Thu, Jul 27, 2017 at 6:46 AM, Isuranga Perera <
> [hidden email]> wrote:
>
>> Hi,
>>
>> I'm using DefaultSecurityTokenServiceProvider  as a independent
>> component to generate security token. Since it returns a Source type object
>> I'm using [1] to convert Source into a SOAPMessage. Appreciate if you can
>> suggest a better method.
>>
>> ** I don't use cxf Transport so I have to manually create the SoapMessage
>>
>> [1] https://gist.github.com/IsurangaPerera/373652c3693e1cca68886
>> 3d030736dbc
>>
>> Best Regards
>>
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>
Loading...