Make a copy of the project you made in module08 and work in that copy.
Add a SOAPHandler that logs every message to System.out for the BookWS webservice.
- Write a class handler.LoggingHandler that implements SOAPHandler. For each message
- Log if it is a REQUEST or a RESPONSE
- Log the SOAP message using
context.getMessage().writeTo(System.out);
- catch any Exceptions and return true
- Annotate the BookService with @HandlerChain, and refer to the "../../handlers.xml" file
- Write the handlers.xml file and put it in the WEB-INF directory
- Test and correct until it works
-D
com.sun.xml.ws.transport.http.HttpAdapter.dump=true
No comments:
Post a Comment