title: How to change soap:address location on a C# web-service accessed via Apigee
body: <p>I have several web services written in c# using Visual Studio 2010. I also have an Apipgee account and access the web services via an Apigee URL including an API key as a parameter.</p>
  
  <p>Accessing the WSDL of the web services (via Apigee), I use a URL similar to that below:</p>
  
  <p><a href="https://myapi-prod.apigee.net/v1/myapi/Path/To/MyWebService.asmx?wsdl&amp;apikey=" rel="nofollow">https://myapi-prod.apigee.net/v1/myapi/Path/To/MyWebService.asmx?wsdl&amp;apikey=</a>{myapikey}</p>
  
  <p>The WSDL is returned successfully but under the binding information (below), the direct path to the web service is displayed. Originallty, I did not pick this up, but when adding firewall rules to block direct access to our server (api.mydomain.com in the example), I of course blocked any requests where people had used the WSDL.</p>
  
  <p>My question is how can I change the address location in the WSDL? There is little point in having a service like Apigee where all it does is protects the WSDL.</p>
  
  <pre><code>  &lt;wsdl:service name="MyWebService"&gt;
      &lt;wsdl:port name="MyWebServiceSoap" binding="tns:MyWebServiceSoap"&gt;
        &lt;soap:address location="https://api.mydomain.com/Path/To/MyWebService.asmx" /&gt;
      &lt;/wsdl:port&gt;
      &lt;wsdl:port name="MyWebServiceSoap12" binding="tns:MyWebServiceSoap12"&gt;
        &lt;soap12:address location="https://api.mydomain.com/Path/To/MyWebService.asmx" /&gt;
      &lt;/wsdl:port&gt;
      &lt;wsdl:port name="MyWebServiceHttpGet" binding="tns:MyWebServiceHttpGet"&gt;
        &lt;http:address location="https://api.mydomain.com/Path/To/MyWebService.asmx" /&gt;
      &lt;/wsdl:port&gt;
      &lt;wsdl:port name="MyWebServiceHttpPost" binding="tns:MyWebServiceHttpPost"&gt;
        &lt;http:address location="https://api.mydomain.com/Path/To/MyWebService.asmx" /&gt;
      &lt;/wsdl:port&gt;
    &lt;/wsdl:service&gt;
  </code></pre>