java应用中的ssrsweb服务
我是SSRSWeb服务的新手 我在wsdl2java的帮助下使用wsdl获得了存根。并将其打包到jar文件中到我的java项目中 我的兴趣是使用web服务获取报表服务器中的文件夹列表。类似地,报告列表。并为用户呈现报告 我知道我可以使用SSRS web服务通过方法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服务显示报告 我真的不知道这是怎么实现的。我真的寻求帮助与任何链接指向教程或任何其他 我已准备
ReportService2005.listchildren()
(C#代码来自MSN站点)从报告中获取文件夹列表
我可以通过url访问或web服务显示报告
我真的不知道这是怎么实现的。我真的寻求帮助与任何链接指向教程或任何其他
我已准备好探索和学习,而不是示例代码。但是任何示例代码都会加快我的学习过程
Kinldy评论并提供建议和意见以下是解决方案:
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());
}
}
}