1

有谁知道为什么当 WCF 服务应该是 application/soap+xml 时,它可以将其内容类型作为 text/xml 发送?

接下来是服务器 Web.config:

<system.serviceModel>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
  <services>
    <service name="WCFServicioSNP.ServicioSNP" behaviorConfiguration="WCFServicioSNP.ServicioSNPBehavior">
      <endpoint address="" binding="wsHttpBinding" contract="WCFServicioSNP.IServicioSNP"/>
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    </service>
    <service behaviorConfiguration="WCFServicioSNP.ServicioNovedadSNPBehavior" name="WCFServicioSNP.ServicioNovedadSNP">
      <endpoint address="" binding="wsHttpBinding" contract="WCFServicioSNP.IServicioNovedadSNP"/>
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    </service>
    <service behaviorConfiguration="WCFServicioSNP.ServicioInfraestructuraSNPBehavior" name="WCFServicioSNP.ServicioInfraestructuraSNP">
      <endpoint address="" binding="wsHttpBinding" contract="WCFServicioSNP.IServicioInfraestructuraSNP"/>
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior name="WCFServicioSNP.ServicioSNPBehavior">
        <serviceMetadata httpGetEnabled="True"/>
        <serviceDebug includeExceptionDetailInFaults="False"/>
      </behavior>
      <behavior name="WCFServicioSNP.ServicioNovedadSNPBehavior">
        <serviceMetadata httpGetEnabled="true"/>
        <serviceDebug includeExceptionDetailInFaults="False"/>
      </behavior>
      <behavior name="WCFServicioSNP.ServicioInfraestructuraSNPBehavior">
        <serviceMetadata httpGetEnabled="true"/>
        <serviceDebug includeExceptionDetailInFaults="False"/>
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>
4

0 回答 0