tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r1294282 - /tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
Date Mon, 27 Feb 2012 19:08:44 GMT
Author: lresende
Date: Mon Feb 27 19:08:43 2012
New Revision: 1294282

URL: http://svn.apache.org/viewvc?rev=1294282&view=rev
Log:
Fixing issue where response wireFormats were being skiped

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java?rev=1294282&r1=1294281&r2=1294282&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
Mon Feb 27 19:08:43 2012
@@ -171,7 +171,7 @@ public class RESTBindingProcessor extend
 
                     } else if (RESPONSE_QNAME.equals(elementName)) {
 
-                        // skip response
+                     // skip response
                         reader.next();
                         // and position to the next start_element event
                         while (reader.hasNext()) {
@@ -179,23 +179,20 @@ public class RESTBindingProcessor extend
                             switch (sub_event) {
                                 case START_ELEMENT:
                                     elementName = reader.getName();
-                                    
-                                    if(WIRE_FORMAT_JSON.equals(elementName) || WIRE_FORMAT_XML.equals(elementName))
{
-                                        // dispatch to read wire format for the response
-                                        Object extension = readWireFormatAndOperationSelectorExtensions(reader);
-                                        if (extension != null) {
-                                            if (extension instanceof WireFormat) {
-                                                restBinding.setResponseWireFormat((WireFormat)extension);
-                                            }
-                                        }                                        
-                                    }
-                                    
                                     break;
                                 default: reader.next();
                             }
                             break;
                         }
 
+                        // dispatch to read wire format for the response
+                        //Object extension = extensionProcessor.read(reader, context);
+                        Object extension = readWireFormatAndOperationSelectorExtensions(reader);
+                        if (extension != null) {
+                            if (extension instanceof WireFormat) {
+                                restBinding.setResponseWireFormat((WireFormat)extension);
+                            }
+                        }
                         break;
                     } else if(WIRE_FORMAT_JSON.equals(elementName) || WIRE_FORMAT_XML.equals(elementName)
 ||
                               OPERATION_SELCTOR_JAXRS.equals(elementName) || OPERATION_SELCTOR_RPC.equals(elementName))
{



Mime
View raw message