Author: mriou
Date: Thu Jun 26 20:07:52 2008
New Revision: 672101
URL: http://svn.apache.org/viewvc?rev=672101&view=rev
Log:
Another little touch to deployed file browsing.
Modified:
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisServlet.java
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java
Modified:
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java?rev=672101&r1=672100&r2=672101&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
(original)
+++
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
Thu Jun 26 20:07:52 2008
@@ -515,6 +515,10 @@
return _mgtService.getProcessMgmt();
}
+ public File getAppRoot() {
+ return _appRoot;
+ }
+
private void registerEventListeners() {
String listenersStr = _odeConfig.getEventListeners();
if (listenersStr != null) {
Modified:
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisServlet.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisServlet.java?rev=672101&r1=672100&r2=672101&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisServlet.java
(original)
+++
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisServlet.java
Thu Jun 26 20:07:52 2008
@@ -23,18 +23,13 @@
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
-import org.apache.axis2.description.AxisService;
import org.apache.axis2.transport.http.AxisServlet;
import org.apache.ode.axis2.ODEServer;
import org.apache.ode.axis2.service.DeploymentBrowser;
-import org.apache.ode.bpel.iapi.ProcessConf;
import java.io.*;
-import java.util.Arrays;
-import java.util.List;
/**
* Overrides standard AxisServlet to handle our service configurations and
@@ -56,7 +51,7 @@
super.init(config);
_odeServer = createODEServer();
_odeServer.init(config, axisConfiguration);
- _browser = new DeploymentBrowser(_odeServer.getProcessStore(),
axisConfiguration);
+ _browser = new DeploymentBrowser(_odeServer.getProcessStore(),
axisConfiguration, _odeServer.getAppRoot());
}
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
Modified:
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java?rev=672101&r1=672100&r2=672101&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java
(original)
+++
ode/branches/APACHE_ODE_1.1/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java
Thu Jun 26 20:07:52 2008
@@ -11,7 +11,6 @@
import javax.servlet.ServletException;
import java.io.*;
import java.util.List;
-import java.util.Arrays;
/**
* handles a set of URLs all starting with /deployment to publish all files in
@@ -21,10 +20,12 @@
private ProcessStoreImpl _store;
private AxisConfiguration _config;
+ private File _appRoot;
- public DeploymentBrowser(ProcessStoreImpl _store, AxisConfiguration
_config) {
- this._store = _store;
- this._config = _config;
+ public DeploymentBrowser(ProcessStoreImpl store, AxisConfiguration config,
File appRoot) {
+ _store = store;
+ _config = config;
+ _appRoot = appRoot;
}
// A fake filter, directly called from the ODEAxisServlet
@@ -55,10 +56,15 @@
} else {
final String serviceName =
requestURI.substring(deplUri + 12 + 9);
final AxisService axisService =
_config.getService(serviceName);
- if (axisService != null && axisService.getFileName()
!= null) {
+ if (axisService != null) {
renderXml(response, new DocBody() {
public void render(Writer out) throws
IOException {
- write(out,
axisService.getFileName().getFile());
+ if
("InstanceManagement".equals(serviceName) ||
"ProcessManagement".equals(serviceName))
+ write(out, new File(_appRoot,
"pmapi.wsdl").getPath());
+ else if
("DeploymentService".equals(serviceName))
+ write(out, new File(_appRoot,
"deploy.wsdl").getPath());
+ else
+ write(out,
axisService.getFileName().getFile());
}
});
} else {