summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-26 13:23:57 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-26 13:23:57 +0000
commitaef1e52d6377f18516371655c32125c68bac0cce (patch)
tree598aeb93747d119998df3f87b22eacb0125efaa3 /branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca
parentde53364092d375a98144b29e85e09abc8842268e (diff)
TUSCANY-2931 - allow separate request and response wire formats in binding.jms. The tuscany binding.jms XSD has been extended to allow a response wireFormat element to be specified. The knock on effect of all this is that the Operation interface has been changed to allow input and output wrapper info to be held separately. Also Interface has some new operations. There are changes across the code base to take account of this interface change.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@758625 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca')
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java26
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);