java - 使用 C# 调用 Yellowfin 商业智能服务

标签 java c# web-services wsdl business-intelligence

我正在尝试通过我的 C# 代码使用 Yellowfin 服务。它们是用 Java 编写的,所以我 enabed JAX services正如他们推荐的那样。

所以JAX服务are running在“localhost:8083/webservices/LegacyReportService?wsdl”,我无法让它们像 specified 一样工作(我正在运行 ReportService 的 RUNDASHBOARDREPORT 方法)

我就是这样使用的:
对我的本地主机上运行的 YF 服务的 Web 引用:
Web Reference usage screenshot

在这里我调用该服务

    public static reportServiceResponse RunDashboardReport(Int32 reportId, Int32 tabId)
    {
        var rq = CreateYfRequest("RUNDASHBOARDREPORT");
        rq.reportId = reportId;
        rq.dashboardTabId = tabId;
        using (var srv = new LegacyReportServiceService())
        {
            var resp = srv.remoteReportCall(rq); // there is no "remoteAdministrationCall" as in the doc
            return resp;
        }
    }


    private static reportServiceRequest CreateYfRequest(String command)
    {
        var rq = new reportServiceRequest
        {
            loginId = "admin@yellowfin.com.au",
            password = "test",
            orgId = 1,    // This is the primary organization
            reportRequest = command
        };
        return rq;
    }

而我 get “System.Xml.dll 中发生了‘System.InvalidOperationException’类型的异常” 创建时

    new LegacyReportServiceService()

我也尝试将其添加为服务引用,但结果是相同的。

YF 团队表示“我们确实有客户正在使用 .net 和 C# 来开发其集成代码。...支持团队已确认 Yellowfin 目录中的开发文件夹中提供的示例代码WSDL 代码是准确的,无法复制您在原始电子邮件中发现的错误。”


请帮助我找出我做错了什么

最佳答案

我发现 VS 生成了用于从“localhost:8083/webservices/LegacyReportService?xsd=1”访问 Web 服务的类,并且它执行得不正确。它从原始 String 类型生成 String[]。

因此,编辑生成的 Web 引用的 Reference.cs 就可以完成任务。
至少,我收到了错误代码 25“未授权”的响应。

关于java - 使用 C# 调用 Yellowfin 商业智能服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27011899/

相关文章:

java - Tomcat JDBCRealm 身份验证在部署后不起作用

java - 使用字符串和整数的异构列表定义 GSON 类

java - 在java中用null填充ArrayList的最快方法是什么?

c# - 选中时更改 WPF 的 ListBoxItem 背景并且窗口失去焦点

android 如何发送 int 和 double 作为 namevaluepair 作为 http post

java - 如何创建自动监控方式以查看该应用程序是否正在运行

c# - 自定义 BSON 键值序列化器

c# - Nhibernate 不级联删除

java - 将动态 BufferedImage 流式传输到网站

wcf - HttpContext.Current在我的Web服务中为null