cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Максим Мартынов <ipe4e...@gmail.com>
Subject Re: Process outgoing message before sending.
Date Mon, 19 Sep 2011 05:49:18 GMT
I try to process OutputStream at Phase.PRE_STREAM_ENDING phase but now i can
get error "javax.xml.ws.soap.SOAPFaultException: Cannot Replace the To Soap
Header"

My code is:

OutputStream os = message.getContent(OutputStream.class);
CacheAndWriteOutputStream cos = (CacheAndWriteOutputStream) os;

byte[] security = cryptoService.createSmevHeaderSecurity(cos.getBytes(),
fingerprint);
ByteArrayInputStream bis = new ByteArrayInputStream(security);
CachedOutputStream.copyStream(bis, os, 1024);
os.flush();
message.setContent(OutputStream.class, os);

2011/9/16 Максим Мартынов <ipe4enko@gmail.com>

> Hi. Please help.
>
> How i can get outgoing message in outIntercepter as *byte[]*?
> Change it, and set it to original outgoing message?
> In which phase a can do that?
>
> My task is to sign envelope, but service which can do this whant as
> incoming parameters soap envelop as byte[] and result is signing soap
> envelop, as byte[] too.
>
> Please give me an example?
> *
> *
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message