You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Aaron Evans <aa...@yahoo.ca> on 2006/02/02 22:55:29 UTC
Re: [axis2]module.xml not found for the module
Ruchith Fernando <ruchith.fernando <at> gmail.com> writes:
>
> Hi,
>
> This is because addressing.mar cannot be found and this is a known
> issue with the 0.94 release.
> Solution From: http://ws.apache.org/axis2/download.cgi
I had solved this problem when running stand-alone (client stub) by re-naming
addressing.mar to axis-addressing-module.jar and putting in my classpath.
It works great until I deploy my WS client code as part of a servlet app in
tomcat and all of a sudden it doesn't work and i get the error above.
I looked at some of the code in the DeploymentEngine and it seems as though
the class loaders are getting mucked around with and perhaps that is the
problem.
I am really at a loss here because it wouldn't be my home directory but
rather tomcat's. I am running tomcat 5.5 on windows, so who knows where
the "home directory" will be...
Re: [axis2]module.xml not found for the module
Posted by Aaron Evans <aa...@yahoo.ca>.
Aaron Evans <aaronmevans <at> yahoo.ca> writes:
>
> I had solved this problem when running stand-alone (client stub) by re-naming
> addressing.mar to axis-addressing-module.jar and putting in my classpath.
>
> It works great until I deploy my WS client code as part of a servlet app in
> tomcat and all of a sudden it doesn't work and i get the error above.
>
> I looked at some of the code in the DeploymentEngine and it seems as though
> the class loaders are getting mucked around with and perhaps that is the
> problem.
>
> I am really at a loss here because it wouldn't be my home directory but
> rather tomcat's. I am running tomcat 5.5 on windows, so who knows where
> the "home directory" will be...
>
>
Ok, so I bit the bullet and created a configurable "axis home" in my web app.
You can then use any location on your file system as axis home. For example,
create a directory called axis-home in /tmp. Then your axis home path is
/tmp/axis-home.
Put the modules directory in there and addressing.mar in the modules directory.
Then, make a constructor like this for your client:
public WSClientStub(String targetEndpoint, String axisHome) throws
java.lang.Exception
{
this(new
org.apache.axis2.context.ConfigurationContextFactory().
createConfigurationContextFromFileSystem(axisHome),
targetEndpoint);
}
And pass in your ws endpoint and axis home to construct an instance of the
client.
I hope this helps someone else. But I think it is somewhat rediculous
to have to have external file resources etc for simply using the client API!
BTW, windows STILL won't let me delete the .axis2 directory in my home
directory. I get "Access Denied" not matter what. I have tried everything.
At some point, I will create a boot cd to boot my laptop into dos and delete
it that way I guess...
aaron