You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by harbhanu <ha...@huawei.com> on 2008/04/25 12:00:33 UTC

Setting logging configuration using cxf.config.file

Hi,

I am trying to configure the logging interceptors using config file.

For this I specify the config files for both server and client using
"cxf.config.file" and have added the same in ant build script.

But due to some goof up somewhere its not able to add the interceptors...
Any clues ?

 

The config files looks like this..[I have even tried the other alternative,
using CXFBusImpl..]

<beans xmlns="http://www.springframework.org/schema/beans"

       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

       xsi:schemaLocation="

http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor"/>

<bean id="logOutbound"
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>

<cxf:bus>

        <cxf:outInterceptors>

            <ref bean="logOutbound"/>

        </cxf:outInterceptors>

        <cxf:outFaultInterceptors>

            <ref bean="logOutbound"/>

        </cxf:outInterceptors>

        <cxf:inInterceptors>

            <ref bean="logInbound"/>

        </cxf:outInterceptors>                

</cxf:bus>

</beans>

 

The verbose ant output is as:

D:\JWork\Eclipse\spacework\configuration>ant server -v

Apache Ant version 1.6.5 compiled on June 2 2005

Buildfile: build.xml

Detected Java version: 1.5 in: D:\JWork\Java\jdk1.5.0_15\jre

Detected OS: Windows XP

parsing buildfile D:\JWork\Eclipse\spacework\configuration\build.xml with
URI = file:///D:/JWork/Eclipse/spacework/configuration/build.xml

Project base dir set to: D:\JWork\Eclipse\spacework\configuration

 [property] Loading Environment env.

[available] Found: D:\JWork\Java\jdk1.5.0_15\lib\tools.jar

[available] Unable to find file cxf-manifest-incubator.jar

[available] Unable to find dir tools

[available] Found directory: lib in D:\JWork\CXF\apache-cxf-2.0.4-incubator

