我跑:
JaySvcUtil.exe --metadataUri http://localhost:1578/Service.svc/$metadata --out Model.js -- namespace Model --v V2
输出是:
Requesting: http://localhost:1578/Service.svc/$metadata... done.
OData version: V2
结果文件:
(function(global, $data, undefined) {
})(window, $data);
答案 0 :(得分:3)
各种OData版本有几个edm命名空间。我首先尝试避免使用-v开关,让JaySvcUtil.exe尝试确定正确的。
如果不起作用,请在https://github.com/jaydata/JaySvcUtil/blob/master/Program.cs
检查支持的名称空间版本public static Dictionary<string, string> NamespaceVersions = new Dictionary<string,string>
{
{"http://schemas.microsoft.com/ado/2007/05/edm", "V11" },
{"http://schemas.microsoft.com/ado/2006/04/edm", "V1" },
{"http://schemas.microsoft.com/ado/2008/09/edm", "V2" },
{"http://schemas.microsoft.com/ado/2009/08/edm", "V21" },
{"http://schemas.microsoft.com/ado/2009/11/edm", "V3" }
};
如果localhost:1578 / Service.svc / $ metadata产生的那个不在那里,请在https://github.com/jaydata/JaySvcUtil/issues
添加请求