pb9.0 使用soapclient建立了webservice連接,在呼叫里面的方法時,要求進行soapheader驗證,有高手能告知pb9.0傳遞soapheader資訊的方法嗎?
uj5u.com熱心網友回復:
參考一下這個近日碰上不能使用匿名訪問web service的問題,真是頭大啊,搞了半天,才在pbwsclient110.pbx匯入的的物件中找了到setbasicauthentication( string domain, string user ,string password) ,看著這函式有點象C#中的 ws.Credentials = new NetworkCredential(userid,password,domainname),結果一試,還真成功了,呼叫方式是:在服務createinstance之前,先soapconnection.setbasicauthentication('','user','password'),第一個引數可以是空字串
uj5u.com熱心網友回復:
如果不行,可以考慮采用mssoaphttp://blog.csdn.net/caok/article/details/3240198
http://www.cnblogs.com/raylynn/archive/2007/10/13/923135.html
uj5u.com熱心網友回復:
可以通過http進行xml轉輸,pb9好像不能進行soapheader驗證轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/18121.html
標籤:API 調用
下一篇:沒有回應后代碼丟失問題
