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 Максим Мартынов <[email protected]>

> 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?
> *
> *
>
>

Reply via email to