【问题标题】:How to use intellij/grails and wslite soap client through a proxy like Fiddler to see the messages?如何通过像 Fiddler 这样的代理使用 intellij/grails 和 wslite soap 客户端来查看消息?
【发布时间】:2016-10-19 15:03:35
【问题描述】:

我想设置一个代理检查工具,例如 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, 

【问题讨论】:

    标签: grails soap proxy


    【解决方案1】:

    找到答案了。

            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') {
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-10
      • 1970-01-01
      相关资源
      最近更新 更多