I was trying to solve this with a hack but it's not working so far, could
someone help out?

What I have is this:

@WebMethod
public void doStuff(@WebParam(header=true, mode=WebParam.Mode.OUT,
partName="header")Holder<List&lt;SoapHeader>> respHeader) {  ... }

I've added an interceptor which runs during USER_LOGICAL phase. It gets the
MessageInfo and from there finds the MessageInfoPart with the name "header".

I've managed to get this part.

At this point I would like to remove this part from the message, because if
it would continue I would get an exception that List<SoapHeader> is not a
supported type. How to do that?

I tried this but it doesn't seem to work:
msgInfo.removeMessagePart(headerPart.getElementQName);  // headerPart is a
MessagePartInfo

I would also want to actually get the object from the Holder and convert
that into headers. How to do that? I don't know much about CXF interceptors,
how can I add headers to the outgoing message?





--
View this message in context: 
http://cxf.547215.n5.nabble.com/How-to-add-custom-headers-to-SOAP-response-The-code-from-the-FAQ-won-t-work-tp5723581p5723591.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to