承認のために Oauth トークンを必要とする OData svc があります。メタデータの URL はこちらから入手できます。
でも、
let MySvc = ODataService<"https://wamsstageclus001rest-hs.cloudapp-int.net/API/$metadata?api-version=1.0">
エラーを返しますreading schema, 404
。
私は何が欠けていますか?API の使用方法を教えてください。
There's a bug in the FSharp.Data.TypeProviders.dll that ships with VS2012 regarding how to append $metadata
to the URL.
Fortunately, type providers are 'just another library' needed at design-time, so to address this bug (and some other type provider issues), our current plans are to release an updated type provider library out-of-band. Historically with VS2010 the F# team has done open-source release updates of the F# compiler/library sources and powerpack a month or two after VS ships, and so if one assumes the same for VS2012, this would likely be a possible time for us to publish some updates to type providers. (I can't give any more release schedule information at this time.)
それが正しいURLであると確信していますか。通常、サービスのURLを指定すると、サービスプロバイダーが独自にメタデータを検索します。ただし、コードはメタデータのURLを提供しています。
このため、タイププロバイダーは、URLを利用するためにURLに追加情報を追加している可能性があり、サービスはこれらの複合URLをどう処理するかを認識していません。
編集:どうやら誰かが私がはっきりしていないと感じました。
https://wamsstageclus001rest-hs.cloudapp-int.net/API/$metadata?api-version=1.0
ODataAdapterがメタデータ情報を取得しようとすると、
https://wamsstageclus001rest-hs.cloudapp-int.net/API/$metadata?api-version=1.0$metadata
または同様のもの。その特定のサイトを閲覧すると、404エラーが表示されます。
ただし、ODataAdapterを指定した場合
https://wamsstageclus001rest-hs.cloudapp-int.net/API/
次に、メタデータを追加しても404エラーは発生しません。文字列操作の代わりにURLクラスを使用しているので(またはそう願っています)、バージョン情報を残すことができるはずです。これは次のようになります。
https://wamsstageclus001rest-hs.cloudapp-int.net/API/?api-version=1.0