Ah, I missed that I should be adding the Client object via the getClient(port) method.
Thanks much for nudging me in the correct direction. On Tue, Jan 14, 2014 at 12:35 PM, José Manuel Prieto < [email protected]> wrote: > > http://cxf.apache.org/docs/debugging-and-logging.html#DebuggingandLogging-LoggingMessages > > Client client = ClientProxy.getClient(port); > client.getInInterceptors().add(new LoggingInInterceptor()); > client.getOutInterceptors().add(new LoggingOutInterceptor()) > > In spring application context: > <cxf:bus> > <cxf:outInterceptors> > <ref bean="logOutbound"/> > </cxf:outInterceptors> > </cxf:bus> > > or: > <cxf:bus> > <cxf:features> > <cxf:logging /> > </cxf:features> > </cxf:bus> > http://cxf.apache.org/docs/bus-configuration.html > http://cxf.apache.org/docs/configuration-of-the-bus.html > > http://www.ibm.com/developerworks/webservices/library/ws-apache-cxf-logging/index.html?ca= > > To create a custom log interceptor: > http://cxf.apache.org/docs/interceptors.html > > ;) > JMPrieto > > > > 2014/1/14 Jeffrey Born <[email protected]> > > > Hi all, > > > > I am having problems figuring out how to log the Request and Response > > objects after successfully calling a .NET Web Service. I created the > > client using Eclipse Kepler that generated all the skeleton code for me. > > I'm using the 2.7.8 version of CXF and Java jdk1.7.0_45. > > > > I've read a lot about interceptors and believe that is the way to go, > > however I can't figure out how to add an interceptor to what is > generated. > > Everything object generated in the client does not allow an interceptor > to > > be added. It's like everything got generated at too high of a level for > me > > to add interceptors. > > > > Not sure if this section of code will be useful to illustrate what I'm > > seeing, but including in hopes that it is: > > > > PhoneBookManagement ss = new PhoneBookManagement(wsdlURL, SERVICE_NAME); > > PhoneBookManagementSoap port = ss.getPhoneBookManagementSoap(); > > > > com.pbsystems.yellow.wsdl.v1x0.PhoneBookVerificationByPhoneNumberRequest > > _phoneBookVerificationByPhoneNumber_payload = new > > > com.pbsystems.yellow.wsdl.v1x0.PhoneBookVerificationByPhoneNumberRequest(); > > > > I'd like to log the _phoneBookVerificationByPhoneNumber_payload SOAP > > request to the DB at this point, and all I see are my getters and setters > > > > com.pbsystems.yellow.wsdl.v1x0.PhoneBookVerificationResponse > > _phoneBookVerificationByPhoneNumber__return = > > > > > port.phoneBookVerificationByPhoneNumber(_phoneBookVerificationByPhoneNumber_payload); > > > > After the call to the service I'd now like to log the > > _phoneBookVerificationByPhoneNumber__return SOAP response object to the > DB. > > > > Thanks for any help with this! > > >
