Error "Cannot Replace the To Soap Header" was because 2 Soap Envelop write
in request.
But i can't to replace outgoing stream.
Can anybody help?

19 сентября 2011 г. 9:49 пользователь Максим Мартынов
<[email protected]>написал:

> 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