You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/08/31 01:47:58 UTC
svn commit: r438713 -
/incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
Author: jsdelfino
Date: Wed Aug 30 16:47:58 2006
New Revision: 438713
URL: http://svn.apache.org/viewvc?rev=438713&view=rev
Log:
Added support for overriding a WS binding endpoint using the uri attribute on the binding element
Modified:
incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp?rev=438713&r1=438712&r2=438713&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp Wed Aug 30 16:47:58 2006
@@ -74,7 +74,7 @@
string portNamespace = binding->getWSDLNamespaceURL();
// Lookup the wsdl model from the composite, keyed on the namespace
- // (the wsdl will have been loaded at startup, based on the information in the config file)
+ // (the wsdl will have been loaded at startup)
Composite* composite=compositeReference->getComposite();
WSDLDefinition* wsdlDefinition = composite->findWSDLDefinition(portNamespace);
if (wsdlDefinition == 0)
@@ -89,7 +89,7 @@
const WSDLOperation& wsdlOperation = wsdlDefinition->findOperation(
binding->getServiceName(),
binding->getPortName(),
- operationName);
+ operationName);
// Initialize Axis2 stuff
axis2_allocator_t *allocator = axis2_allocator_init (NULL);
@@ -99,7 +99,19 @@
env->log->level = AXIS2_LOG_LEVEL_TRACE;
axis2_error_init();
- axis2_char_t* address = (axis2_char_t*)wsdlOperation.getEndpoint().c_str();
+ // Get the target endpoint address
+ // The URI specified in the binding overrides the address specified in
+ // the WSDL
+ axis2_char_t* address;
+ if (binding->getURI() != "")
+ {
+ address = (axis2_char_t*)binding->getURI().c_str();
+ }
+ else
+ {
+ address = (axis2_char_t*)wsdlOperation.getEndpoint().c_str();
+ }
+
axis2_char_t* opName = (axis2_char_t*)operationName.c_str();
axis2_char_t* soap_action = (axis2_char_t*)wsdlOperation.getSoapAction().c_str();
axis2_char_t* serviceName = (axis2_char_t*)binding->getServiceName().c_str();
@@ -371,8 +383,6 @@
LOGEXIT(1, "Axis2Client::setReturn");
}
-
-
} // End namespace ws
} // End namespace sca
-} // End namespace tuscany
\ No newline at end of file
+} // End namespace tuscany
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org