在C#中创建端点

时间:2013-03-07 07:38:39

标签: c# wcf endpoint

我在我的web.config文件中定义了这个端点,它工作正常。现在我需要根据我将要使用的服务来更改某些值。我的端点看起来像这样。

    <endpoint address="https://www.yyy.com/services" binding="basicHttpBinding" bindingConfiguration="VehicleQuotationManagementServiceBinding" contract="VehicleQuotationManagementService.VehicleQuotationManagementServicePortType" name="VehicleQuotationManagementServicePort">
    <headers>
      <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">ws://bla.com/CSP/UsedCars/VehicleQuotationManagementService/V1</wsa:To>
      <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">ws://bla.com/CSP/UsedCars/VehicleQuotationManagementService/V1/ProcessAliveTest</wsa:Action>
      <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">1111</wsa:MessageID>
      <vwa:Country xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:vwa="http://xmldefs.bla.com/Technical/Addressing/V1">SE</vwa:Country>
      <vwa:Brand xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:vwa="http://xmldefs.bla.com/Technical/Addressing/V1">V</vwa:Brand>
      <vwa:System xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:vwa="http://xmldefs.bla.com/Technical/Addressing/V1">GWB</vwa:System>
    </headers>
  </endpoint> 

有人可以帮我用c#代码创建这个端点吗?

0 个答案:

没有答案