- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我试图用 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。我这么说的原因是:我可以注释掉身份验证行,我得到了相同的结果。
有什么提示吗?
最佳答案
好的,我从另一个论坛得到了答案。这是 apache CXF(groovy WSClient 的后端)的已知限制,它仅在使用 web 服务时使用凭证,而不是在获取 wsdl 时使用凭证!解决方法是在本地加载 wsdl 并使用以下方法构建 WSClient:
new WSClient(this.class.classLoader.getResource("services.wsdl").toExternalForm(),
this.class.classLoader)
对于那些使用 exchange webservice 的人来说,还没有结束!您还需要修复一些错误:
修复 types.xsd 替换行
<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
通过
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
最后修复 services.wsdl 添加 wsdl:service 标签
<wsdl:service name="ExchangeWebService">
<wsdl:port name="ExchangeWebPort" binding="tns:ExchangeServiceBinding">
<soap:address location="https://myserver/EWS/exchange.asmx" />
</wsdl:port>
</wsdl:service>
就是这样,它现在应该正确初始化了!
关于ssl - WSClient 无法在 https 上连接交换 wsdl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4254642/
我在理解这些函数如何更新底层引用、原子等时遇到问题。 文档说:(应用当前身份值参数) (def one (atom 0)) (swap! one inc) ;; => 1 所以我想知道它是如何“扩展到
尝试让一段代码看起来更好。 我在 Clojurescript 中有以下内容: (swap! app-state assoc-in [:lastresults] []) (swap! app-state
我在数据库中有带有排序顺序号的记录。现在我想创建一个带有向上和向下按钮的用户界面来重新排序它们。制作两个 functionsUp(record) 和 functionDown(record) 的最佳算
如何才能让第二次点击时返回?我想我必须以某种方式找到活跃的,但不确定。 $("#test").click(function(){ $("#dsa").fadeOut() $("#asd
我需要有关这次考试的帮助。我需要反转输入字符串。 int main(void) { char str[30]; int strlen; int i=0; int count=0;int
我正在用 C 语言玩指针...我尝试编写一个接收指向值的指针、检索指针的指针并交换指向值的指针的交换,而不是接收指向值的指针和交换值的常规交换。 这是代码... 互换功能: void swap(voi
如何在 javascript 中切换值?例如,如果 x = apple,则函数应返回 x = orange。如果 x = orange,则函数应返回 x = apple。不确定,这里有什么用,切换或交
刚接触这类东西,可能做错了什么,但是- 我有 3 个成员 std::unique_ptr currentWeapon; std::unique_ptr weaponSlotOne; std::uniq
我想在 Map 内的不可变列表内交换项目,示例: const Map = Immutable.fromJS({ name:'lolo', ids:[3,4,5] }); 我正在尝试使用
我创建了动态数组。如果具有某些值,则填充。打印它。但是交换/交换指针后(任务是在特定条件下交换行) 条件取决于sumL。为了不浪费您的时间,我没有描述细节。 问题在于交换指针。 for ( k = 0
要反转整个 vector,存在 std::reverse。但我想将一个 vector “划分”为两部分(恰好在中间)并将两者反转,将它们放回一起并再次反转整个 vector 。例如我们有: 0 1 2
我正在致力于代码最小化和增强。我的问题是:是否可以在不破坏代码逻辑的情况下交换上面的 if 语句? int c1 = Integer.parseInt(args[0]) ; int c
我读过释放 vector 内存的最佳方法是: vector().swap(my_vector); 而且我真的不明白发生了什么。交换函数需要 2 个 vector 并交换它们的元素,例如: vector
我正在尝试编写一个 Haskell 函数,该函数接受一串字母对,并在所有字母组成的字符串中交换该对字母,但我想出的方法感觉很尴尬且不惯用。 我有 swap a b = map (\x-> if x =
我正在尝试使用向上和向下箭头交换两个元素。 JSFiddle 解决方案会很棒! 我的 HTML: Some text down Some ot
当将 subview 与另一个太阳 View 交换时,是否需要重新应用约束?是否需要删除适用于已删除 View 的约束? 或者它们应该自动持续存在? 最佳答案 约束是 View 的“一部分”。当您删除
所以我制作网站已经有一段时间了,但只是真正用于显示和信息的东西。我想尝试一下 AngularJs,所以我遵循了 Codeschool 上的指南。当我根据在线文档意识到我使用的语法不被推荐时,我在该应用
我正在尝试编写一个函数,可以将字符串中的 unicode 字符替换为非 unicode ASCII 字符,问题是上传包含它们的字符串时,unicode 连字符和引号不会被读取。 我希望该函数有一个带有
我目前正在使用 Azure 网站来部署我的应用程序。我目前正在使用两个网站,每个网站监听我的 GIT 的不同分支。如图所示here . 现在,为了让它变得完美,我只是缺少一种在这两个实例之间快速切换的
在我的 javascript 中,有两个包含一些值的 div。 我想交换这些div中的值。 有什么解决办法吗? 最佳答案 var temp = $('#div1').html(); $('#div1'
我是一名优秀的程序员,十分优秀!