Author: dkulp
Date: Wed Oct 19 18:39:09 2011
New Revision: 1186389
URL: http://svn.apache.org/viewvc?rev=1186389&view=rev
Log:
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.4.x-fixes/ (props changed)
cxf/branches/2.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
cxf/branches/2.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java?rev=1186389&r1=1186388&r2=1186389&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
(original)
+++
cxf/branches/2.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
Wed Oct 19 18:39:09 2011
@@ -30,7 +30,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;
@@ -924,7 +923,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.4.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.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?rev=1186389&r1=1186388&r2=1186389&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
(original)
+++
cxf/branches/2.4.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
Wed Oct 19 18:39:09 2011
@@ -365,15 +365,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 {
@@ -615,8 +613,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);
+ }
}
}
}