Hi,
Thanks for the answer. However, I don't quite understand how I can get
the MessageContext. I am not calling any service.
Let me clarify a bit:
say the axis2.war is already running and has its own
ConfigurationContext. So I can deploy modules/services to it.
Now I am writing a test case to deploy my module and my service (calling
ConfigurationContext.getAxisConfiguration().addModule/addService not
using .mar nor .aar). But I am not able to deploy them in the
ConfigurationContext that axis2.war is using, i.e. even when I am using
the same axis2.xml and path to the repository. This is because I create
(I suppose) a new instance of ConfigurationContext.
So how can I simply call
ConfigurationContext.getAxisConfiguration().addService(myService)
and see my service with the admin utilities provided in axis2.war.
There should be a solution, I suppose. But where?
Zeppe
Brecht Yperman wrote:
You can get the ConfigurationContext using a method like this:
private File getServiceDir() {
if (f_serviceDir == null) {
MessageContext mc =
MessageContext.getCurrentMessageContext();
try {
ConfigurationContext cc =
mc.getConfigurationContext();
File repoDir = new
File(cc.getAxisConfiguration().getRepository()
.getFile());
f_serviceDir = new File(repoDir, "services");
if (!f_serviceDir.exists()) {
f_serviceDir.mkdirs();
}
} catch (Exception ex) {
error("Getting services path", ex);
}
}
return f_serviceDir;
}
-----Original Message-----
From: Brecht Yperman [mailto:[EMAIL PROTECTED]
Sent: dinsdag 6 februari 2007 13:41
To: axis-user@ws.apache.org; [EMAIL PROTECTED]
Subject: RE: [Axis2] Using axis2.war repository remotely from another
application
Hi,
I've done this creating a webservice which mimicks behaviour from the
AxisAdminServlet (AdminAgent.processUpload).
Basically it's a webservice that takes user credentials (to prevent
anyone from deploying webservices), a base64 encoded webservice jar and
a filename, and writes the bytes from the jar to the repository using
the filename.
Best regards,
Brecht
-----Original Message-----
From: Evaldas Taroza [mailto:[EMAIL PROTECTED]
Sent: dinsdag 6 februari 2007 13:23
To: axis-user@ws.apache.org
Subject: [Axis2] Using axis2.war repository remotely from another
application
Hi,
I want to programmatically deploy modules/services to the axis2
repository configured in axis2.war. This way I want to be able to admin
the services I deploy from my application using axis2.war administration
page.
As far as I understand I need to somehow get the instance of
ConfigurationContext that axis2.war is using. How to do it? Or am I
totally wrong?
Thanks,
Zeppe
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]