if (fault != null)
{
handleResultFault(fault);
}
Name eName = soapEnvelope.createName("ExecuteResponse", "", XMLA_URI);
// Get the ExecuteResponse-Node
Iterator responseElements = soapBody.getChildElements(eName);
if (responseElements.hasNext())
{
Object eObj = responseElements.next();
if (eObj == null)
{
throw new JRRuntimeException("ExecuteResponse Element is null.");
}
eElement = (SOAPElement) eObj;
}
else
{
throw new JRRuntimeException("Could not retrieve ExecuteResponse Element.");
}
// Get the return-Node
Name rName = soapEnvelope.createName("return", "", XMLA_URI);
Iterator returnElements = eElement.getChildElements(rName);
SOAPElement returnElement = null;
if (returnElements.hasNext())
{
Object eObj = returnElements.next();
if (eObj == null)
{
throw new JRRuntimeException("return Element is null.");
}
returnElement = (SOAPElement) eObj;
}
else
{
// Should be old-Microsoft XMLA-SDK. Try without m-prefix
Name rName2 = soapEnvelope.createName("return", "", "");
returnElements = eElement.getChildElements(rName2);
if (returnElements.hasNext())
{
Object eObj = returnElements.next();
if (eObj == null)
{
throw new JRRuntimeException("return Element is null.");
}
returnElement = (SOAPElement) eObj;
}
else
{
throw new JRRuntimeException("Could not retrieve return Element.");
}
}
// Get the root-Node
Name rootName = soapEnvelope.createName("root", "", MDD_URI);
SOAPElement rootElement = null;
Iterator rootElements = returnElement.getChildElements(rootName);
if (rootElements.hasNext())
{
Object eObj = rootElements.next();
if (eObj == null)
{
throw new JRRuntimeException("root Element is null.");
}
rootElement = (SOAPElement) eObj;
}
else
{
throw new JRRuntimeException("Could not retrieve root Element.");
}
// Get the OlapInfo-Node
Name olapInfoName = soapEnvelope.createName("OlapInfo", "", MDD_URI);
SOAPElement olapInfoElement = null;
Iterator olapInfoElements = rootElement.getChildElements(olapInfoName);
if (olapInfoElements.hasNext())
{
Object eObj = olapInfoElements.next();
if (eObj == null)
{
throw new JRRuntimeException("OlapInfo Element is null.");
}
olapInfoElement = (SOAPElement) eObj;
}
else
{
throw new JRRuntimeException("Could not retrieve OlapInfo Element.");
}
parseOLAPInfoElement(olapInfoElement);
// Get the Axes Element
Name axesName = soapEnvelope.createName("Axes", "", MDD_URI);
SOAPElement axesElement = null;
Iterator axesElements = rootElement.getChildElements(axesName);
if (axesElements.hasNext())
{
Object eObj = axesElements.next();
if (eObj == null)
{
throw new JRRuntimeException("Axes Element is null");
}
axesElement = (SOAPElement) eObj;
}
else
{
throw new JRRuntimeException("Could not retrieve Axes Element.");
}
parseAxesElement(axesElement);
// Get the CellData Element
Name cellDataName = soapEnvelope.createName("CellData", "", MDD_URI);
SOAPElement cellDataElement = null;
Iterator cellDataElements = rootElement.getChildElements(cellDataName);
if (cellDataElements.hasNext())
{
Object eObj = cellDataElements.next();