Author: dkulp Date: Wed Oct 19 18:59:41 2011 New Revision: 1186404 URL: http://svn.apache.org/viewvc?rev=1186404&view=rev Log: Merged revisions 1186389 via svnmerge from https://svn.us.apache.org/repos/asf/cxf/branches/2.4.x-fixes
................ r1186389 | dkulp | 2011-10-19 14:39:09 -0400 (Wed, 19 Oct 2011) | 9 lines Merged revisions 1185023 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1185023 | ema | 2011-10-17 02:50:32 -0400 (Mon, 17 Oct 2011) | 1 line [CXF-3840]:Fix WS-Addressing and WS-RM: Nested Reference Parameters in request are not supported and become concatenated in the response to client ........ ................ Modified: cxf/branches/2.3.x-fixes/ (props changed) cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java Propchange: cxf/branches/2.3.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java?rev=1186404&r1=1186403&r2=1186404&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java (original) +++ cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java Wed Oct 19 18:59:41 2011 @@ -28,7 +28,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.namespace.QName; @@ -914,7 +913,7 @@ public final class ContextUtils { return NONE_ENDPOINT_REFERENCE; } - public static void applyReferenceParam(EndpointReferenceType toEpr, JAXBElement<String> el) { + public static void applyReferenceParam(EndpointReferenceType toEpr, Object el) { if (null == toEpr.getReferenceParameters()) { toEpr.setReferenceParameters(WSA_OBJECT_FACTORY.createReferenceParametersType()); } Modified: cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?rev=1186404&r1=1186403&r2=1186404&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java (original) +++ cxf/branches/2.3.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java Wed Oct 19 18:59:41 2011 @@ -366,15 +366,13 @@ public class MAPCodec extends AbstractSo JAXBElement jaxbEl = null; if (o instanceof Element) { Element e = (Element)o; - QName elQn = new QName(e.getNamespaceURI(), e.getLocalName()); - jaxbEl = new JAXBElement<String>(elQn, - String.class, - e.getTextContent()); + Node importedNode = header.getOwnerDocument().importNode(e, true); + header.appendChild(importedNode); } else { jaxbEl = (JAXBElement) o; + marshaller.marshal(jaxbEl, header); } - marshaller.marshal(jaxbEl, header); - + Element lastAdded = (Element)header.getLastChild(); addIsReferenceParameterMarkerAttribute(lastAdded, maps.getNamespaceURI()); } else { @@ -616,8 +614,12 @@ public class MAPCodec extends AbstractSo EndpointReferenceType toEpr = maps.getToEndpointReference(); if (null != toEpr) { for (Element e : referenceParameterHeaders) { - JAXBElement<String> el = unmarshaller.unmarshal(e, String.class); - ContextUtils.applyReferenceParam(toEpr, el); + if (DOMUtils.getChild(e, Node.ELEMENT_NODE) == null) { + JAXBElement<String> el = unmarshaller.unmarshal(e, String.class); + ContextUtils.applyReferenceParam(toEpr, el); + } else { + ContextUtils.applyReferenceParam(toEpr, e); + } } } }
