我试图用 groovy WSClient 连接到 Exchange 服务器 wsdl,但不能,因为我收到一个空文件(当我想解析 wsdl 时)。我正在使用以下几行:
Map mapClient=[
"https.truststore":"/path/jssecacerts",
"https.truststore.pass":"changeit",
"https.keystore":"/path/cacerts",
"https.keystore.pass":"changeit"
]
def proxy=new WSClient("https://mail.exchangeserver:443/ews/services.wsdl", this.class.classLoader)
proxy.setSSLProperties(mapClient)
proxy.setBasicAuthentication("user","password")
proxy.initialize()
由于空文件上的 xml 解析错误,它基本上在 proxy.initialize() 处失败。但是,当我使用浏览器时,我有完整的 wsdl 文件。
这不是 SSL 握手,因为我已经奋斗了几个小时才能让它工作。这是我遇到的第一个错误...
我认为这是出于某种原因错误的 BasicAuthentication 。我这么说的原因是:我可以注释掉身份验证行并且我有相同的结果。
有什么提示吗?