If you only need to use different endpoints (with different addresses) and the services publish the same wsdl contract, just use this before the invocation:
where "endpoint" is your runtime selected endpoint address.
thank you, looks exactly as what I need.
This does exactly what I need, Stub created against a Dev URL but in Production want to call production url based on url in a config setup. But is there not a more straight forward way to do this? It just seems like such a basic need that I'm confused on why it appears the only way to change it is a "back door".
I have tried using the wsdlLocation parameter of the generated Service Constructor, aka the Service.create call, and that seems to affect where it gets the WSDL from for validation, but it doesn't seem to affect where the call is actually made. That call still defaults to the url in the port section of the original wsdl used to generate the client stub.
Am I doing something wring or is this just how it is?