Dynamically change endpoint URL of a Webservice
December 9th, 2005
Changing the Endpoint URL of a webservice in ColdFusionMX 7 was not as easy as it seemed. I received this bit of information from some ColdFusion guru's.
JAVASCRIPT:
-
<cfscript>
-
ws = CreateObject("webservice", "http://localhost:8500/service.cfc?WSDL");
-
// Use a different endpoint for the stub.
-
ws._setProperty("javax.xml.rpc.service.endpoint.address", "http://localhost:8501/service.cfc");
-
ret = ws.echo("Through the tunnel");
-
</cfscript>
Entry Filed under: ColdFusion MX 7



Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed