Use the API to retrieve a Web service's URL, by referencing the service name from the Web service consumer table.
public static string GetWebServiceConsumerUrl(string serviceName)
{
WebServiceConsumerDefinition definition =
WebServiceConsumerDefinition.GetWebServiceConsumer(WorkflowRuntime.Engine, serviceName);
return definition.DiscoveryUrl;
}