summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2009-06-26 20:06:13 +0000
committerbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2009-06-26 20:06:13 +0000
commit55efe51ad85a25f50e45a3f80fc89076910b8ad4 (patch)
tree9d27c46b33b809bfa54fc4eb1803e59dd44db0a7
parentc28296c8525f7d60049930a38c970e3c7be97007 (diff)
TUSCANY-3121 binding.atom should leverage introspection when setting up call to mediator
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@788848 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java7
-rw-r--r--branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java14
2 files changed, 9 insertions, 12 deletions
diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
index 5eebc6dff7..d7cbf83374 100644
--- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
+++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
@@ -150,10 +150,9 @@ class AtomBindingListenerServlet extends HttpServlet {
if (itemClass == org.apache.abdera.model.Entry.class) {
supportsFeedEntries = true;
}
- DataType<XMLType> outputType = getOperation.getOutputType();
- QName qname = outputType.getLogical().getElementName();
- qname = new QName(qname.getNamespaceURI(), itemClass.getSimpleName());
- itemClassType = new DataTypeImpl<XMLType>("java:complexType", itemClass, new XMLType(qname, null));
+ //We assume that the item type is the same for both input and
+ //ouput for all operations on the interface
+ itemClassType = getOperation.getOutputType();
}
}
diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java
index f2b1d1f72b..2c6c952dcb 100644
--- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java
+++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java
@@ -86,22 +86,20 @@ class AtomReferenceBindingProvider implements ReferenceBindingProvider {
public Invoker createInvoker(Operation operation) {
- String operationName = operation.getName();
- if (operationName.equals("get")) {
-
+ String operationName = operation.getName();
+ if (operationName.equals("get")) {
+
// Determine the collection item type
itemXMLType = new DataTypeImpl<Class<?>>(String.class.getName(), String.class, String.class);
Class<?> itemClass = operation.getOutputType().getPhysical();
DataType<XMLType> outputType = operation.getOutputType();
- QName qname = outputType.getLogical().getElementName();
- qname = new QName(qname.getNamespaceURI(), itemClass.getSimpleName());
- itemClassType = new DataTypeImpl<XMLType>("java:complexType", itemClass, new XMLType(qname, null));
+ itemClassType = outputType;
if (itemClassType.getPhysical() == org.apache.abdera.model.Entry.class) {
supportsFeedEntries = true;
}
-
+
return new AtomBindingInvoker.GetInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this);
-
+
} else if (operationName.equals("post")) {
return new AtomBindingInvoker.PostInvoker(operation, binding.getURI(), httpClient, authorizationHeader, this);
} else if (operationName.equals("put")) {