ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hans...@apache.org
Subject svn commit: r896347 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java
Date Wed, 06 Jan 2010 08:05:02 GMT
Author: hansbak
Date: Wed Jan  6 08:05:00 2010
New Revision: 896347

URL: http://svn.apache.org/viewvc?rev=896347&view=rev
Log:
the netbeans generated code (jax-ws) now works with this patch. contribution by Chris snow

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java?rev=896347&r1=896346&r2=896347&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java Wed Jan
 6 08:05:00 2010
@@ -36,6 +36,7 @@
 import javolution.util.FastMap;
 
 import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.util.StAXUtils;
@@ -194,11 +195,18 @@
                             SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
                             SOAPEnvelope resEnv = factory.createSOAPEnvelope();
                             SOAPBody resBody = factory.createSOAPBody();
-                            OMElement resService = factory.createOMElement(new QName(ModelService.TNS,
serviceName + "Response"));
+                            OMElement resService = factory.createOMElement(new QName(serviceName
+ "Response"));
                             resService.addChild(resultSer.getFirstElement());
                             resBody.addChild(resService);
                             resEnv.addChild(resBody);
                             
+                            // The declareDefaultNamespace method doesn't work see (https://issues.apache.org/jira/browse/AXIS2-3156)
+                            // so the following doesn't work: 
+                            // resService.declareDefaultNamespace(ModelService.TNS);
+                            // instead, create the xmlns attribute directly:
+                            OMAttribute defaultNS = factory.createOMAttribute("xmlns", null,
ModelService.TNS);
+                            resService.addAttribute(defaultNS);
+                            
                             // log the response message
                             if (Debug.verboseOn()) {
                                 try {



Mime
View raw message