You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2010/08/29 10:53:46 UTC
svn commit: r990515 - in
/tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat:
json/impl/JSONWireFormatImpl.java xml/impl/XMLWireFormatImpl.java
Author: lresende
Date: Sun Aug 29 08:53:46 2010
New Revision: 990515
URL: http://svn.apache.org/viewvc?rev=990515&view=rev
Log:
Simple way (workaround) to provide mime type for wireFormat
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.java
tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.java
Modified: tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.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/wireformat/json/impl/JSONWireFormatImpl.java?rev=990515&r1=990514&r2=990515&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/json/impl/JSONWireFormatImpl.java Sun Aug 29 08:53:46 2010
@@ -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.re
/**
* JSON Wireformat implementation for REST Binding
- *
+ *
* @version $Rev$ $Date$
*/
public class JSONWireFormatImpl implements JSONWireFormat {
@@ -41,4 +41,8 @@ public class JSONWireFormatImpl implemen
public void setUnresolved(boolean unresolved) {
// no op
}
+
+ public String toString() {
+ return "application/json";
+ }
}
Modified: tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.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/wireformat/xml/impl/XMLWireFormatImpl.java?rev=990515&r1=990514&r2=990515&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/impl/XMLWireFormatImpl.java Sun Aug 29 08:53:46 2010
@@ -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.re
/**
* XML Wireformat implementation for REST Binding
- *
+ *
* @version $Rev$ $Date$
*/
public class XMLWireFormatImpl implements XMLWireFormat {
@@ -41,4 +41,8 @@ public class XMLWireFormatImpl implement
public void setUnresolved(boolean unresolved) {
// no op
}
+
+ public String toString() {
+ return "application/xml";
+ }
}