Skip to content

Commit

Permalink
MONDRIAN:
Browse files Browse the repository at this point in the history
* Use File#toURL() to generate URL in XML/A tests.

[git-p4: depot-paths = "//open/mondrian/": change = 6236]
  • Loading branch information
goncha committed Apr 14, 2006
1 parent 8f65d42 commit 3bf327f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/main/mondrian/tui/XmlaSupport.java
Expand Up @@ -593,10 +593,6 @@ public static byte[] processSoapXmla(String requestText,
out.write(dataSourceText.getBytes());
out.flush();

// Generate URL
String dsFilePath = dsFile.getAbsolutePath();
String dsUrl = "file://" + dsFilePath;

byte[] reqBytes = requestText.getBytes();
// make request
MockHttpServletRequest req = new MockHttpServletRequest(reqBytes);
Expand All @@ -615,7 +611,7 @@ public static byte[] processSoapXmla(String requestText,
servletConfig.addInitParameter(
XmlaServlet.PARAM_CHAR_ENCODING, "UTF-8");
servletConfig.addInitParameter(
XmlaServlet.PARAM_DATASOURCES_CONFIG, dsUrl);
XmlaServlet.PARAM_DATASOURCES_CONFIG, dsFile.toURL().toString());

Servlet servlet = new DefaultXmlaServlet();
servlet.init(servletConfig);
Expand Down Expand Up @@ -649,19 +645,14 @@ public static Servlet makeServlet(String connectString, String cbClassName)
out.write(dataSourceText.getBytes());
out.flush();

// Generate URL
String dsFilePath = dsFile.getAbsolutePath();
String dsUrl = "file://" + dsFilePath;


// process
MockServletContext servletContext = new MockServletContext();
MockServletConfig servletConfig = new MockServletConfig(servletContext);
servletConfig.addInitParameter(XmlaServlet.PARAM_CALLBACKS, cbClassName);
servletConfig.addInitParameter(
XmlaServlet.PARAM_CHAR_ENCODING, "UTF-8");
servletConfig.addInitParameter(
XmlaServlet.PARAM_DATASOURCES_CONFIG, dsUrl);
XmlaServlet.PARAM_DATASOURCES_CONFIG, dsFile.toURL().toString());

Servlet servlet = new DefaultXmlaServlet();
servlet.init(servletConfig);
Expand Down

0 comments on commit 3bf327f

Please sign in to comment.