|
As of October 27th, please open all new issues in the Red Hat Customer Portal . |
|
[
Permlink
| « Hide
]
Jeff Rutman added a comment - 23/Jan/10 03:36 AM
Raising this bug to a blocker as it is preventing the customer from starting their integration testing. They are under extremely tight timelines and the visibility of this issue is very high. They need this resolved asap. Ideally we could get them a snapshot so they could start their integration testing.
I am able to reproduce the problem and I am getting closer to a fix. It looks like we are losing the namespaces when transferring the stream out of the http component. Primary concern is not breaking something else in the process of fixing this so I will give another update later this afternoon.
Newer test case with failing and passing client.html
Attaching snapshot w ssl fix from
With the two messages shown in the description, the xsi:type is preserved, as expected, but the xmlns:xsi=... is stripped. With xmlns:xsi present on the <soapenv:Envelope> it does not work, but if the xmlns:xsi mapping is added to one of the inner elements (like the one with the xsi:type attribute) everything works fine.
I have a junit test case that reproduce the issue so i'm trying to find a fix.
Here is a patch that fixes the problem:
Index: src/main/java/org/apache/servicemix/soap/util/stax/DOMStreamReader.java
===================================================================
--- src/main/java/org/apache/servicemix/soap/util/stax/DOMStreamReader.java (revision 941780)
+++ src/main/java/org/apache/servicemix/soap/util/stax/DOMStreamReader.java (working copy)
@@ -%ld,%ld +%ld,%ld @@
this.frame = new ElementFrame(element, null);
frames.add(this.frame);
newFrame(frame);
+ findParentNamespaces(frame);
this.document = element.getOwnerDocument();
}
@@ -%ld,%ld +%ld,%ld @@
}
}
+ protected void findParentNamespaces(ElementFrame frame) {
+ for (Node element = ((Node) frame.element).getParentNode();
+ element instanceof Element;
+ element = element.getParentNode())
+ {
+ NamedNodeMap nodes = element.getAttributes();
+ for (int i = 0; i < nodes.getLength(); i++) {
+ Node node = nodes.item(i);
+ String prefix = node.getPrefix();
+ String localName = node.getLocalName();
+ String value = node.getNodeValue();
+ String name = node.getNodeName();
+
+ if (prefix == null)
+ prefix = "";
+
+ if (name != null && name.equals("xmlns")) {
+ frame.uris.add(value);
+ frame.prefixes.add("");
+ } else if (prefix.length() > 0 && prefix.equals("xmlns")) {
+ frame.uris.add(value);
+ frame.prefixes.add(localName);
+ } else if (name.startsWith("xmlns:")) {
+ prefix = name.substring(6);
+ frame.uris.add(value);
+ frame.prefixes.add(prefix);
+ }
+ }
+ }
+ }
+
protected void endElement() {
}
Attached is a snapshot of servicemix-soap2 that need to be put in the lib folder to fix the problem
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||