私のサービス(ExternalOrderService.svc)から単一のファイルWSDLを取得するためにWCFExtrasを使用しようとしています。WCFExtras web.config(外部)
WCFExtras SampleServerプロジェクトから元のweb.configを変更して、自分のサービスへの参照を追加しました。 ServerSampleは正常に動作し、Sample.WsdlSample wsdlファイルを呼び出すことに成功しましたが、私のサービスwsdlを呼び出すには成功しませんでした。 以下の設定で何が問題になっていますか?
<system.serviceModel>
<services>
<service behaviorConfiguration="Sample.WsdlSampleBehavior" name="Sample.WsdlSample">
<endpoint address="" behaviorConfiguration="Sample.WsdlSampleEndpointBehavior" binding="basicHttpBinding" contract="Sample.IWsdlSample"/>
</service>
<service behaviorConfiguration="Sample.SoapHeadersSampleBehavior" name="Sample.SoapHeadersSample">
<endpoint address="" behaviorConfiguration="Sample.SoapHeadersSampleEndpointBehavior" binding="basicHttpBinding" contract="Sample.ISoapHeadersSample"/>
</service>
<service behaviorConfiguration="ExternalOrderServiceBehavior" name="ExternalOrderService">
<endpoint address="" binding="basicHttpBinding" contract="Monclick.MVC2.Services.External.IExternalOrderService" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="Sample.WsdlSampleEndpointBehavior">
<wsdlExtensions location="http://127.0.0.1/Sample/WsdlSample.svc" singleFile="True"/>
</behavior>
<behavior name="Sample.SoapHeadersSampleEndpointBehavior">
<wsdlExtensions location="http://127.0.0.1/Sample/SoapHeadersSample.svc"/>
</behavior>
<behavior name="ExternalOrderServiceBehavior">
<wsdlExtensions location="http://api.local/Services/ExternalOrderService.svc" singleFile="true" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="Sample.WsdlSampleBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" httpHelpPageEnabled="false"/>
</behavior>
<behavior name="Sample.SoapHeadersSampleBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="ExternalOrderServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<extensions>
<behaviorExtensions>
<!-- Declare that we have an extension called WSDL Extras-->
<add name="wsdlExtensions" type="WCFExtras.Wsdl.WsdlExtensionsConfig, WCFExtras, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</behaviorExtensions>
</extensions>
</system.serviceModel>
リモートサービスを参照することはできませんか? api.localとしましょう。 –
yes api.localが登録されたDNS名ですが、DNS名のようには見えませんが、そうであってもかまいません。 –