diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java index 933534cc79..cbdeec2b4a 100644 --- a/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java +++ b/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java @@ -212,11 +212,11 @@ public class Interface2WSDLGenerator { private Map<XMLTypeHelper, List<DataType>> getDataTypes(Interface intf, boolean useWrapper, Map<String, XMLTypeHelper> helpers) { Map<XMLTypeHelper, List<DataType>> dataTypes = new HashMap<XMLTypeHelper, List<DataType>>(); for (Operation op : intf.getOperations()) { - WrapperInfo wrapper = op.getWrapper(); + WrapperInfo inputWrapper = op.getInputWrapper(); DataType dt1 = null; - boolean useInputWrapper = useWrapper & wrapper != null; + boolean useInputWrapper = useWrapper & inputWrapper != null; if (useInputWrapper) { - dt1 = wrapper.getInputWrapperType(); + dt1 = inputWrapper.getWrapperType(); useInputWrapper &= inputTypesCompatible(dt1, op.getInputType(), helpers); } if (useInputWrapper) { @@ -228,9 +228,10 @@ public class Interface2WSDLGenerator { } DataType dt2 = null; - boolean useOutputWrapper = useWrapper & wrapper != null; + WrapperInfo outputWrapper = op.getOutputWrapper(); + boolean useOutputWrapper = useWrapper & outputWrapper != null; if (useOutputWrapper) { - dt2 = wrapper.getOutputWrapperType(); + dt2 = outputWrapper.getWrapperType(); useOutputWrapper &= outputTypeCompatible(dt2, op.getOutputType(), helpers); } if (useOutputWrapper) { @@ -284,7 +285,7 @@ public class Interface2WSDLGenerator { javax.wsdl.Operation operation = generateOperation(definition, op, helpers, wrappers); portType.addOperation(operation); String action = ((JavaOperation)op).getAction(); - if ((action == null || "".equals(action)) && !op.isWrapperStyle() && op.getWrapper() == null) { + if ((action == null || "".equals(action)) && !op.isInputWrapperStyle() && op.getInputWrapper() == null) { // Bare style action = "urn:" + op.getName(); } @@ -570,7 +571,7 @@ public class Interface2WSDLGenerator { List<ElementInfo> elements = null; // FIXME: By default, java interface is mapped to doc-lit-wrapper style WSDL - if (op.getWrapper() != null) { + if (op.getInputWrapper() != null) { // Generate doc-lit-wrapper style inputMsg.addPart(generateWrapperPart(definition, op, helpers, wrappers, true)); } else { @@ -597,7 +598,7 @@ public class Interface2WSDLGenerator { outputMsg.setUndefined(false); definition.addMessage(outputMsg); - if (op.getWrapper() != null) { + if (op.getOutputWrapper() != null) { outputMsg.addPart(generateWrapperPart(definition, op, helpers, wrappers, false)); } else { DataType outputType = op.getOutputType(); @@ -677,12 +678,13 @@ public class Interface2WSDLGenerator { Part part = definition.createPart(); String partName = input ? operation.getName() : (operation.getName() + "Response"); part.setName(partName); - WrapperInfo opWrapper = operation.getWrapper(); - if (opWrapper != null) { + WrapperInfo inputWrapperInfo = operation.getInputWrapper(); + WrapperInfo outputWrapperInfo = operation.getOutputWrapper(); + if ((inputWrapperInfo != null) && (outputWrapperInfo != null)) { ElementInfo elementInfo = - input ? opWrapper.getInputWrapperElement() : opWrapper.getOutputWrapperElement(); + input ? inputWrapperInfo.getWrapperElement() : outputWrapperInfo.getWrapperElement(); List<ElementInfo> elements = - input ? opWrapper.getInputChildElements() : opWrapper.getOutputChildElements(); + input ? inputWrapperInfo.getChildElements() : outputWrapperInfo.getChildElements(); QName wrapperName = elementInfo.getQName(); part.setElementName(wrapperName); addNamespace(definition, wrapperName); |