Question

FedEx doesn't provide UDDI services but need to be downloaded as a WSDL file. Once the developement is complete, the development WSDL need to be replaced with production WSDL. I am using Visual Studio 2008 and just replacing the WSDL doesn't automatically work in production, but need to be reimported and rebuild the project. This creates two different binary signatures for both devlopment and production environments. I need to accomplish this through some configuration files so my binaries will be same for my development and production environments. Any ideas??? Thanks!

The only change in WSDL filess is location value.

 <port name="RateServicePort" binding="ns:RateServiceSoapBinding">
      <s1:address location="https://ws.fedex.com:443/web-services" />
    </port>
Was it helpful?

Solution

We normally override the URL, similar to how Dave Zych said, along these lines:

prod = new Service.Service();
// ... read configuration into cfg ...
prod.Url = cfg.ServiceURL;

The URL changes depending on the environment via the configuration. The WSDL is consistent, as are the underlying classes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top