Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java应用中的ssrsweb服务_Java_Web Services_Authentication_Reporting Services - Fatal编程技术网

java应用中的ssrsweb服务

java应用中的ssrsweb服务,java,web-services,authentication,reporting-services,Java,Web Services,Authentication,Reporting Services,我是SSRSWeb服务的新手 我在wsdl2java的帮助下使用wsdl获得了存根。并将其打包到jar文件中到我的java项目中 我的兴趣是使用web服务获取报表服务器中的文件夹列表。类似地,报告列表。并为用户呈现报告 我知道我可以使用SSRS web服务通过方法ReportService2005.listchildren()(C#代码来自MSN站点)从报告中获取文件夹列表 我可以通过url访问或web服务显示报告 我真的不知道这是怎么实现的。我真的寻求帮助与任何链接指向教程或任何其他 我已准备

我是SSRSWeb服务的新手

我在wsdl2java的帮助下使用wsdl获得了存根。并将其打包到jar文件中到我的java项目中

我的兴趣是使用web服务获取报表服务器中的文件夹列表。类似地,报告列表。并为用户呈现报告

我知道我可以使用SSRS web服务通过方法
ReportService2005.listchildren()
(C#代码来自MSN站点)从报告中获取文件夹列表

我可以通过url访问或web服务显示报告

我真的不知道这是怎么实现的。我真的寻求帮助与任何链接指向教程或任何其他

我已准备好探索和学习,而不是示例代码。但是任何示例代码都会加快我的学习过程

Kinldy评论并提供建议和意见

以下是解决方案:

  • 不要使用wsdl2java,而是使用wsimport工具导入wsdl,该工具从1.6版开始在JDK中提供:

    wsimport.exe http://<yourserver>/reportserver/reportService2005.asmx?wsdl -s <path to save package> -extension
    
  • 希望能有帮助

    致以最良好的祝愿,
    Alexey

    非常感谢您对详细代码的回复。我用生成的类创建了jar文件。使用wsdls.Hi,您的jar是否包含ReportingService2005和ReportingService2005Soap类?当我试图用wsdl2java生成存根时,它没有生成这两个存根,但它们是连接到web服务所必需的。Wsimport.exe可以完美地生成它们。您可以在JDKxxx\bin文件夹中找到wsimport。
    package testSSRS;
    
    import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.ArrayOfCatalogItem;
    import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.CatalogItem;
    import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.ReportingService2005;
    import com.microsoft.schemas.sqlserver._2005._06._30.reporting.reportingservices.ReportingService2005Soap;
    
    public class mainClass {
    
        public static void main(String[] args) {
    
            ReportingService2005 srv = new ReportingService2005();
            ReportingService2005Soap srvs = srv.getReportingService2005Soap();
    
            ArrayOfCatalogItem arr = srvs.listChildren("/", true);
    
            for (CatalogItem ci : arr.getCatalogItem())
            {
                System.out.println(ci.getPath() + "/" + ci.getName());
            }
        }
    
    }