cognos API 和示例
谁能向我指出 cognos API 文档和一些示例代码? 对我来说最好的是 API 可以通过 python 访问。 但其他语言的例子也很好。
Can anyone point me to a cognos API document and some example code? The best for me is that the API can be access thru python. But examples in other languages are good also.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Cognos SDK for .net 很糟糕; 我知道,因为我只花了 3 天多的时间尝试让基本功能正常工作。 很明显,开发示例应用程序的人不知道如何使用 Web 服务或 .net。
我设法找到了一个 Cognos.WSDL 文件,您可以尝试使用它来生成您自己的代理类; 但; 它与 WS-I 不兼容,因此无法与 wsdl.exe 一起使用
cognosdotnet.dll 和 cognosdotnet assembly 过于臃肿。 其中定义了近 1000 个类。 他们基本上将整个 API 集封装到一个程序集中。
Cognosdotnet.dll 定义了所有类型; 其中许多都令人困惑; 但您需要的所有原材料都在那里。
Cognosdotnet assembly.dll 定义序列化程序。 为什么他们甚至包括它们超出了我的范围。 该文件很大(46MB)并且提供的价值为零。 问题在于该程序集与类型定义 (cognosdotnet.dll) 存在依赖性。
我最终做的是服用Reflector; 以及生成 cognosdotnet.dll 的代码; 然后删除了对序列化器的依赖。 然后,我围绕它创建了自己的包装器,以使 API 更加友好。
我建议从 reportrunner 示例开始; 至少尝试让你的连接正常工作等等。
The Cognos SDK for .net is horrible; I know because I just spent 3+ days trying to get even basic functionality working. Its clear that the person who developed the sample applications has no idea how to work with Web Services or .net.
I managed to find a Cognos.WSDL file that you can try to use to generate your own proxy classes; but; its not WS-I compatible and thus won't work with wsdl.exe
The cognosdotnet.dll and cognosdotnetassembly's are overbloated. There are nearly 1000 classes defined in there. They basically wrapped up their entire API set into a single assembly.
Cognosdotnet.dll defines all the types; and many of them are confusing to work with; but all the raw materials you need are there.
Cognosdotnetassembly.dll defines the serializers. Why they even include them is beyond me. This file is huge (46MB) and provides zero value. The problem is that there is a dependency on this assembly with the type definitions (cognosdotnet.dll).
What I ended up doing was taking Refelector; and code generating the cognosdotnet.dll; then removed the dependency on the serializers. I then created my own wrappers around it to make the API more friendly.
I would recomend starting with the reportrunner example as a starting point; to at least try and get your connectivity working etc..
您尚未表明您正在寻求哪个版本的 Cognos 帮助,但如果是针对 Cognos 8,并且您拥有 Cognos 8 SDK,则应该拥有完整的 API 文档和示例代码。
SDK 示例主要以 Java 形式提供,但也有一些是 .NET 形式的。
SDK 开发人员指南(同样是 Cognos 8)应该包含足够的信息来帮助您开始将自己的库组合在一起。
You haven't indicated which version of Cognos you're seeking assistance for, but if it's for Cognos 8, you should have the full API docs and sample code if you have the Cognos 8 SDK.
The SDK samples are provided mostly in Java, though some are .NET.
The SDK Developer Guide (again, Cognos 8) should contain enough information to help you get started on putting your own library together.