Re: axis2.log missing

2007-09-26 Thread Jochen Rieß

Hi there,

I've faced a similar problem. I figured out that due to the fact that 
axis itself uses log4j the common  easy way of putting a 
log4j.properties inside the deployed webservice does not work. You have 
to configure the logging for your classes manually, i.e. telling your 
webservice where to look for log4j configuration or doing it 'by hand'


   Properties loggerproperties = new Properties();
   loggerproperties.put(log4j.logger.yourclass, DEBUG, appender);
[...]
   PropertyConfigurator.configure(loggerproperties);

Srinath Perera schrieb:

did you try putting it in the classes directory of the Axis2 war ?

On 9/24/07, vpl [EMAIL PROTECTED] wrote:
  

Hi,

I've browsed the axis user mailing list and could not find a clear answer to
this new-comer ... question. Please help
I'm unsing the axis2.war deployed into a tomcat 6.0.14. In the catalina.out
I see a log4j INFO when my Web-service is deployed.
But I added on the server side some log4j code to trace my web-service
activity.
When I start my rpc.client I get the log4j WARM No appender could be found
..
log4j file is never created, nowhere.
I've also tried to insert a log4j.properties into the .aar generated by my
ant when I compile my web-serivce (into the class root directory).
NOTHING 

Something wrong.
Could somebody help me ?

Thanks


===
public class IcProvider {
private static org.apache.log4j.Logger log =
Logger.getLogger(IcProvider.class);
public User logon(String userVal) {
if (userVal.equals(vpl)) {
log.info(user vpl logged);
return new User(vpl);
}
else
return null;
}

}


# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=INFO, CONSOLE
#log4j.rootCategory=INFO, CONSOLE, LOGFILE

# Set the enterprise logger priority to FATAL
log4j.logger.org.apache.axis2.enterprise=FATAL
log4j.logger.de.hunsicker.jalopy.io=FATAL
log4j.logger.httpclient.wire.header=FATAL
log4j.logger.org.apache.commons.httpclient=FATAL

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=axis2.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

--
View this message in context: 
http://www.nabble.com/axis2.log-missing-tf4508178.html#a12856946
Sent from the Axis - User mailing list archive at Nabble.com.


-
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]



When is 'public void destroy(ServiceContext serviceContext) {...}' called?

2007-08-18 Thread Jochen Rieß

Hello again,

I got a little question concerning the method public void 
destroy(ServiceContext serviceContext) inside a service-class.


- When I have my service scope set to request - Is it right that this 
Method will never be called? I expected it to be called whatever scope 
is set.. Is it advisable to let my service implementation call this 
method on their own?


This 'feature' really gave me a headache today, If anybody knows why it 
behaves like that I would really like to hear from you.


Thanks,
Jochen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reference to external schema in wsdl broken

2007-08-17 Thread Jochen Rieß

Hello everybody.

I'm facing a little problem with the codegen tool in Axis2 1.3
My wsdl file imports a schema, code snippet follows:

   xsd:schema
   xmlns=http://www.w3.org/2001/XMLSchema;
   targetNamespace=http://gueter.evision.de/GueterGUI/;
   xsd:include
   schemaLocation=datatypes.xsd
   /xsd:include

 [..]

Using the codegen tool provides me with a modified wsdl which looks like..

   xsd:schema
   targetNamespace=http://gueter.evision.de/GueterGUI/;
   xmlns=http://www.w3.org/2001/XMLSchema;
   xsd:include schemaLocation=xsd0.xsd
   /xsd:include
 [..]
 
The schema has been properly copied into xsd0.xsd. Everything right 
until I deploy the service..

When getting the wsdl from the running axis2 instance it looks like:

   xsd:schema
   attributeFormDefault=unqualified
   elementFormDefault=unqualified
   targetNamespace=http://gueter.evision.de/GueterGUI/;
 
   xsd:include schemaLocation=GueterGUI?xsd=xsd0/

[...]

Using this wsdl one cannot generate code, because the schemaLocation is 
relative to the service location. (In the codegen process the schema 
cannot be found)
Replacing the last line with an absolute url pointing to the schema 
fixes that problem.


My Question is: What can I do to have the wsdl file sent by the running 
axis2 instance be able to compile out of the box?


Thanks in advance!
Jochen Rieß



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to use Log4j in own axis2 service?

2007-08-17 Thread Jochen Rieß

Hello everybody,

I've deployed a simple web service that uses the log4j library for the 
logging. I want everything from this service written into a single 
logfile. My service .aar has the following structure:


--service.aar
log4j.properties
de.evision. (class files are here)
lib
--log4j.jar
--(other libs)

The Service works fine, but no log output is written.
My log4j properties file looks like:

# log4j.rootLogger=DEBUG, file
log4j.logger.de.evision=DEBUG, file
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.datePattern='.'-MM-dd
log4j.appender.file.file=/tmp/mylogfile.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - 
%m%n


I've tried several file locations, using the exact same log4j 
configuration works for a servlet running inside the tomcat container 
which also holds axis2.

I've tried it with and without the rootLogger set to Debug/file..

Any suggestions?

Thanks for your time,
Jochen Rieß



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]