diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache')
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")) { |