diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-30 10:06:46 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-30 10:06:46 +0000 |
commit | 93e8a5439342f2543907da37c33e38e0c37b00e0 (patch) | |
tree | e52f789a71501cdf82b01bb1296767877ecf86a6 /sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java | |
parent | d298c1ad553a7a04f353052f1982f7f106c09503 (diff) |
TUSCANY-3614 - first pass at support for rpc/lit. Does the right sort of thing now but some of the code is in the wrong place so some refactoring still to do
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@959254 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java b/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java index 47cf44265f..4ecde7f4d3 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java +++ b/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java @@ -31,6 +31,8 @@ import java.util.logging.Logger; import javax.wsdl.Binding; import javax.wsdl.Definition; import javax.wsdl.Import; +import javax.wsdl.Message; +import javax.wsdl.Part; import javax.wsdl.Port; import javax.wsdl.PortType; import javax.wsdl.Service; @@ -260,6 +262,23 @@ public class WSDLServiceGenerator { } helper.createBindingOperations(def, binding, portType); binding.setUndefined(false); + + // set binding style based on the interface specified by the + // user if one is available + // TODO - set encoding style also currently default to literal + if (wsdlDefinition != null && wsdlDefinition.getDefinition() != null){ + Message firstMessage = (Message)wsdlDefinition.getDefinition().getMessages().values().iterator().next(); + Part firstPart = (Part)firstMessage.getParts().values().iterator().next(); + if (firstPart.getTypeName() != null){ + for (Object ext : binding.getExtensibilityElements()){ + if (ext instanceof SOAPBinding){ + ((SOAPBinding)ext).setStyle("rpc"); + break; + } + } + } + } + def.addBinding(binding); String endpointURI = computeActualURI(wsBinding, null); |