Hello,
I am trying to retrieve instance variables using the Management API.
Unfortunately the result of getVariableInfo() is always null.
Here's some code:
InstanceManagementPortType client = new
InstanceManagement().getPort(InstanceManagementPortType.class);
TInstanceInfo instanceInfo = client.getInstanceInfo(701);
TScopeRef scope = instanceInfo.getRootScope();
TScopeInfo rootScope = client.getScopeInfo(Long.parseLong(scope.getSiid()));
Variables variables = rootScope.getVariables();
for (TVariableRef var : variables.getVariableRef()) {
TVariableInfo out = client.getVariableInfo(var.getSiid(),
var.getName());
if (out != null) {
System.out.println(var.getName() + ": " +
out.getValue());
}
}
Here's an example of what's going through the wire:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<axis2ns1431:getVariableInfoResponse
xmlns:axis2ns1431="http://www.apache.org/ode/pmapi">
<variable-info>
<ns:self
xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/"
siid="751" iid="701" name="startProcessOut" />
<ns:value
xmlns:ns="http://www.apache.org/ode/pmapi/types/2006/08/02/">
<message>
<payload>
<startProcessResponseMessage
xmlns="http://decidr.de/DefaultTenant/processes/306" />
</payload>
</message>
</ns:value>
</variable-info>
</axis2ns1431:getVariableInfoResponse>
</soapenv:Body>
</soapenv:Envelope>
I have excluded the container, JAX-WS and connection issues from the list of
possible causes.
Could the responsible developer please open a bug report? I can provide a unit
test if needed.
Regards,
Daniel