GroovyWS는 내부적으로 Apache CXF를 사용하므로 로깅 인터셉터를 사용하여 트릭을 수행 할 수 있어야합니다. 절단과 GroovyWS 워드 프로세서, 다음 테스트 스크립트 인쇄 모두 요청 및 응답 SOAP 메시지에서 온도 예를 붙여 :
@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.2')
import groovyx.net.ws.WSClient
import org.apache.cxf.interceptor.LoggingInInterceptor
import org.apache.cxf.interceptor.LoggingOutInterceptor
proxy = new WSClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL", this.class.classLoader)
proxy.initialize()
println proxy.client.outInterceptors.add(new LoggingOutInterceptor())
println proxy.client.inInterceptors.add(new LoggingInInterceptor())
result = proxy.CelsiusToFahrenheit(0)
println "You are probably freezing at ${result} degrees Farhenheit"
는 참조 http://cxf.apache.org/docs/debugging-and-logging.html
출처
2012-11-10 12:20:08
Unk