You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2007/09/08 02:24:37 UTC

svn commit: r573763 - /ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java

Author: boisvert
Date: Fri Sep  7 17:24:36 2007
New Revision: 573763

URL: http://svn.apache.org/viewvc?rev=573763&view=rev
Log:
Also need to strip the namespace of part accessors (WS-I BasicProfile 1.1)

Modified:
    ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java

Modified: ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java?rev=573763&r1=573762&r2=573763&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java (original)
+++ ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java Fri Sep  7 17:24:36 2007
@@ -121,7 +121,9 @@
                 outMsgContext.setEnvelope(envelope);
 
                 OMElement wrapper = soapFactory.createOMElement(new QName("http://www.apache.org/ode/pmapi", methodName+"Response"));
-                wrapper.addChild(convertToOM(soapFactory, result));
+                OMElement parts = convertToOM(soapFactory, result);
+                parts = stripNamespace(soapFactory, parts);
+                wrapper.addChild(parts);
                 envelope.getBody().addChild(wrapper);
 
                 if (__log.isDebugEnabled()) {
@@ -216,6 +218,17 @@
         } else throw new OdeFault("Couldn't convert object " + obj + " into a response element.");
     }
 
+    private static OMElement stripNamespace(SOAPFactory soapFactory, OMElement element) {
+        OMElement parent = soapFactory.createOMElement(new QName("", element.getLocalName()));
+        Iterator<OMElement> iter = element.getChildElements();
+        while (iter.hasNext()) {
+            OMElement child = iter.next();
+            child = child.cloneOMElement();
+            parent.addChild(child);
+        }
+        return parent;
+    }
+    
     private static boolean hasResponse(AxisOperation op) {
         switch(op.getAxisSpecificMEPConstant()) {
             case WSDLConstants.MEP_CONSTANT_IN_OUT: return true;