Hi
I am running a LiveReport through the webserivces (16.2.12) using java. I get a ReportResult with the number of rows as expected. However, when I try to access the actual cell values using the casting mechanism (as has been working previously and is described in this post here), none of the casting does work. The SOAP response message does contain the information, see below, but with the cast not working it's not possible to access the values.
So, here's the code aligned to the above post to run the LiveReport:
________________________________________________
public void run(Long uid) throws Exception {
ReportResult result = openTextConnector.getDocumentManager().runReport(uid, null);
List<RowValue> rows = result.getContents();
for (RowValue row : rows) {
List<DataValue> data = row.getValues();
for (DataValue d : data) {
Object objVal = getDataValue(d);
System.out.println(d.getKey() + " = " + objVal.toString());
}
}
}
private static Object getDataValue(DataValue d) {
Object retVal = null;
if (d instanceof IntegerValue) {
IntegerValue ival = (IntegerValue) d;
if (ival.getValues().size() > 0)
retVal = ival.getValues().get(0);
} else if (d instanceof DateValue) {
DateValue dateVal = (DateValue) d;
if (dateVal.getValues().size() > 0)
retVal = dateVal.getValues().get(0);
} else if (d instanceof StringValue) {
StringValue strVal = (StringValue) d;
if (strVal.getValues().size() > 0)
retVal = strVal.getValues().get(0);
} else if (d instanceof RealValue) {
RealValue strVal = (RealValue) d;
if (strVal.getValues().size() > 0)
retVal = strVal.getValues().get(0);
} else if (d instanceof BooleanValue) {
BooleanValue strVal = (BooleanValue) d;
if (strVal.getValues().size() > 0)
retVal = strVal.getValues().get(0);
}
if (retVal == null)
retVal = new String();
return retVal;
}
______________________________________
The Output is:
DATAID =
DATAID =
Compared to the web UI:
And here's the actual SOAP message which does contain the values I'm looking for, marked as IntegerValue:
<?xml version='1.0' encoding='UTF-8'?>
<s:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="urn:api.ecm.opentext.com" xmlns:h="urn:api.ecm.opentext.com" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<h:OTAuthentication xmlns:h="urn:api.ecm.opentext.com">
<AuthenticationToken>****</AuthenticationToken>
</h:OTAuthentication>
</s:Header>
<s:Body xmlns="urn:DocMan.service.livelink.opentext.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunReportResponse xmlns="urn:DocMan.service.livelink.opentext.com">
<RunReportResult>
<Contents xmlns="urn:Core.service.livelink.opentext.com">
<Description xmlns="urn:Core.service.livelink.opentext.com"/>
<Key>1</Key>
<Values xsi:type="IntegerValue">
<Description>DATAID</Description>
<Key>DATAID</Key>
<Values>24244513</Values>
</Values>
</Contents>
<Contents xmlns="urn:Core.service.livelink.opentext.com">
<Description xmlns="urn:Core.service.livelink.opentext.com"/>
<Key>2</Key>
<Values xsi:type="IntegerValue">
<Description>DATAID</Description>
<Key>DATAID</Key>
<Values>24244437</Values>
</Values>
</Contents>
<IsLimit>true</IsLimit>
<SubReportID xsi:nil="true"/>
<Title>Test</Title>
</RunReportResult>
</RunReportResponse>
</s:Body>
</s:Envelope>
Maybe https://forums.opentext.com/forums/developer/discussion/295669/while-invoking-the-livereport-using-cws-there-is-no-output is the same issue?