From bb3d56a12d757c67f35fdf90259996e445441f65 Mon Sep 17 00:00:00 2001 From: rfeng Date: Sat, 13 Oct 2012 07:04:11 +0000 Subject: One more try to set the default cors git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1397797 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/binding/rest/xml/RESTBindingProcessor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache') 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 ee781c4838..8f3e6cf792 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 @@ -146,12 +146,12 @@ public class RESTBindingProcessor extends BaseStAXArtifactProcessor implements S restBinding.setReadTimeout(Integer.valueOf(readTimeout)); } - Boolean isCORS = getBoolean(reader, CORS); - if(isCORS != null) { - restBinding.setCORS(isCORS); + String corsAttr = reader.getAttributeValue(null, CORS); + if(corsAttr != null) { + restBinding.setCORS(getBoolean(reader, CORS)); } else { // Default to true - restBinding.setCORS(Boolean.TRUE); + restBinding.setCORS(true); } break; -- cgit v1.2.3