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 Kanchana Welagedara <ka...@gmail.com> on 2011/01/21 03:23:26 UTC

[Axis2]How to create a mar file out of classes in AXIS 2

hi Folks

I'm creating a Axis java 2 handler .I want to know how to generate the mar
file. I have module.xml written ,src, edited axis2.xml to include the module
name.

Also i want to store a token in a xml/Data base  for reach requests coming
from each client to identify which requets came from which client.Passing a
token from a client in the request with EPR is not always possible since my
all web services are not stateful

Could any one help me in this please?

Thanks
Kanchana

Re: [Axis2]How to create a mar file out of classes in AXIS 2

Posted by Kanchana Welagedara <ka...@gmail.com>.
Hi Deepal

Thanks for your reply
On Fri, Jan 21, 2011 at 8:51 AM, Deepal Jayasinghe <de...@opensource.lk>wrote:

>
> > hi Folks
> >
> > I'm creating a Axis java 2 handler .I want to know how to generate the
> > mar file. I have module.xml written ,src, edited axis2.xml to include
> > the module name.
> Please refer to the documentation, and also there are a number of
> articles explaining the process.
> >
> > Also i want to store a token in a xml/Data base  for reach requests
> > coming from each client to identify which requets came from which
> > client.Passing a token from a client in the request with EPR is not
> > always possible since my all web services are not stateful
> >
> > Could any one help me in this please?
> >
> Each message has a message ID, and from the message context you can get
> the request URL, so combining the two you can identify which request
> came from which client.
>

Imaging a situation which I need this data to be used when services/client
are not runing.If I want to use past data of request and response which
client call which WS how do i store data? from handler in to a XML?or any
other?
Really appreciate you input

>
> Deepal
> > Thanks
> > Kanchana
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: [Axis2]How to create a mar file out of classes in AXIS 2

Posted by Kanchana Welagedara <ka...@gmail.com>.
Hi Deepal

Thanks for your reply
On Fri, Jan 21, 2011 at 8:51 AM, Deepal Jayasinghe <de...@opensource.lk>wrote:

>
> > hi Folks
> >
> > I'm creating a Axis java 2 handler .I want to know how to generate the
> > mar file. I have module.xml written ,src, edited axis2.xml to include
> > the module name.
> Please refer to the documentation, and also there are a number of
> articles explaining the process.
> >
> > Also i want to store a token in a xml/Data base  for reach requests
> > coming from each client to identify which requets came from which
> > client.Passing a token from a client in the request with EPR is not
> > always possible since my all web services are not stateful
> >
> > Could any one help me in this please?
> >
> Each message has a message ID, and from the message context you can get
> the request URL, so combining the two you can identify which request
> came from which client.
>

Imaging a situation which I need this data to be used when services/client
are not runing.If I want to use past data of request and response which
client call which WS how do i store data? from handler in to a XML?or any
other?
Really appreciate you input

>
> Deepal
> > Thanks
> > Kanchana
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: [Axis2]How to create a mar file out of classes in AXIS 2

Posted by Deepal Jayasinghe <de...@opensource.lk>.
> hi Folks
>  
> I'm creating a Axis java 2 handler .I want to know how to generate the
> mar file. I have module.xml written ,src, edited axis2.xml to include
> the module name.
Please refer to the documentation, and also there are a number of
articles explaining the process.
>  
> Also i want to store a token in a xml/Data base  for reach requests
> coming from each client to identify which requets came from which
> client.Passing a token from a client in the request with EPR is not
> always possible since my all web services are not stateful
>  
> Could any one help me in this please?
>  
Each message has a message ID, and from the message context you can get
the request URL, so combining the two you can identify which request
came from which client.

Deepal
> Thanks
> Kanchana

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


AW: [Axis2]How to create a mar file out of classes in AXIS 2

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Would logging help to fix your second issue starting with "Also I want
to store a token ..."?

 

I can imagine that each service/method can setup a log4j logger/appender
and send all logging events as they occur to a common log file or
database including the time stamp. 

 

Then after some time of logging just analyze the logs in the file in the
db. 

 

The log event can carry a token passed by the client like a parameter, 

 

or you may catch a bit of header information passed by each client i.e.
part of the addressing headers. 

 

doing this types of logging more generic, a logging module is the right
approach. 

how to write a module and include it into your axis2 environment making
a .mar is well explained in the samples of axis2. 

 

But if you log by a generic logger in a logging module of the axis2
message processing chain, and if that request gets later redirected by
whatever logic, including service methods that kind of logging will not
say the true at all. 

 

In my mind you might need boot. Logging on the chain(s) of message
processing and logging the events at the final receivers or
intermediates which are your services methods. Given you develop later
state full servers, then logging by the proper objects (instance)
becomes evident as well.

 

