diff options
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java | 21 |
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)) { |