grails - 如何通过像 Fiddler 这样的代理使用 intellij/grails 和 wslite soap 客户端来查看消息?

标签 grails soap proxy

我想设置一个代理检查工具,例如 fiddler 或 Charles 代理(我都有),所以我可以看到正在发送和接收的内容 - 没有这个你是盲目的。

问题是,我如何告诉 grails 2.4.4 或 wslite-0.7.2.0 插件使用我的本地代理服务器?

遗憾的是,该插件只有 1 页的文档,其中的示例与它应该引入的 groovy-wslite 库完全不同。

例如https://github.com/jwagenleitner/groovy-wslite

说我应该能够做到这一点:

 def proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress('proxy.example.com', 8080))
 def client = new SOAPClient("https://www.example.com/ExampleService")
 def response = client.send(proxy:proxy) {

但是当我尝试这种格式时,我得到:
 No signature of method: wslite.soap.SOAPClient.send() is applicable for argument types: (java.net.Proxy, 

最佳答案

找到了答案。

        def client = new SOAPClient('https://bla')
        def proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress('localhost', 8888))
        client.httpClient.proxy = proxy

        def response = client.send(SOAPAction: 'blabla') {

关于grails - 如何通过像 Fiddler 这样的代理使用 intellij/grails 和 wslite soap 客户端来查看消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28497377/

相关文章:

grails - 如何配置 cometd 以与 google chrome 一起正常工作?

java - grails中转换日期错误

apache - 设置 SOAP 环境?

android - 如何在 Android 上正确配置 CharlesProxy

json - 如何从 Controller 中检索GSP View 中的JSON对象

javascript - 将Javascript函数与Grails应用程序集成

c# - 单个应用程序中的 SOAP 服务和 JSF/Icefaces

c - SOAP 请求和响应使用 libcurl - C 读取文件或写入文件

python - 如何忽略 "Enter username for Private Proxy Access"提示?

testing - 测试IP代理的方法