Build sequence for target(s) `server' is [compile, server]

Complete build sequence is [compile, server, client, clean, checkstyle,
build, ]

 

compile:

    [mkdir] Created dir:
D:\JWork\Eclipse\spacework\configuration\build\classes

    [javac] Service.wsdl skipped - don't know how to handle it

    [javac] build.xml skipped - don't know how to handle it

    [javac] client.xml skipped - don't know how to handle it

    [javac] com\example\stockquote\ObjectFactory.java added as
com/example/stockquote/ObjectFactory.class doesn't exist.

    [javac] com\example\stockquote\StockQuotePortType.java added as
com/example/stockquote/StockQuotePortType.class doesn't exist.

    [javac] com\example\stockquote\StockQuotePortTypeImpl.java added as
com/example/stockquote/StockQuotePortTypeImpl.class doesn't exist.

    [javac]
com\example\stockquote\StockQuotePortType_StockQuotePort_Client.java added
as com/example/stockquote/StockQuotePortType_StockQuotePort_Clien

    [javac]
com\example\stockquote\StockQuotePortType_StockQuotePort_Server.java added
as com/example/stockquote/StockQuotePortType_StockQuotePort_Serve

    [javac] com\example\stockquote\StockQuoteService.java added as
com/example/stockquote/StockQuoteService.class doesn't exist.

    [javac] com\example\stockquote\TradePrice.java added as
com/example/stockquote/TradePrice.class doesn't exist.

    [javac] com\example\stockquote\TradePriceRequest.java added as
com/example/stockquote/TradePriceRequest.class doesn't exist.

    [javac] com\example\stockquote\package-info.java added as
com/example/stockquote/package-info.class doesn't exist.

    [javac] logging.properties skipped - don't know how to handle it

    [javac] server.xml skipped - don't know how to handle it

    [javac] Compiling 9 source files to
D:\JWork\Eclipse\spacework\configuration\build\classes

    [javac] Using modern compiler

    [javac] Compilation arguments:

    [javac] '-d'

    [javac] 'D:\JWork\Eclipse\spacework\configuration\build\classes'

    [javac] '-classpath'

    [javac]
'D:\JWork\Eclipse\spacework\configuration\build\classes;D:\JWork\CXF\apache-
cxf-2.0.4-incubator\lib\cxf-manifest-incubator.jar;D:\JWork\apac

1.7.0\lib\ant-apache-bsf.jar;D:\JWork\apache-ant-1.7.0\lib\ant-apache-log4j.
jar;D:\JWork\apache-ant-1.7.0\lib\ant-apache-oro.jar;D:\JWork\apache-ant-1.7

ache-ant-1.7.0\lib\ant-commons-net.jar;D:\JWork\apache-ant-1.7.0\lib\ant-jai
.jar;D:\JWork\apache-ant-1.7.0\lib\ant-javamail.jar;D:\JWork\apache-ant-1.7.

ar;D:\JWork\apache-ant-1.7.0\lib\ant-netrexx.jar;D:\JWork\apache-ant-1.7.0\l
ib\ant-nodeps.jar;D:\JWork\apache-ant-1.7.0\lib\ant-starteam.jar;D:\JWork\ap

1.7.0\lib\ant-trax.jar;D:\JWork\apache-ant-1.7.0\lib\ant-weblogic.jar;D:\JWo
rk\apache-ant-1.7.0\lib\ant.jar;D:\JWork\apache-ant-1.7.0\lib\xercesImpl.jar

    [javac] '-sourcepath'

    [javac] 'D:\JWork\Eclipse\spacework\configuration'

    [javac] '-g'

    [javac]

    [javac] The ' characters around the executable and arguments are

    [javac] not part of the command.

    [javac] Files to be compiled:

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\ObjectFactor
y.java

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
rtType.java

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
rtTypeImpl.java

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
rtType_StockQuotePort_Client.java

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
rtType_StockQuotePort_Server.java

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuoteSe
rvice.java

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\TradePrice.j
ava

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\TradePriceRe
quest.java

    [javac]
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\package-info
.java

 

server:

     [java] Executing 'D:\JWork\Java\jdk1.5.0_15\jre\bin\java.exe' with
arguments:

     [java] '-Dcxf.config.file=server.xml'

     [java] '-D'

     [java] '-D'

     [java] '-D'

     [java] '-D'

     [java]
'-Djava.util.logging.config.file=D:\JWork\CXF\apache-cxf-2.0.4-incubator\etc
/logging.properties'

     [java]
'-Dlog4j.configuration=file:///D:\JWork\CXF\apache-cxf-2.0.4-incubator\etc/l
og4j.properties'

     [java] '-classpath'

     [java]
'D:\JWork\Eclipse\spacework\configuration\build\classes;D:\JWork\CXF\apache-
cxf-2.0.4-incubator\lib\cxf-manifest-incubator.jar'

     [java] '-ea:org.apache.cxf...'

     [java]
'com.example.stockquote.StockQuotePortType_StockQuotePort_Server'

     [java] 'file:Service.wsdl'

     [java] ''

     [java] ''

     [java] ''

     [java] ''

     [java]

     [java] The ' characters around the executable and arguments are

     [java] not part of the command.

     [java] Starting Server

     [java] Server ready...

     [java] com.example.stockquote.TradePriceRequest@98bbf6

 

Regards,

Harbhanu


RE: Setting logging configuration using cxf.config.file

Posted by harbhanu <ha...@huawei.com>.
That trick to keep the config files in classpath worked...Also, as pointed
earlier I got some *wellformedness* errors my set of config files...

But even after correcting those... the logs are still not coming out...any
clue??

PS: I was just thinking that incase the config file is ignored... shouldn't
that be logged somewhere ?:)

-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com] 
Sent: Friday, April 25, 2008 5:02 PM
To: users@cxf.apache.org
Subject: Re: Setting logging configuration using cxf.config.file


The file that you specify with "cxf.config.file" should be in the class 
path or CXF will not load it.

BTW, you logging interceptors' configure file is not a validate XML, if 
CXF loaded it ,
a XML validation error will be thrown.

Willem.

harbhanu wrote:
> Hi,
>
> I am trying to configure the logging interceptors using config file.
>
> For this I specify the config files for both server and client using
> "cxf.config.file" and have added the same in ant build script.
>
> But due to some goof up somewhere its not able to add the interceptors...
> Any clues ?
>
>  
>
> The config files looks like this..[I have even tried the other
alternative,
> using CXFBusImpl..]
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>        xsi:schemaLocation="
>
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
>
> <bean id="logInbound"
> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>
> <bean id="logOutbound"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>
> <cxf:bus>
>
>         <cxf:outInterceptors>
>
>             <ref bean="logOutbound"/>
>
>         </cxf:outInterceptors>
>
>         <cxf:outFaultInterceptors>
>
>             <ref bean="logOutbound"/>
>
>         </cxf:outInterceptors>
>
>         <cxf:inInterceptors>
>
>             <ref bean="logInbound"/>
>
>         </cxf:outInterceptors>                
>
> </cxf:bus>
>
> </beans>
>
>  
>
> The verbose ant output is as:
>
> D:\JWork\Eclipse\spacework\configuration>ant server -v
>
> Apache Ant version 1.6.5 compiled on June 2 2005
>
> Buildfile: build.xml
>
> Detected Java version: 1.5 in: D:\JWork\Java\jdk1.5.0_15\jre
>
> Detected OS: Windows XP
>
> parsing buildfile D:\JWork\Eclipse\spacework\configuration\build.xml with
> URI = file:///D:/JWork/Eclipse/spacework/configuration/build.xml
>
> Project base dir set to: D:\JWork\Eclipse\spacework\configuration
>
>  [property] Loading Environment env.
>
> [available] Found: D:\JWork\Java\jdk1.5.0_15\lib\tools.jar
>
> [available] Unable to find file cxf-manifest-incubator.jar
>
> [available] Unable to find dir tools
>
> [available] Found directory: lib in
D:\JWork\CXF\apache-cxf-2.0.4-incubator
>
> Build sequence for target(s) `server' is [compile, server]
>
> Complete build sequence is [compile, server, client, clean, checkstyle,
> build, ]
>
>  
>
> compile:
>
>     [mkdir] Created dir:
> D:\JWork\Eclipse\spacework\configuration\build\classes
>
>     [javac] Service.wsdl skipped - don't know how to handle it
>
>     [javac] build.xml skipped - don't know how to handle it
>
>     [javac] client.xml skipped - don't know how to handle it
>
>     [javac] com\example\stockquote\ObjectFactory.java added as
> com/example/stockquote/ObjectFactory.class doesn't exist.
>
>     [javac] com\example\stockquote\StockQuotePortType.java added as
> com/example/stockquote/StockQuotePortType.class doesn't exist.
>
>     [javac] com\example\stockquote\StockQuotePortTypeImpl.java added as
> com/example/stockquote/StockQuotePortTypeImpl.class doesn't exist.
>
>     [javac]
> com\example\stockquote\StockQuotePortType_StockQuotePort_Client.java added
> as com/example/stockquote/StockQuotePortType_StockQuotePort_Clien
>
>     [javac]
> com\example\stockquote\StockQuotePortType_StockQuotePort_Server.java added
> as com/example/stockquote/StockQuotePortType_StockQuotePort_Serve
>
>     [javac] com\example\stockquote\StockQuoteService.java added as
> com/example/stockquote/StockQuoteService.class doesn't exist.
>
>     [javac] com\example\stockquote\TradePrice.java added as
> com/example/stockquote/TradePrice.class doesn't exist.
>
>     [javac] com\example\stockquote\TradePriceRequest.java added as
> com/example/stockquote/TradePriceRequest.class doesn't exist.
>
>     [javac] com\example\stockquote\package-info.java added as
> com/example/stockquote/package-info.class doesn't exist.
>
>     [javac] logging.properties skipped - don't know how to handle it
>
>     [javac] server.xml skipped - don't know how to handle it
>
>     [javac] Compiling 9 source files to
> D:\JWork\Eclipse\spacework\configuration\build\classes
>
>     [javac] Using modern compiler
>
>     [javac] Compilation arguments:
>
>     [javac] '-d'
>
>     [javac] 'D:\JWork\Eclipse\spacework\configuration\build\classes'
>
>     [javac] '-classpath'
>
>     [javac]
>
'D:\JWork\Eclipse\spacework\configuration\build\classes;D:\JWork\CXF\apache-
> cxf-2.0.4-incubator\lib\cxf-manifest-incubator.jar;D:\JWork\apac
>
>
1.7.0\lib\ant-apache-bsf.jar;D:\JWork\apache-ant-1.7.0\lib\ant-apache-log4j.
>
jar;D:\JWork\apache-ant-1.7.0\lib\ant-apache-oro.jar;D:\JWork\apache-ant-1.7
>
>
ache-ant-1.7.0\lib\ant-commons-net.jar;D:\JWork\apache-ant-1.7.0\lib\ant-jai
>
.jar;D:\JWork\apache-ant-1.7.0\lib\ant-javamail.jar;D:\JWork\apache-ant-1.7.
>
>
ar;D:\JWork\apache-ant-1.7.0\lib\ant-netrexx.jar;D:\JWork\apache-ant-1.7.0\l
>
ib\ant-nodeps.jar;D:\JWork\apache-ant-1.7.0\lib\ant-starteam.jar;D:\JWork\ap
>
>
1.7.0\lib\ant-trax.jar;D:\JWork\apache-ant-1.7.0\lib\ant-weblogic.jar;D:\JWo
>
rk\apache-ant-1.7.0\lib\ant.jar;D:\JWork\apache-ant-1.7.0\lib\xercesImpl.jar
>
>     [javac] '-sourcepath'
>
>     [javac] 'D:\JWork\Eclipse\spacework\configuration'
>
>     [javac] '-g'
>
>     [javac]
>
>     [javac] The ' characters around the executable and arguments are
>
>     [javac] not part of the command.
>
>     [javac] Files to be compiled:
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\ObjectFactor
> y.java
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
> rtType.java
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
> rtTypeImpl.java
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
> rtType_StockQuotePort_Client.java
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
> rtType_StockQuotePort_Server.java
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuoteSe
> rvice.java
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\TradePrice.j
> ava
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\TradePriceRe
> quest.java
>
>     [javac]
>
D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\package-info
> .java
>
>  
>
> server:
>
>      [java] Executing 'D:\JWork\Java\jdk1.5.0_15\jre\bin\java.exe' with
> arguments:
>
>      [java] '-Dcxf.config.file=server.xml'
>
>      [java] '-D'
>
>      [java] '-D'
>
>      [java] '-D'
>
>      [java] '-D'
>
>      [java]
>
'-Djava.util.logging.config.file=D:\JWork\CXF\apache-cxf-2.0.4-incubator\etc
> /logging.properties'
>
>      [java]
>
'-Dlog4j.configuration=file:///D:\JWork\CXF\apache-cxf-2.0.4-incubator\etc/l
> og4j.properties'
>
>      [java] '-classpath'
>
>      [java]
>
'D:\JWork\Eclipse\spacework\configuration\build\classes;D:\JWork\CXF\apache-
> cxf-2.0.4-incubator\lib\cxf-manifest-incubator.jar'
>
>      [java] '-ea:org.apache.cxf...'
>
>      [java]
> 'com.example.stockquote.StockQuotePortType_StockQuotePort_Server'
>
>      [java] 'file:Service.wsdl'
>
>      [java] ''
>
>      [java] ''
>
>      [java] ''
>
>      [java] ''
>
>      [java]
>
>      [java] The ' characters around the executable and arguments are
>
>      [java] not part of the command.
>
>      [java] Starting Server
>
>      [java] Server ready...
>
>      [java] com.example.stockquote.TradePriceRequest@98bbf6
>
>  
>
> Regards,
>
> Harbhanu
>
>
>   


