-
2. Re: WebServices logging
mobaxkrs Feb 11, 2009 12:48 AM (in response to mobaxkrs)
It Works.. Thanks a lot..
I had been beating the bush around for the past 5 days...
You saved my work
Thanks again for your instant reply.
regards
KRS -
3. Re: WebServices logging
mobaxkrs Feb 12, 2009 1:51 AM (in response to mobaxkrs)Hi
Now all webservices are logged to a file as xml. We need to log in a MySQL database. I used JDBCAppender and the configuration is as shown
<param name="sql" value="insert into logTable (message, class, priority, log_date)
values ('%m', '%c', '%p', '%d{dd.MM.yyyy}')"/>
<appender-ref ref="JDBC"></appender-ref>
But in the database, i get only debug and info, not the Traces from MessageTrace class
Why?
regards
KRS -
4. Re: WebServices logging
peterj Feb 12, 2009 10:39 AM (in response to mobaxkrs)Try adding
<priority value="TRACE"/>
to the category.
P.S. When posting XML text or source code, please enclose the text in UBBCode "code" tags - you can do this by selecting the text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting. -
5. Re: WebServices logging
mobaxkrs Feb 13, 2009 12:01 AM (in response to mobaxkrs)I have already given that
<!-- ====================================================================================-->
<!-- All Web Service Trace logged directly to MySQL Database, through JDBC Appender -->
<!-- ====================================================================================--><appender name="JDBC" class="org.apache.log4j.jdbc.JDBCAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="Driver" value="com.mysql.jdbc.Driver"/> <param name="URL" value="jdbc:mysql://127.0.0.1:3306/logdb" /> <param name="user" value="root" /> <param name="password" value="root" /> <param name="sql" value="insert into logTable (message, class, priority, log_date) values ('%m', '%c', '%p', '%d{dd.MM.yyyy}')"/> </appender> <category name="org.jboss.ws.core.MessageTrace"> <appender-ref ref="JDBC"></appender-ref> <priority value="TRACE"/> </category>
The same category works if it is for a file appender
Pls help -
6. Re: WebServices logging
mobaxkrs Mar 3, 2009 1:05 AM (in response to mobaxkrs)Hi all
Now that we could not log to database directly. We did the following work around.
Wrote the log events as xml elements, using XMLLayout and then watch the log file.
Whenever, the log file changed, the application starts and log are inserted into db
Next issue we are facing is there is no link between the request and response.
Is there any means to identify the response for particular request?
or can be extend JBOSS web Trace class?
regards
KRS -
7. Re: WebServices logging
ropalka Mar 3, 2009 1:25 AM (in response to mobaxkrs)"mobaxkrs" wrote:
Next issue we are facing is there is no link between the request and response.
Is there any means to identify the response for particular request?
I'd suggest to use our Records Management Framework. -
8. Re: WebServices logging
ropalka Mar 3, 2009 1:32 AM (in response to mobaxkrs)Another option you have is to use WS-Addressing in your web services and use
MessageID correlation identifier to identify which response belongs to which request. Then you could identify related messages using your log4j integration work you already did ;) -
9. Re: WebServices logging
mobaxkrs Mar 4, 2009 2:37 AM (in response to mobaxkrs)How to enable recording - which file has the configuration
-
10. Re: WebServices logging
ropalka Mar 4, 2009 3:21 AM (in response to mobaxkrs)Read Records Management Framework documentation above, please.
-
11. Re: WebServices logging
mobaxkrs Mar 5, 2009 2:47 AM (in response to mobaxkrs)Hi
I read through the Records management framework documentation. But i Could not figure out how to achieve it.. The implementation portion in the document is not clear.
Somehow i figured out
/home/krs/mobicents-all-1.2.0.BETA3-jboss-4.2.2.GA/jboss-4.2.2.GA/server/default/deploy/jbossws.sar/jbossws.beans/META-INF/jboss-beans.xml and added the bean properties for the recorders.
Don't know it is what we need to do.
Where will the logged information available.. How to get that.. Could u specify implementation specific details.. or point to any other links -
12. Re: WebServices logging
mobaxkrs Mar 5, 2009 2:57 AM (in response to mobaxkrs)Also i found that the default standard endpoint config at
jboss-4.2.2.GA/server/default/deploy/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml has no <pre-handler-chains> Element in it
The config is<endpoint-config> <config-name>Standard Endpoint</config-name> </endpoint-config>
-
13. Re: WebServices logging
asoldano Mar 5, 2009 4:12 AM (in response to mobaxkrs)The documentation clearly says the Record Management is available starting from version 2.0.3. Which version of JBossWS are you using? The version that comes with JBoss 4.2.2.GA is 2.0.1.SP2, thus if you did not change anything about that, you would simply need to upgrade to a more recent version. In that case, take a look at the supported target containers matrix : http://jbossws.jboss.org/mediawiki/index.php?title=Supported_Target_Containers
This said, for a simple use of the Record Management with Native stack you don't need to do anything special besides going to the JMX console and activate the recording flag in the already installed LogRecorder instance for you endpoint. No implementation required, no changes to the endpoint config required (assuming you're using one of the provided endpoint configuration). The LogRecorder will simply log every message going through your endpoint into your server.log.
Further customization and usescases are explained in the documentation, I'm sure you'll understand everything easily once you have that stuff (i.e. you using a jbossws version that has that). Also consider taking a look at the testcases in the sources, package org.jboss.test.ws.management.recording. -
14. Re: WebServices logging
mobaxkrs Mar 17, 2009 1:41 AM (in response to mobaxkrs)Hi all
Thanks for the reply and your time,
Now, I have moved to jboss 4.2.3 GA. I could find the record processors installed. I enabled recording for both log recorder and memory buffer recorder.
In the web service endpoint, I provided the config@WebService() @EndpointConfig(configName = "Standard Endpoint") @SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
I had enabled web service trace too, in the jboss_log4j.xml
But could not find any recording in server.log :-(
regards
KRS