2016-10-21 10 views
1

Visual StudioでWCFサービスを使用しています。生成されたWSDLには、私が望まない部分がありますが、どこから来たのか分かりません。私は削除する必要がどのようなWCFサービスで生成されたWSDL

-<wsdl:service name="AdfsService"> 
-<wsdl:port name="CustomBinding_IAdfsService" binding="tns:CustomBinding_IAdfsService"> 

<soap12:address location="https://localhost/AdCustomerService/AdfsService.svc"/> 


-<wsa10:EndpointReference> 

<wsa10:Address>https://localhost/AdCustomerService/AdfsService.svc</wsa10:Address> 

</wsa10:EndpointReference> 

</wsdl:port> 

</wsdl:service> 

は次のとおりです。ここで

-<wsa10:EndpointReference> 

<wsa10:Address>https://localhost/AdCustomerService/AdfsService.svc</wsa10:Address> 

</wsa10:EndpointReference> 

は私のWebConfigです:

<behaviors> 
     <serviceBehaviors> 
     <behavior> 
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="true"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 


     <customBinding> 
     <binding name="CustomTransportSecurity"> 
      <transactionFlow /> 
      <textMessageEncoding /> 
      <httpsTransport /> 
     </binding> 
     </customBinding>  
    </bindings>  


    <protocolMapping> 
     <add binding="basicHttpsBinding" scheme="https"/> 
    </protocolMapping> 

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false"/> 

    <services> 
     <service name="webservices.portalx.AdfsService"> 
     <endpoint address="" contract="webservices.portalx.IAdfsService" 
        bindingNamespace="webservices.portalx" binding="customBinding" 
        bindingConfiguration ="CustomTransportSecurity"/> 
     <endpoint address="mex" contract="IMetadataExchange" binding="mexHttpsBinding"/> 
     </service> 
    </services> 

    </system.serviceModel> 
    <system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"> 
     <remove name="ApplicationInsightsWebTracking"/> 
     <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" 
     preCondition="managedHandler"/> 
    </modules> 

    <directoryBrowse enabled="true"/> 
    <validation validateIntegratedModeConfiguration="false"/>  
    </system.webServer> 

誰もが探しに方向に私を指すことができますか?私はそれをgoogleingしようとしたが、有用なリンクを見つけることはできない。私は非常に興味があったとして、私がテストしたものからためにカスタム構成である

+0

投稿したソリューションを試しましたか? – Aria

答えて

0

、 は、私はこのように定義し、エンドポイントとします

<endpoint address="" binding="customBinding" bindingConfiguration="x" contract="interfaceContract"> 
     <identity> 
     <dns value="localhost" /> 
     </identity> 
    </endpoint> 

その後、次のようカスタムバインディングを定義します。

<customBinding> 
    <binding name="x" openTimeout="00:00:10" > 
     <binaryMessageEncoding/> 
     <httpsTransport/> 
    </binding> 
    </customBinding> 

<wsa10:EndpointReference> 
     <wsa10:Address>https://localhost:2061/PCM/Exam.svc</wsa10:Address> 
     <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> 
     <Dns>localhost</Dns> 
     </Identity> 
    </wsa10:EndpointReference> 

あなたはホスティングサービスの後にこのようなものが表示されます以下のような

<endpoint address="" binding="basicHttpBinding" contract="MARCO.SOA.PCMServiceLib.IExamService"> 
     <identity> 
     <dns value="localhost" /> 
     </identity> 
    </endpoint> 

基本的なバインディング::私はカスタム結合することなく、このような私のエンドポイント・サービスを定義し、他の側で0

<basicHttpBinding> 
    <binding allowCookies="true" openTimeout="00:00:10" maxReceivedMessageSize="2000000000" > 
     <readerQuotas maxDepth="32" maxArrayLength="2000000000" maxStringContentLength="2000000000" /> 
     <security mode="None" /> 
    </binding> 
    </basicHttpBinding> 

wsdlにはEndPointReferenceはありません。あなたのようEndPointを定義したとき、私は、デフォルトでwsdlnet.tcpnet.pipeのような他のプロトコルのためのEndPointRefrenceがあると思い :

<endpoint address="" binding="netTcpBinding" contract="interfaceContract"> 
     <identity> 
     <dns value="localhost" /> 
     </identity> 
    </endpoint> 
    <endpoint address="" binding="netNamedPipeBinding" contract="interfaceContract" /> 

が、これはあなたの手掛かりを与えることを願っています。

+0

バインディング構成広告の追加データをwsa10:Endpointreferenceに削除します。私はwsHttpBindingで起動し、customBindingで同じ問題が発生しました。示されたソリューションのどれもがwsa10:Endpointreferenceを完全に削除しませんでした。 – user3681272

+0

本当ですか?もう一度テストしました。別のエンドポイント設定を削除して、 'wsdl'の' EndPointRefrence'を見ることができません。 – Aria

+0

''web.config'で私は 'wsdl'出力のバインディング要素に' 'と' エンドポイント参照。 – Aria

関連する問題