summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2012-02-27 19:08:43 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2012-02-27 19:08:43 +0000
commita0a8ac0a56f74f88e0ffbc54aa45a85dbb14c419 (patch)
treeffb8c0d5865c9371ebce1395894e825efbbb006a /sca-java-2.x/trunk
parent8fee51b93c848a98e975110238c0d3b96f9ef353 (diff)
Fixing issue where response wireFormats were being skiped
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1294282 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
index 0c63bed88d..da0e1ece06 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java
@@ -171,7 +171,7 @@ public class RESTBindingProcessor extends BaseStAXArtifactProcessor implements S
} 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 extends BaseStAXArtifactProcessor implements S
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)) {