You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Krzysztof Raszkowski <ra...@datera.pl> on 2010/10/04 13:13:55 UTC

Re: How to change the value of web service invocation attributes?

First of all thanks for a response. 
We have analyzed above approaches, but our problem turned out to be more
complex. We have to modify value, which is sent by flex client and it's NaN
for decimal. We want it converted to null (which is not only modifying a
text context in an xml) and it seems to be impossible in a POST_PROTOCOL
phase (if we do it for Integer we receive 0 in Java, not null - we have set
"nillable=true" in our wsdl of course). 
So we want to ask, if there is any way to do it without rewriting the whole
input as a char array or a stream, because it's not very nice. We cannot
cope with an advice to put our interceptor after StaxInInterceptor. Of
course we receive there a message content as XMLStreamReader, but we don't
know how to modify it in an easy way. 
Any help would be appreciated.

-- 
View this message in context: http://cxf.547215.n5.nabble.com/How-to-change-the-value-of-web-service-invocation-attributes-tp2854897p3173200.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: How to change the value of web service invocation attributes?

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 04 October 2010 7:13:55 am Krzysztof Raszkowski wrote:
> First of all thanks for a response.
> We have analyzed above approaches, but our problem turned out to be more
> complex. We have to modify value, which is sent by flex client and it's NaN
> for decimal. We want it converted to null (which is not only modifying a
> text context in an xml) and it seems to be impossible in a POST_PROTOCOL
> phase (if we do it for Integer we receive 0 in Java, not null - we have set
> "nillable=true" in our wsdl of course).
> So we want to ask, if there is any way to do it without rewriting the whole
> input as a char array or a stream, because it's not very nice. We cannot
> cope with an advice to put our interceptor after StaxInInterceptor. Of
> course we receive there a message content as XMLStreamReader, but we don't
> know how to modify it in an easy way.
> Any help would be appreciated.

Honestly, another option that may be easiest is to configure in the 
SAAJInInterceptor and write a simple interceptor that would manipulate the 
SAAJ DOM model.   It would incur a slight performance penalty, but really not 
much of one if the messages are relatively small.


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog