Class InNamespaceMergeInterceptor
- java.lang.Object
-
- org.apache.cxf.phase.AbstractPhaseInterceptor<org.apache.cxf.message.Message>
-
- org.openehealth.ipf.commons.ihe.ws.cxf.payload.InNamespaceMergeInterceptor
-
- All Implemented Interfaces:
org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>,org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>
public class InNamespaceMergeInterceptor extends org.apache.cxf.phase.AbstractPhaseInterceptor<org.apache.cxf.message.Message>CXF interceptor which inserts XML namespace declarations from incoming SOAP Envelope and SOAP Body elements into the String payload.- Author:
- Dmytro Rud
-
-
Constructor Summary
Constructors Constructor Description InNamespaceMergeInterceptor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidaddNamespacesFromElement(Element elem, Map<String,String> map)Adds NS defined in the given XML element to the map.protected static StringenrichNamespaces(Document source, String target)Copies namespace definitions from SOAP Envelope and SOAP Body elements of the given XML Document into the top-level element of the XML document represented by the given String.voidhandleMessage(org.apache.cxf.message.Message message)
-
-
-
Method Detail
-
handleMessage
public void handleMessage(org.apache.cxf.message.Message message) throws org.apache.cxf.interceptor.Fault- Throws:
org.apache.cxf.interceptor.Fault
-
enrichNamespaces
protected static String enrichNamespaces(Document source, String target)
Copies namespace definitions from SOAP Envelope and SOAP Body elements of the given XML Document into the top-level element of the XML document represented by the given String.Caller is supposed to take care of the parameters' correctness, so there is no sophisticated error handling.
- Parameters:
source- source SOAP document as a DOM object.target- target XML Document as String.- Returns:
- target XML document enriched with namespace declarations from the source XML document.
-
-