Hi All,
I am new in Apache CXF technology.
Let me give a little background on my problem statement. I want to log my
web service invocation steps as below.
a. The input soap message (request payload)
b. Implementation steps (My serivce specific steps)
c. The output soap message (respone payload of my service
To achieve this, I have created inInterceptors and outInterceptors classes
to log the soap request and resposne messages. And I am logging my service
specific logs from my implementation class. All working fine.
But, as I want to maintain a unique ID concept to relate all the logs for
each service invocation, I have created UUID in my inInterceptors and
forwarded that UUID as a String with my SoapMessage as an additional
content.
@Override
public void handleMessage(SoapMessage message) throws Fault {
try
{
// now get the request xml
InputStream is = message.getContent ( InputStream.class );
CachedOutputStream os = new CachedOutputStream ( );
IOUtils.copy ( is, os );
os.flush ( );
message.setContent ( InputStream.class, os.getInputStream ( )
);
is.close ( );
UUID idOne = UUID.randomUUID();
UniqueIDInString = idOne.toString();
message.put("UniqueIDInString", UniqueIDInString);
os.close ( );
}
catch ( Exception ex )
{
ex.printStackTrace ( );
}
}
It works fine. I can fetch this UUID from my implementation class. But I am
failing to forward that UUID information from Implementation class to
outInterceptors. It would be great if you could suggest me on how to forward
that info towards outInterceptors. *I could not send it as part of soap
repsones message as well.*. Also, I do not want it to be in the soap
response message as this make my resposne invalid (Schema wise). It would
good if you could suggest me how to remove this additional content, once I
fetch the UUID content.
Let me know your suggestion. Thank you.
Regards,
Arif
--
View this message in context:
http://cxf.547215.n5.nabble.com/How-to-Forward-additional-content-from-Implementation-class-to-outInterceptors-tp5739649.html
Sent from the cxf-user mailing list archive at Nabble.com.