Re: Setting logging configuration using cxf.config.file

Posted by Willem Jiang <wi...@gmail.com>.
The file that you specify with "cxf.config.file" should be in the class 
path or CXF will not load it.

BTW, you logging interceptors' configure file is not a validate XML, if 
CXF loaded it ,
a XML validation error will be thrown.

Willem.

harbhanu wrote:
> Hi,
>
> I am trying to configure the logging interceptors using config file.
>
> For this I specify the config files for both server and client using
> "cxf.config.file" and have added the same in ant build script.
>
> But due to some goof up somewhere its not able to add the interceptors...
> Any clues ?
>
>  
>
> The config files looks like this..[I have even tried the other alternative,
> using CXFBusImpl..]
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>        xsi:schemaLocation="
>
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
>
> <bean id="logInbound"
> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>
> <bean id="logOutbound"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>
> <cxf:bus>
>
>         <cxf:outInterceptors>
>
>             <ref bean="logOutbound"/>
>
>         </cxf:outInterceptors>
>
>         <cxf:outFaultInterceptors>
>
>             <ref bean="logOutbound"/>
>
>         </cxf:outInterceptors>
>
>         <cxf:inInterceptors>
>
>             <ref bean="logInbound"/>
>
>         </cxf:outInterceptors>                
>
> </cxf:bus>
>
> </beans>
>
>  
>
> The verbose ant output is as:
>
> D:\JWork\Eclipse\spacework\configuration>ant server -v
>
> Apache Ant version 1.6.5 compiled on June 2 2005
>
> Buildfile: build.xml
>
> Detected Java version: 1.5 in: D:\JWork\Java\jdk1.5.0_15\jre
>
> Detected OS: Windows XP
>
> parsing buildfile D:\JWork\Eclipse\spacework\configuration\build.xml with
> URI = file:///D:/JWork/Eclipse/spacework/configuration/build.xml
>
> Project base dir set to: D:\JWork\Eclipse\spacework\configuration
>
>  [property] Loading Environment env.
>
> [available] Found: D:\JWork\Java\jdk1.5.0_15\lib\tools.jar
>
> [available] Unable to find file cxf-manifest-incubator.jar
>
> [available] Unable to find dir tools
>
> [available] Found directory: lib in D:\JWork\CXF\apache-cxf-2.0.4-incubator
>
> Build sequence for target(s) `server' is [compile, server]
>
> Complete build sequence is [compile, server, client, clean, checkstyle,
> build, ]
>
>  
>
> compile:
>
>     [mkdir] Created dir:
> D:\JWork\Eclipse\spacework\configuration\build\classes
>
>     [javac] Service.wsdl skipped - don't know how to handle it
>
>     [javac] build.xml skipped - don't know how to handle it
>
>     [javac] client.xml skipped - don't know how to handle it
>
>     [javac] com\example\stockquote\ObjectFactory.java added as
> com/example/stockquote/ObjectFactory.class doesn't exist.
>
>     [javac] com\example\stockquote\StockQuotePortType.java added as
> com/example/stockquote/StockQuotePortType.class doesn't exist.
>
>     [javac] com\example\stockquote\StockQuotePortTypeImpl.java added as
> com/example/stockquote/StockQuotePortTypeImpl.class doesn't exist.
>
>     [javac]
> com\example\stockquote\StockQuotePortType_StockQuotePort_Client.java added
> as com/example/stockquote/StockQuotePortType_StockQuotePort_Clien
>
>     [javac]
> com\example\stockquote\StockQuotePortType_StockQuotePort_Server.java added
> as com/example/stockquote/StockQuotePortType_StockQuotePort_Serve
>
>     [javac] com\example\stockquote\StockQuoteService.java added as
> com/example/stockquote/StockQuoteService.class doesn't exist.
>
>     [javac] com\example\stockquote\TradePrice.java added as
> com/example/stockquote/TradePrice.class doesn't exist.
>
>     [javac] com\example\stockquote\TradePriceRequest.java added as
> com/example/stockquote/TradePriceRequest.class doesn't exist.
>
>     [javac] com\example\stockquote\package-info.java added as
> com/example/stockquote/package-info.class doesn't exist.
>
>     [javac] logging.properties skipped - don't know how to handle it
>
>     [javac] server.xml skipped - don't know how to handle it
>
>     [javac] Compiling 9 source files to
> D:\JWork\Eclipse\spacework\configuration\build\classes
>
>     [javac] Using modern compiler
>
>     [javac] Compilation arguments:
>
>     [javac] '-d'
>
>     [javac] 'D:\JWork\Eclipse\spacework\configuration\build\classes'
>
>     [javac] '-classpath'
>
>     [javac]
> 'D:\JWork\Eclipse\spacework\configuration\build\classes;D:\JWork\CXF\apache-
> cxf-2.0.4-incubator\lib\cxf-manifest-incubator.jar;D:\JWork\apac
>
> 1.7.0\lib\ant-apache-bsf.jar;D:\JWork\apache-ant-1.7.0\lib\ant-apache-log4j.
> jar;D:\JWork\apache-ant-1.7.0\lib\ant-apache-oro.jar;D:\JWork\apache-ant-1.7
>
> ache-ant-1.7.0\lib\ant-commons-net.jar;D:\JWork\apache-ant-1.7.0\lib\ant-jai
> .jar;D:\JWork\apache-ant-1.7.0\lib\ant-javamail.jar;D:\JWork\apache-ant-1.7.
>
> ar;D:\JWork\apache-ant-1.7.0\lib\ant-netrexx.jar;D:\JWork\apache-ant-1.7.0\l
> ib\ant-nodeps.jar;D:\JWork\apache-ant-1.7.0\lib\ant-starteam.jar;D:\JWork\ap
>
> 1.7.0\lib\ant-trax.jar;D:\JWork\apache-ant-1.7.0\lib\ant-weblogic.jar;D:\JWo
> rk\apache-ant-1.7.0\lib\ant.jar;D:\JWork\apache-ant-1.7.0\lib\xercesImpl.jar
>
>     [javac] '-sourcepath'
>
>     [javac] 'D:\JWork\Eclipse\spacework\configuration'
>
>     [javac] '-g'
>
>     [javac]
>
>     [javac] The ' characters around the executable and arguments are
>
>     [javac] not part of the command.
>
>     [javac] Files to be compiled:
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\ObjectFactor
> y.java
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
> rtType.java
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
> rtTypeImpl.java
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
> rtType_StockQuotePort_Client.java
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuotePo
> rtType_StockQuotePort_Server.java
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\StockQuoteSe
> rvice.java
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\TradePrice.j
> ava
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\TradePriceRe
> quest.java
>
>     [javac]
> D:\JWork\Eclipse\spacework\configuration\com\example\stockquote\package-info
> .java
>
>  
>
> server:
>
>      [java] Executing 'D:\JWork\Java\jdk1.5.0_15\jre\bin\java.exe' with
> arguments:
>
>      [java] '-Dcxf.config.file=server.xml'
>
>      [java] '-D'
>
>      [java] '-D'
>
>      [java] '-D'
>
>      [java] '-D'
>
>      [java]
> '-Djava.util.logging.config.file=D:\JWork\CXF\apache-cxf-2.0.4-incubator\etc
> /logging.properties'
>
>      [java]
> '-Dlog4j.configuration=file:///D:\JWork\CXF\apache-cxf-2.0.4-incubator\etc/l
> og4j.properties'
>
>      [java] '-classpath'
>
>      [java]
> 'D:\JWork\Eclipse\spacework\configuration\build\classes;D:\JWork\CXF\apache-
> cxf-2.0.4-incubator\lib\cxf-manifest-incubator.jar'
>
>      [java] '-ea:org.apache.cxf...'
>
>      [java]
> 'com.example.stockquote.StockQuotePortType_StockQuotePort_Server'
>
>      [java] 'file:Service.wsdl'
>
>      [java] ''
>
>      [java] ''
>
>      [java] ''
>
>      [java] ''
>
>      [java]
>
>      [java] The ' characters around the executable and arguments are
>
>      [java] not part of the command.
>
>      [java] Starting Server
>
>      [java] Server ready...
>
>      [java] com.example.stockquote.TradePriceRequest@98bbf6
>
>  
>
> Regards,
>
> Harbhanu
>
>
>   


RE: Setting logging configuration using cxf.config.file

Posted by harbhanu <ha...@huawei.com>.
After using your file as config file for both server and client...putting it
in the classpath.. {I added current directory too in the classpath}..
I think I encountered a defect...but am not sure about it..[may be some
configuration related issue]


For me even when the server says that its ready, client is not able to reach
it... that I suppose is owing to some issue with the server... coz I am not
able to get the WSDL for the service using browser also... it gives "unable
to connect"

Also, still my issue regarding logging is not resolved ;-(

Regards,
Harbhanu
-----Original Message-----
From: Per Olesen [mailto:polesen@nordija.com] 
Sent: Friday, April 25, 2008 3:59 PM
To: harbhanu@huawei.com
Cc: users@cxf.apache.org; jaspreet@huawei.com
Subject: Re: Setting logging configuration using cxf.config.file

Hi,

I use a slightly different xml for configuring the logger interceptors:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xmlns:cxf="http://cxf.apache.org/core"
       xsi:schemaLocation="
          http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
          http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
          http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd">

  <import resource="classpath:META-INF/cxf/cxf.xml" />
  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

  <!-- enable in/out logging interceptors in cxf -->
  <cxf:bus>
    <cxf:features>
      <cxf:logging/>
    </cxf:features>
  </cxf:bus>

</beans>

/Per

harbhanu wrote:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>        xsi:schemaLocation="
>
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
>
> <bean id="logInbound"
> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>
> <bean id="logOutbound"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>
> <cxf:bus>
>
>         <cxf:outInterceptors>
>
>             <ref bean="logOutbound"/>
>
>         </cxf:outInterceptors>
>
>         <cxf:outFaultInterceptors>
>
>             <ref bean="logOutbound"/>
>
>         </cxf:outInterceptors>
>
>         <cxf:inInterceptors>
>
>             <ref bean="logInbound"/>
>
>         </cxf:outInterceptors>
>
> </cxf:bus>
>
> </beans>
>


Re: Setting logging configuration using cxf.config.file

Posted by Per Olesen <po...@nordija.com>.
Hi,

I use a slightly different xml for configuring the logger interceptors:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xmlns:cxf="http://cxf.apache.org/core"
       xsi:schemaLocation="
          http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
          http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
          http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">

  <import resource="classpath:META-INF/cxf/cxf.xml" />
  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

  <!-- enable in/out logging interceptors in cxf -->
  <cxf:bus>
    <cxf:features>
      <cxf:logging/>
    </cxf:features>
  </cxf:bus>

</beans>

/Per

harbhanu wrote:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>        xsi:schemaLocation="
>
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
>
> <bean id="logInbound"
> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>
> <bean id="logOutbound"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>
> <cxf:bus>
>
>         <cxf:outInterceptors>
>
>             <ref bean="logOutbound"/>
>
>         </cxf:outInterceptors>
>
>         <cxf:outFaultInterceptors>
>
>             <ref bean="logOutbound"/>
>
>         </cxf:outInterceptors>
>
>         <cxf:inInterceptors>
>
>             <ref bean="logInbound"/>
>
>         </cxf:outInterceptors>
>
> </cxf:bus>
>
> </beans>
>