I would like to log my request and response. I found a very easy solution to do so by changing the properties recommended here: Tracing XML request/responses with JAX-WS
My problem is, that I do not want to log credentials, so I manually need to adapt the log-message.
I am new to soap so I have not much experience at all.
I use a gradle plugin to create java classes of my WSDL: https://plugins.gradle.org/plugin/no.nils.wsdl2java
My code to create a service:
import javax.xml.namespace.QName
import javax.xml.ws.Service
[...]
private MYSoapWsdlClass createClient(String url) {
URL serverEndpoint = new URL(url)
QName SERVICE_NAME = new QName("DOC_URL", "SERVICE_NAME")
Service service = Service.create(serverEndpoint, SERVICE_NAME)
return service.getPort(MYSoapWsdlClass.class)
}
So how could I get the logging handler in here?
Or is there another easy way to instantiate my service using the wsdl?
Usually I use groovy, but could not find a wsdl2groovy
plugin.
Many thanks