svn commit: r669642 - in /ofbiz/trunk/framework: service/src/org/ofbiz/service/engine/SOAPClientEngine.java webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r669642 - in /ofbiz/trunk/framework: service/src/org/ofbiz/service/engine/SOAPClientEngine.java webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java

jaz-3
Author: jaz
Date: Thu Jun 19 11:47:13 2008
New Revision: 669642

URL: http://svn.apache.org/viewvc?rev=669642&view=rev
Log:
fixed encoding issues with SOAP responses; now ignoring all internal parameters for SOAP client calls (when TimeZone was added it broke the encoding)

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

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java?rev=669642&r1=669641&r2=669642&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java Thu Jun 19 11:47:13 2008
@@ -118,8 +118,8 @@
         for (ModelParam p: inModelParamList) {
             if (Debug.infoOn()) Debug.logInfo("[SOAPClientEngine.invoke} : Parameter: " + p.name + " (" + p.mode + ") - " + i, module);
             
-            //Exclude params that ModelServiceReader insert into
-            if(!p.name.trim().equals("userLogin") && !p.name.trim().equals("locale")) {
+            // exclude params that ModelServiceReader insert into (internal params)
+            if (!p.internal) {
                 QName qName = call.getParameterTypeByName(p.name); //.getTypeMapping().getTypeQName((Class) ObjectType.classNameClassMap.get(p.type));
                 call.addParameter(p.name, qName, getMode(p.mode));
                 vParams.add(context.get(p.name));

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=669642&r1=669641&r2=669642&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 Thu Jun 19 11:47:13 2008
@@ -35,6 +35,7 @@
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.base.util.StringOutputStream;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.ModelService;
@@ -149,7 +150,8 @@
             throw new EventHandlerException("Problems with the AXIS server", e);
         }
         MessageContext mctx = new MessageContext(axisServer);
-
+        mctx.setEncodingStyle(Constants.URI_LITERAL_ENC); // sets the response encoding
+        
         // get the SOAP message
         Message msg = null;
 
@@ -166,6 +168,16 @@
             throw new EventHandlerException("SOAP Message is null");
         }
 
+        // log the request message
+        if (Debug.verboseOn()) {
+            try {
+                StringOutputStream out = new StringOutputStream();
+                msg.writeTo(out);
+                Debug.logInfo("Request Message:\n" + out.toString() + "\n", module);
+            } catch (Throwable t) {
+            }
+        }
+
         mctx.setRequestMessage(msg);
 
         // new envelopes
@@ -263,6 +275,16 @@
             throw new EventHandlerException("No response message available");
         }
 
+        // log the response message
+        if (Debug.verboseOn()) {
+            try {
+                StringOutputStream out = new StringOutputStream();
+                msg.writeTo(out);
+                Debug.log("Response Message:\n" + out.toString() + "\n", module);
+            } catch (Throwable t) {
+            }
+        }
+
         try {            
             response.setContentType(msg.getContentType(Constants.DEFAULT_SOAP_VERSION));  
             response.setContentLength(Integer.parseInt(Long.toString(msg.getContentLength())));