[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlrpc-user
Subject: Fwd: svn commit: r1234495 - in /webservices/commons/trunk/modules/axiom/modules: axiom-dom-testsuite
From: Amila Jayasekara <amilaj () wso2 ! com>
Date: 2012-01-23 8:37:24
Message-ID: CAFpJEGOrnwFapQjE4f2uSg7rRzK5kDWF2AWcCBXd-HztPMWGCg () mail ! gmail ! com
[Download RAW message or body]
Hi Andreas,
Following change causes OMElement.getFirstChildWithName to always return null.
E.g :-
OMElement rst = ...
OMElement elem = rst.getFirstChildWithName(new QName(XML.SAML_NS, "Assertion"));
Due to this Rampart build is failing. Seems like namespace is not
correctly mapped. Could you please have a look ?
Thanks
AmilaJ
---------- Forwarded message ----------
From: <veithen@apache.org>
Date: Sun, Jan 22, 2012 at 5:28 PM
Subject: svn commit: r1234495 - in
/webservices/commons/trunk/modules/axiom/modules:
axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateElementNS.java
axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
To: commits@ws.apache.org
Author: veithen
Date: Sun Jan 22 11:58:19 2012
New Revision: 1234495
URL: http://svn.apache.org/viewvc?rev=1234495&view=rev
Log:
Fixed a non-conformance in Document#createElementNS.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateElementNS.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateElementNS.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axio \
m-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateElementNS.java?rev=1234495&r1=1234494&r2=1234495&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateElementNS.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom-testsuite/src/main/java/org/apache/axiom/ts/dom/document/TestCreateElementNS.java
Sun Jan 22 11:58:19 2012
@@ -36,5 +36,7 @@ public class TestCreateElementNS extends
Element elem = doc.createElementNS(namespace, "axis2:" + tagName);
assertEquals("Local name misnatch", tagName, elem.getLocalName());
assertEquals("Namespace misnatch", namespace, elem.getNamespaceURI());
+ // In contrast to Axiom, DOM doesn't generate namespace
declarations automatically
+ assertEquals(0, elem.getAttributes().getLength());
}
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axio \
m-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java?rev=1234495&r1=1234494&r2=1234495&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DocumentImpl.java
Sun Jan 22 11:58:19 2012
@@ -216,7 +216,11 @@ public class DocumentImpl extends Parent
}
OMNamespaceImpl namespace = new OMNamespaceImpl(ns, prefix);
- return new ElementImpl(this, localName, namespace, this.factory);
+ // DOM doesn't create namespace declarations automatically.
Therefore we set the
+ // namespace afterwards with setNamespaceWithNoFindInCurrentScope.
+ ElementImpl element = new ElementImpl(this, localName, null,
this.factory);
+ element.setNamespaceWithNoFindInCurrentScope(namespace);
+ return element;
}
public EntityReference createEntityReference(String name)
--
Sagara Gunathunga
Blog - http://ssagara.blogspot.com
Web - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara
--
Mobile : +94773330538
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic