The problem was the following error upon invocation of the web service:
The session identifier is missing. A session identifier is required for this operation.
After searching the MSDN forums I found this thread that shed some light on my problem. Here is the summarized version:
- After creating the stub code using java's wsimport function, edit the ExecutionHeader.java class by adding the following annotation line above the class definition:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExecutionHeader", propOrder = {
"executionID"
})
@XmlRootElement(name="ExecutionHeader")
public class ExecutionHeader {... - Invoking the web service to return a report is then a simple matter of adding the following method to your client class:
public Report runReport(Listparms, String reportPath, ReportFormat format) { ArrayOfParameterValue parameters = new ArrayOfParameterValue();
for (ParameterValue value : parms) {
parameters.getParameterValue().add(value);
}
String devInfo = ""; False
Holderresult = new Holder ();
String reportFormat = format.toString();
Holderextension = new Holder ();
HoldermimeType = new Holder ();
Holderencoding = new Holder ();
Holderwarnings = new Holder ();
HolderstreamIDs = new Holder ();
try {
ExecutionInfo execInfo = rs.loadReport(reportPath, null);
String executionID = execInfo.getExecutionID();
ExecutionHeader header = new ExecutionHeader();
header.setExecutionID(executionID);
WSBindingProvider provider = (WSBindingProvider) rs;
provider.setOutboundHeaders(header);
rs.setExecutionParameters(parameters, "en-us");
rs.render(reportFormat, devInfo, result, extension, mimeType, encoding, warnings, streamIDs);
}
catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("Error running report", e);
}
return new Report(format, result.value);
}
Take note of the highlighted lines of code, the Execution header needs to be set onto the WSBindingProvider in order to prevent the Session Identifier error when calling the render method.
I hope this summary helps someone getting past this problem quickly!