SOAP generateReport not working in TS 4.0

Discuss problems installing or using TrackStudio.

SOAP generateReport not working in TS 4.0

Postby Simon H » Tue Mar 29, 2011 3:56 pm

We generate a report via the SOAP interface in TS 3.5, but it is not returning any useful data in TS 4.0. We have got the SOAP interface working in TS 4.0 where we can authenticate and create messages. We can also interrogate the list of reports to find the required ReportID. The code we use to run the report is:

Code: Select all
// Run report now we have the ID
  Result := FReportInterface.generateReport(FPostTrackStudio.SessionID
   , LReportID
   , '1'   // Task 1 which is base project.  Report will run for all projects
   , false
   , 'CSV'  // Format returned
   , ','    // CSV deliminator
   , false
   , 'UTF-8'  // One byte per char for our data
   , nil);  // Standard filter parameters


The SOAP call runs without error, but data returned is an array of 10 bytes with every byte has a value of decimal 10. The same data is returned whichever report is run.

Please help!
Simon H
 
Posts: 28
Joined: Mon Aug 13, 2007 12:23 pm

Re: SOAP generateReport not working in TS 4.0

Postby admin » Tue Mar 29, 2011 8:30 pm

ok, we'll check this.
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 7454
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia

Re: SOAP generateReport not working in TS 4.0

Postby admin » Wed Mar 30, 2011 10:52 am

In Java, all works for us

Code: Select all
package test;

import com.trackstudio.soap.service.report.Report;
import com.trackstudio.soap.service.report.ReportDataBean;
import com.trackstudio.soap.service.report.ReportService;
import com.trackstudio.soap.service.user.User;
import com.trackstudio.soap.service.user.UserService;

import javax.xml.namespace.QName;
import java.net.URL;

public class Client {
    public static void main(String[] args) {
        String url = "http://localhost:8080/services/";
        System.out.println("START");
        try {
            UserService service = new UserService(new URL(url + User.class.getSimpleName() + "?wsdl"), new QName("http://user.service.soap.trackstudio.com/", "UserService"));
            User user = service.getUserPort();
            String sessionId = user.authenticate("root", "root");
            System.out.println("Autorization successfully! " + buildReport(url, sessionId));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static String buildReport(String url, String sessionId) throws Exception {
        ReportService service = new ReportService(new URL(url + Report.class.getSimpleName() + "?wsdl"), new QName("http://report.service.soap.trackstudio.com/", "ReportService"));
        Report report = service.getReportPort();
        String reportID = "ff8080812f059fe8012f05ad46380002", taskId = "1";
        ReportDataBean bean = report.generateReport(sessionId, reportID, taskId, false, "csv", ";", false, "windows-1251", null);
        return new String(bean.getData());
    }
}
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 7454
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia

Re: SOAP generateReport not working in TS 4.0

Postby Simon H » Thu May 19, 2011 9:33 am

As we are now using SQL Server we are creating reports by querying the database directly rather than using the SOAP interface, so this is no longer an issue for us.
Simon H
 
Posts: 28
Joined: Mon Aug 13, 2007 12:23 pm


Return to TrackStudio Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron