From 5670f96c39fb938bfc6951dcb87d623a2d03bf8d Mon Sep 17 00:00:00 2001 From: bdaniel Date: Sun, 14 Nov 2010 22:31:42 +0000 Subject: TUSCANY-3664 Add support for multiple operation output types git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1035089 13f79535-47bb-0310-9956-ffa450edef68 --- .../wsdl/impl/WSDLOperationIntrospectorImpl.java | 31 +++++++++++++++------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org') diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java index 3fd476c46f..67191cd43d 100644 --- a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java +++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java @@ -149,24 +149,35 @@ public class WSDLOperationIntrospectorImpl { * @throws NotSupportedWSDLException */ @SuppressWarnings("unchecked") - public DataType getOutputType() throws InvalidWSDLException { + public DataType> getOutputType() throws InvalidWSDLException { if (outputType == null) { Output output = operation.getOutput(); Message outputMsg = (output == null) ? null : output.getMessage(); - List outputParts = (outputMsg == null) ? null : outputMsg.getOrderedParts(null); + operation.getInput(); + List outputParts = (outputMsg == null) ? null : outputMsg.getOrderedParts(null); + ArrayList partTypes = new ArrayList(); if (outputParts != null && outputParts.size() > 0) { - if (outputParts.size() > 1) { - // We don't support output with multiple parts - if (logger.isLoggable(Level.WARNING)) { - logger.warning("Multi-part output is not supported, please use BARE parameter style."); - } - // throw new InvalidWSDLException("Multi-part output is not supported"); +// if (outputParts.size() > 1) { +// // We don't support output with multiple parts +// if (logger.isLoggable(Level.WARNING)) { +// logger.warning("Multi-part output is not supported, please use BARE parameter style."); +// } +// // throw new InvalidWSDLException("Multi-part output is not supported"); +// } + for ( Part part : outputParts ) { + DataType partType = new WSDLPart(part, Object.class).getDataType(); + partTypes.add(partType); } - Part part = (Part)outputParts.get(0); - outputType = new WSDLPart(part, Object.class).getDataType(); + // outputType.setMetadata(WSDLOperation.class.getName(), this); + } else { + partTypes.add(null); } + + + outputType = + new DataTypeImpl>(dataBinding, Object[].class, partTypes); } return outputType; } -- cgit v1.2.3