From de7789044d196dfadab3b8ddfddf2f26f7a1bbd8 Mon Sep 17 00:00:00 2001 From: scottkurz Date: Thu, 20 Jan 2011 14:57:06 +0000 Subject: Fix for TUSCANY-3819 (still need to cleanup bare case, wsdlgen). git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1061329 13f79535-47bb-0310-9956-ffa450edef68 --- .../wsdl/impl/WSDLOperationIntrospectorImpl.java | 35 +++++----------------- 1 file changed, 7 insertions(+), 28 deletions(-) (limited to 'sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl') 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 67191cd43d..48aab67ded 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 @@ -38,6 +38,8 @@ import org.apache.tuscany.sca.contribution.processor.ProcessorContext; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Operation; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_INPUT; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_OUTPUT; import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; import org.apache.tuscany.sca.interfacedef.util.ElementInfo; import org.apache.tuscany.sca.interfacedef.util.FaultException; @@ -132,52 +134,29 @@ public class WSDLOperationIntrospectorImpl { /** * @return - * @throws InvalidServiceContractException + * @throws InvalidWSDLException */ public DataType> getInputType() throws InvalidWSDLException { if (inputType == null) { Input input = operation.getInput(); Message message = (input == null) ? null : input.getMessage(); inputType = getMessageType(message); - inputType.setDataBinding("idl:input"); + inputType.setDataBinding(IDL_INPUT); } return inputType; } /** * @return - * @throws NotSupportedWSDLException + * @throws InvalidWSDLException */ @SuppressWarnings("unchecked") public DataType> getOutputType() throws InvalidWSDLException { if (outputType == null) { Output output = operation.getOutput(); Message outputMsg = (output == null) ? null : output.getMessage(); - - 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"); -// } - for ( Part part : outputParts ) { - DataType partType = new WSDLPart(part, Object.class).getDataType(); - partTypes.add(partType); - } - - // outputType.setMetadata(WSDLOperation.class.getName(), this); - } else { - partTypes.add(null); - } - - - outputType = - new DataTypeImpl>(dataBinding, Object[].class, partTypes); + outputType = getMessageType(outputMsg); + outputType.setDataBinding(IDL_OUTPUT); } return outputType; } -- cgit v1.2.3