Josef

 

 

 

Von: Kanchana Welagedara [mailto:kanchanas@gmail.com] 
Gesendet: Freitag, 21. Januar 2011 03:23
An: axis-dev@ws.apache.org; java-dev@axis.apache.org;
axis-user@ws.apache.org; java-user@axis.apache.org
Betreff: [Axis2]How to create a mar file out of classes in AXIS 2

 

hi Folks

 

I'm creating a Axis java 2 handler .I want to know how to generate the
mar file. I have module.xml written ,src, edited axis2.xml to include
the module name.

 

Also i want to store a token in a xml/Data base  for reach requests
coming from each client to identify which requets came from which
client.Passing a token from a client in the request with EPR is not
always possible since my all web services are not stateful

 

Could any one help me in this please?

 

Thanks

Kanchana


Re: [Axis2]How to create a mar file out of classes in AXIS 2

Posted by Deepal Jayasinghe <de...@opensource.lk>.
> hi Folks
>  
> I'm creating a Axis java 2 handler .I want to know how to generate the
> mar file. I have module.xml written ,src, edited axis2.xml to include
> the module name.
Please refer to the documentation, and also there are a number of
articles explaining the process.
>  
> Also i want to store a token in a xml/Data base  for reach requests
> coming from each client to identify which requets came from which
> client.Passing a token from a client in the request with EPR is not
> always possible since my all web services are not stateful
>  
> Could any one help me in this please?
>  
Each message has a message ID, and from the message context you can get
the request URL, so combining the two you can identify which request
came from which client.

Deepal
> Thanks
> Kanchana

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Get the following error: NoClassDefFoundError: org.apache.log4j.Logger

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Henry,

This is not the right list for your question, this list is about Axis2 (web
services) user issues and discussions.

Anyway, I think it is purely because log4j is not on the classpath. Are you
passing the -classpath argument and giving log4j jar with all the other
dependencies when you run the jar? That is just a hint, please use a proper
java user list.

Thanks,
Ruwan

On Wed, Feb 2, 2011 at 3:19 PM, henry human <he...@yahoo.de> wrote:

> Hi folks*
>
> *
> I try my question in this list, maybe you have an idea!
> I get the following error when I try to call a smal java application(hello
> friends!) which i placed in a jar file. the application has the log4j.jar in
> its lib directory (and classpath) and calls the log4j.logger like this:
> private static final Logger LOGGER = Logger.getLogger(Hello.class);
> It works when i run the application in eclipse
> but not when I pack it as a JAR application! (he application is not running
> on tomcat an is only a smal commandline application)
>
> Error:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/log4j/Logger
>
> Thanks for your advice
>
>


-- 
Ruwan Linton
Member, Apache Software Foundation; http://www.apache.org
Software Architect & Product Manager, WSO2 Inc.; http://wso2.org

phone: +1 408 754 7388 ext 51789
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://blog.ruwan.org
linkedin: http://www.linkedin.com/in/ruwanlinton
google: http://www.google.com/profiles/ruwan.linton
tweet: http://twitter.com/ruwanlinton

AW: Get the following error: NoClassDefFoundError: org.apache.log4j.Logger

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
In which directories (plural) did you place log4j.jar?

In which directories did you place log4j.properties?

Can you give us your log4j.properties content?

Josef

 

Von: henry human [mailto:henry_human@yahoo.de] 
Gesendet: Mittwoch, 2. Februar 2011 10:49
An: java-user@axis.apache.org
Betreff: Get the following error: NoClassDefFoundError: org.apache.log4j.Logger

 

Hi folks

I try my question in this list, maybe you have an idea!

I get the following error when I try to call a smal java application(hello friends!) which i placed in a jar file. the application has the log4j.jar in its lib directory (and classpath) and calls the log4j.logger like this:

private static final Logger LOGGER = Logger.getLogger(Hello.class);

It works when i run the application in eclipse

but not when I pack it as a JAR application! (he application is not running on tomcat an is only a smal commandline application)

 

Error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger

 

Thanks for your advice

 


Get the following error: NoClassDefFoundError: org.apache.log4j.Logger

Posted by henry human <he...@yahoo.de>.
Hi folks
I try my question in this list, maybe you have an idea!I get the following error when I try to call a smal java application(hello friends!) which i placed in a jar file. the application has the log4j.jar in its lib directory (and classpath) and calls the log4j.logger like this:private static final Logger LOGGER = Logger.getLogger(Hello.class);It works when i run the application in eclipsebut not when I pack it as a JAR application! (he application is not running on tomcat an is only a smal commandline application)
Error:Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
Thanks for your advice