Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:44:41 -0500 (Tue, 18 Nov 2008)
New Revision: 8750
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java
Log:
Do not depend on Name implementation specific behavior
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
---
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2008-11-18
08:43:48 UTC (rev 8749)
+++
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2008-11-18
08:44:41 UTC (rev 8750)
@@ -492,7 +492,20 @@
*/
public Iterator getChildElements(Name name)
{
- return getChildElements(((NameImpl)name).toQName());
+ if (name instanceof NameImpl)
+ {
+ return getChildElements(((NameImpl)name).toQName());
+ }
+ else
+ {
+ QName qname;
+ if (name.getPrefix() != null)
+ qname = new QName(name.getURI(), name.getLocalName(), name.getPrefix());
+ else
+ qname = new QName(name.getURI(), name.getLocalName());
+ return getChildElements(qname);
+ }
+// return getChildElements(((NameImpl)name).toQName());
}
public Iterator getChildElements(QName qname)
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java
===================================================================
---
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java 2008-11-18
08:43:48 UTC (rev 8749)
+++
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java 2008-11-18
08:44:41 UTC (rev 8750)
@@ -89,7 +89,20 @@
if (name == null)
throw new SOAPException("Invalid SOAPHeaderElement name: " + name);
- return addHeaderElement(((NameImpl)name).toQName());
+ if (name instanceof NameImpl)
+ {
+ return addHeaderElement(((NameImpl)name).toQName());
+ }
+ else
+ {
+ QName qname;
+ if (name.getPrefix() != null)
+ qname = new QName(name.getURI(), name.getLocalName(), name.getPrefix());
+ else
+ qname = new QName(name.getURI(), name.getLocalName());
+ return addHeaderElement(qname);
+ }
+// return addHeaderElement(((NameImpl)name).toQName());
}
public SOAPHeaderElement addHeaderElement(QName qname) throws SOAPException
Show replies by date