1 2 Previous Next 17 Replies Latest reply on Nov 10, 2010 12:58 PM by erickjd Go to original post
      • 15. Re: WebServices logging


        I tried out the recording sample in jboss 3.1.0 WS.
        I just took out the recording sample alone

        It throws exception
        java.lang.IllegalArgumentException: Cannot obtain 'null/management-recording-native.jar'. System property 'test.archive.directory' not set.
        at org.jboss.wsf.test.JBossWSTestHelper.getArchiveFile(JBossWSTestHelper.java:276)
        at org.jboss.wsf.test.JBossWSTestHelper.deploy(JBossWSTestHelper.java:66)

        the property is set in the ant process.
        How can i run separately

        • 16. Records Management Framework Samples


          I need simple separate samples on Records management.

          I could see samples in Test Cases, but the samples throw error.. It cannot be run separately.

          The documentation says great features in framework.. But we could not use it:-(


          • 17. Re: Records Management Framework Samples

            Hi everybody, i'm goona make an effort to explain my doubt, and i really appreciate any help.


            I 've developed an EJB Project and deployed it on my JBoss-4.2.3. I use jbossws-native-3.1.1.GA .

            I've tested WS-security and JAAS successfully, in fact i'm using the last one to provide Authentication and Authorization to my web services, thanks to the valuables docs published in this community.

            Going to the point,I have been asked to ensure trace and logs in the web services; specifically processor properties like processDestinationHost, processSourceHost, processDate, ....the kind of data 'u usually register in a commun web application as trace.

            Begining to work i put in my jboss-log4j.xml the following:


            <category name="org.jboss.ws.core.MessageTrace">
                <priority value="TRACE"/>


            and that works!!, but that is not really what i want, what i want is a separated file with all my logs, then following somes good readings of log4j docs, made my own appender and category in the same jboss-log4j.xml:


            <appender name="WSLog" class="org.jboss.logging.appender.DailyRollingFileAppender">
                  <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
                  <param name="File" value="${jboss.server.log.dir}/ws.log"/>
                  <param name="Append" value="false"/>


                  <!-- Rollover at midnight each day -->
                  <param name="DatePattern" value="'.'yyyy-MM-dd"/>
                 <layout class="org.apache.log4j.PatternLayout">
                     <!-- The default pattern: Date Priority [Category] Message\n -->
                     <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>


               <category name="etecsa.buslogic" additivity="false">
                 <appender-ref ref="WSLog"></appender-ref>


            and this works perfectly in codes like this java beans class:


            package etecsa.buslogic.webservices;


            @SecurityDomain(value = "SecurityGdm")
            @WebContext(contextRoot="ws_gdm",authMethod = "BASIC", secureWSDLAccess = false)
            @RolesAllowed( { "Webmaster", "EspDirectorio", "EspPrio" })
            @WebService(serviceName = "ServicioProvincia")
            @EndpointConfig(configName = "Standard Endpoint")
            public class ProvinciaBeanWs extends JBossWSTest implements  ProvinciaBeanWsLocal {


                 private static final Logger log = Logger.getLogger(ProvinciaBeanWs.class.getName());

                 @WebMethod(operationName = "ListarProvincias")
                 public List<Provincia> getProvinciaList() throws Exception {

                     // this message is copied to my ws.log file

                      log.info("Hello tita ....  ");


                      List<Provincia> out = new ArrayList<Provincia>();


                      List<Tbprovincias> list = provincia.getProvinciaArray();
                      if (list != null) {
                           for (Tbprovincias tbprovincias : list) {
                                Provincia prov = buildProvincia(tbprovincias);
                      return out;




            then, how can i read and put processor properties like processDestinationHost, processSourceHost, processDate, in my ws.log file, using of course an specific layout. I've read several times http://community.jboss.org/wiki/JBossWS-Recordsmanagement , that is an article written by Alessio Soldano, but I find myself increasingly lost !!. You can note in my EJB that is referenced the default recording handler of my native version of jbossws, i also put the Recording property of both MBeans: LogRecorder and MemoryBufferRecorder to true, using my JMX console. 


            My file server.log register all the trace, but i need all this processor properties in my ws.log


            i 'll appreciate any help to write my little log file with the processor properties.

            thanks in advance!!!!

            1 2 Previous Next