2012-03-30 45 views
0

WCFサービス用のwsdlには、操作の入力パラメータが一覧表示されません。WCFメタデータ操作契約パラメータの公開

私はhttp://localhost:123/CalculatorService.svc?wsdlをやっています。ブラウザにはwsdlが表示されますが、入力パラメータは指定されていません。

私は高くて低く見えました。私はwsdlの生成を有効にする方法の例をたくさん見つけましたが、入力パラメータについて明示的に話すものは何もありません。

WcfTestClientが入力パラメータを取得するため、何とか利用可能であることがわかります。

私のWeb.config & app.Configのセクションです(私はプライバシー目的で名前を変更しました)。

<serviceBehaviors> 
    <behavior name="CalculatorServiceBehavior"> 
     <serviceMetadata httpGetEnabled="true" policyVersion="Policy15" /> 
     <serviceDebug includeExceptionDetailInFaults="true"/> 
    </behavior> 

    <behavior> 
     <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
     <serviceMetadata httpGetEnabled="true" policyVersion="Policy15"/> 
     <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
     <serviceDebug includeExceptionDetailInFaults="true"/> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 

<services> 
    <service 
     name="MyServiceNamespace.CalculatorService" 
     behaviorConfiguration="MyServiceNamespaceBehavior"> 

    <host> 
     <baseAddresses> 
     <add baseAddress="http://localhost:63906/CalculatorService"/> 
     </baseAddresses> 
    </host> 

    <endpoint address="" 
       binding="wsHttpBinding" 
       contract="MyServiceNamespace.CalculatorService" /> 

    <endpoint address="mex" 
       binding="mexHttpBinding" 
       contract="IMetadataExchange" /> 
    </service> 
</services> 

答えて

1

WCFによって生成されるwsdlには名前空間が含まれ、名前空間の一部には、入出力契約を定義するスキーマ文書へのリンクがあります。メソッド引数が記述されています。

関連する問題