I had some problems connecting to Jasper server using SOAP web services and the standard library System.Web.Services.dll.
The solution uses basic connectivity, the runReport() method and Microsoft.Web.Services2.dll from “Web Services Enhancements 2.0 for Microsoft .NET Framework”. You can download the library here.
You need path to reference it Visual Studio:
C:\Program Files (x86)\Microsoft WSE\v2.0\Microsoft.Web.Services2.dll
Whole needed source is available here.
var jasperService = new JasperService("http://localhost:8088/jasperserver/services/repository");
var credentials = new NetworkCredential("perspectiv", "perspectiv");
jasperService.Credentials = credentials;
string requestXML = "[.....]";
jasperService.runReport(requestXML);
var attachments = jasperService.ResponseSoapContext.Attachments;
if (attachments.Count > 0)
{
var atach = attachments[0];
var atachStream = atach.Stream;
using (var fileStream = File.Create("C:\\test\\test.pdf"))
{
atachStream.CopyTo(fileStream);
}
}