Jaysvcutil generates no classes

橙三吉。 提交于 2019-12-23 02:16:14

问题


I run:

JaySvcUtil.exe --metadataUri http://localhost:1578/Service.svc/$metadata --out Model.js -- namespace Model --v V2

the output is:

Requesting: http://localhost:1578/Service.svc/$metadata... done.
OData version: V2

And the result file:

(function(global, $data, undefined) {

})(window, $data);

回答1:


There are several edm-namespaces for various OData versions. I'd first try to avoid the --v switch and let JaySvcUtil.exe trying to determine the correct one.

If that doesn't work check the supported version of name-spaces at 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" }
  };

If the one that is produced by localhost:1578/Service.svc/$metadata is not in there add an request at https://github.com/jaydata/JaySvcUtil/issues



来源:https://stackoverflow.com/questions/13495200/jaysvcutil-generates-no-classes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!