tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r529602 - /incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/binding/ws/xml/WebServiceBindingProcessor.java
Date Tue, 17 Apr 2007 13:56:16 GMT
Author: antelder
Date: Tue Apr 17 06:56:15 2007
New Revision: 529602

URL: http://svn.apache.org/viewvc?view=rev&rev=529602
Log:
Add the WSDL namespace to the WebServiceBinding, populate it in the WebServiceBindingProcessor,
and also set the binding associated with a port when thats specified 

Modified:
    incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/binding/ws/xml/WebServiceBindingProcessor.java

Modified: incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/binding/ws/xml/WebServiceBindingProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/binding/ws/xml/WebServiceBindingProcessor.java?view=diff&rev=529602&r1=529601&r2=529602
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/binding/ws/xml/WebServiceBindingProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/binding/ws/xml/WebServiceBindingProcessor.java
Tue Apr 17 06:56:15 2007
@@ -22,6 +22,7 @@
 import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
 
 import javax.wsdl.Definition;
+import javax.wsdl.Port;
 import javax.wsdl.Service;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
@@ -83,6 +84,7 @@
                     throw new ContributionReadException("Invalid WebService binding wsdlElement
attribute: " + wsdlElement);
                 }
                 String namespace = wsdlElement.substring(0, index);
+                wsBinding.setNamespace(namespace);
                 String name = wsdlElement.substring(index + 1);
                 if (name.startsWith("wsdl.service")) {
                     
@@ -196,7 +198,7 @@
     public void resolve(WebServiceBinding model, ArtifactResolver resolver) throws ContributionResolveException
{
         WSDLDefinition wsdlDefinition = new DefaultWSDLFactory().createWSDLDefinition();
         wsdlDefinition.setUnresolved(true);
-        wsdlDefinition.setNamespace(model.getServiceName().getNamespaceURI());
+        wsdlDefinition.setNamespace(model.getNamespace());
         wsdlDefinition = resolver.resolve(WSDLDefinition.class, wsdlDefinition);
         if (!wsdlDefinition.isUnresolved()) {
             model.setDefinition(wsdlDefinition);
@@ -208,7 +210,9 @@
                 Service service = definition.getService(model.getServiceName());
                 model.setService(service);
                 if (service != null && model.getPortName() != null) {
-                    model.setPort(service.getPort(model.getPortName()));
+                    Port port = service.getPort(model.getPortName());
+                    model.setPort(port);
+                    model.setBinding(port.getBinding());
                 }
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message