We do not seem to be able to configure SOAP message logging for a CXF
client. What are we missing?
We have used http://cwiki.apache.org/CXF20DOC/debugging.html as a guide.
We have tried to put this in the client code, but nothing got printed:
PrintWriter pw = new PrintWriter(System.out);
Client client = ClientProxy.getClient(port);
client.getInInterceptors().add(new
LoggingInInterceptor(pw)); // Also tried "new LoggingInInterceptor()"
client.getOutInterceptors().add(new
LoggingOutInterceptor(pw));
We have tried to put this in the cxf.xml file, but nothing got printed:
<bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
<bean id="logOutbound"
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
<cxf:bus>
<cxf:features><cxf:logging/></cxf:features>
<cxf:inInterceptors><ref
bean="logInbound"/></cxf:inInterceptors>
<cxf:inFaultInterceptors><ref
bean="logInbound"/></cxf:inFaultInterceptors>
<cxf:outInterceptors><ref
bean="logOutbound"/></cxf:outInterceptors>
<cxf:outFaultInterceptors><ref
bean="logOutbound"/></cxf:outFaultInterceptors>
</cxf:bus>
We do not control the service, and our messages probably do not even get
sent.
We are getting an error that says that our messages are malformed, but
since they are automatically generated, we do not know what they look
like.
We would like to see the SOAP messages as they are generated, in order
to troubleshoot the problem.
For the record, the error message we get is the following:
Caused by: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[1,50]
Message: White spaces are required between publicId and systemId.
at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
at com.sun.xml.stream.XMLReaderImpl.nextTag(XMLReaderImpl.java:1177)
at
msjava.msxml.stream.TextMSXMLStreamReader.nextTag(TextMSXMLStreamReader.
java:713)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
sage(ReadHeadersInterceptor.java:85)
Thanks,
Radu Manolescu
Morgan Stanley | Technology
2000 Westchester Ave, 1st Floor | Purchase, NY 10577
Phone: +1 914 225-5871
Mobile: +1 203 648-6964
[EMAIL PROTECTED]
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not
intend to waive confidentiality or privilege. Use of this email is prohibited
when received in error.