Hi,

It is not enough information to help you with the problem.
How you create the Object service passing into callService() method? Do you 
inject it using Spring, create programmatically via Service.getPort() or using 
JaxWsProxyFactoryBean?

In case of Spring you can just specify the feature in the spring configuration 
of the client:
    <jaxws:client id="customerService" 
serviceName="customer:CustomerServiceService" 
endpointName="customer:CustomerServiceEndpoint" 
address="http://localhost:9090/CustomerServicePort"; 
serviceClass="com.example.customerservice.CustomerService">
        <jaxws:features>
            <bean class="org.apache.cxf.feature.LoggingFeature"/>
        </jaxws:features>
    </jaxws:client>

For programmatic way you can unwrap proxy (DPPIntegrationCustomer) to client 
and initialize the Logging feature:
Client client = ClientProxy.getClient(customer);
(new LoggingFeature()).initialize(client, client.getBus());

Please either provide complete configuration or analyse working CXF examples 
with LoggingFeature (for example wsdl_first) and align your code with the 
examples.
 
Regards,
Andrei.

> -----Original Message-----
> From: Pavel Degtyarev [mailto:[email protected]]
> Sent: Montag, 18. Mai 2015 21:11
> To: [email protected]
> Subject: RE: How to enable logging of SOAP palyload?
> 
> I did all recommended, but it made no difference whatsoever. Still no logging
> from CXF, no payload and no other messages.
> So far I added cxf.xml into the class path of my WAR, which uses the generated
> client code to access our backend services. I also added spring dependencies 
> as
> suggested here: http://cxf.apache.org/docs/configuration.html
> 
> I want to try enable logging programmatically, but I am confused a little 
> since
> we are not using Client class as defined here:
> http://cxf.apache.org/docs/debugging-and-
> logging.html#DebuggingandLogging-LoggingMessages
> 
> Here's our client sample code, any suggestions how to add logging interceptors
> in it?
> 
> @Override
>     protected Object callService(Object service, Object requestData)
>     {
>         final DPPIntegrationCustomer customer = (DPPIntegrationCustomer)
> service;
>         return customer.callCPP((CallCPPRequestType) requestData);
>     }
> 
> -----Original Message-----
> From: Pavel Degtyarev
> Sent: Friday, May 15, 2015 3:52 PM
> To: [email protected]
> Subject: How to enable logging of SOAP palyload?
> 
> Hello,
> We use CXF 2.6.1 for generating SOAP WS client.
> Trying to enable SOAP payload logging I tried to use JVM argument
> "Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger" and
> enabling debug in my log4j config, as well as configuring debug logging in
> standard Java logging package. Nothing works so far.
> Can anyone provide step-by-step guide what needs to be done to enable
> logging, please?
> 
> 
> 
> ****************************************************************
> **************
> This communication (including any attachments) may contain privileged or
> confidential information intended for a specific individual and purpose, and 
> is
> protected by law.  If you are not the intended recipient, you should delete 
> this
> communication and/or shred the materials and any attachments and are
> hereby notified that any disclosure, copying, or distribution of this
> communication, or the taking of any action based on it, is strictly 
> prohibited.
> 
> Thank you.
> 
> 
> ****************************************************************
> **************
> This communication (including any attachments) may contain privileged or
> confidential information intended for a specific individual and purpose, and 
> is
> protected by law.  If you are not the intended recipient, you should delete 
> this
> communication and/or shred the materials and any attachments and are
> hereby notified that any disclosure, copying, or distribution of this
> communication, or the taking of any action based on it, is strictly 
> prohibited.
> 
> Thank you.

Reply via email to