summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-rest
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-08-29 08:53:46 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-08-29 08:53:46 +0000
commite27b523cd9c887e65d09ba35e40ffd1f458d9bd7 (patch)
tree8d250cd39c84d3505615ffd0ed725451a68d2fb3 /sca-java-2.x/trunk/modules/binding-rest
parent6d033373f9d062b61bb6c722afe6e7a4b26771b5 (diff)
Simple way (workaround) to provide mime type for wireFormat
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@990515 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-rest')
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.java12
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.java12
2 files changed, 16 insertions, 8 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.java
index 2ce3b95453..0588477e79 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.java
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.binding.rest.wireformat.json.impl;
@@ -25,7 +25,7 @@ import org.apache.tuscany.sca.binding.rest.wireformat.json.JSONWireFormat;
/**
* JSON Wireformat implementation for REST Binding
- *
+ *
* @version $Rev$ $Date$
*/
public class JSONWireFormatImpl implements JSONWireFormat {
@@ -41,4 +41,8 @@ public class JSONWireFormatImpl implements JSONWireFormat {
public void setUnresolved(boolean unresolved) {
// no op
}
+
+ public String toString() {
+ return "application/json";
+ }
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.java
index 3f51fb8832..c4199081c9 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.java
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.binding.rest.wireformat.xml.impl;
@@ -25,7 +25,7 @@ import org.apache.tuscany.sca.binding.rest.wireformat.xml.XMLWireFormat;
/**
* XML Wireformat implementation for REST Binding
- *
+ *
* @version $Rev$ $Date$
*/
public class XMLWireFormatImpl implements XMLWireFormat {
@@ -41,4 +41,8 @@ public class XMLWireFormatImpl implements XMLWireFormat {
public void setUnresolved(boolean unresolved) {
// no op
}
+
+ public String toString() {
+ return "application/xml";
+ }
}