Skip to content

Commit

Permalink
Fix for SAP BW. Some SAP servers seem to omit the SOAP header from th…
Browse files Browse the repository at this point in the history
…eir responses. Adds a check for null.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@522 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Mar 8, 2012
1 parent 57abe2c commit 60b247d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/org/olap4j/driver/xmla/XmlaOlap4jConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -906,15 +906,17 @@ Element executeMetadataRequest(String request) throws OlapException {
+ "Request was:\n"
+ request);
}
Element session =
findChild(header, XMLA_NS, "Session");
if (session != null) {
String sessionId =
session.getAttribute("SessionId");
if ("".equals(sessionId)) {
sessionId = null;
if (header != null) {
Element session =
findChild(header, XMLA_NS, "Session");
if (session != null) {
String sessionId =
session.getAttribute("SessionId");
if ("".equals(sessionId)) {
sessionId = null;
}
serverInfos.setSessionId(sessionId);
}
serverInfos.setSessionId(sessionId);
}
Element discoverResponse =
findChild(body, XMLA_NS, "DiscoverResponse");
Expand Down

0 comments on commit 60b247d

Please sign in to comment.