沐浴阳光的SK猫

享受黑夜,期盼黎明

« 其实我不是很喜欢咖啡滴鼠仔再访,鼠年必旺 »

ASP调SOAP接口注意事项


公司一个ASP网站,要调用Java写的SOAP接口,本来想用微软那个 SOAP Toolkit提交,可是一直报错(参数错误),也不明白什么问题,只好用最原始的http请求,期间碰到许多问题,做下摘记,希望能让些人少走弯路

  • post过去后服务器报错,例如tomcat报500错误,可能是post的编码不对,检查下
  • SOAP返回<faultstring>The endpoint reference (EPR) for the Operation not found is http://xxx.xxx.xxx.xxx/services/ScoreService and the WSA Action = null</faultstring>,那是http头没加action项,试试添加一行 objXML.setRequestHeader "SOAPAction", "Update",其中 update 是对应WSDL的方法
  • 提示“Transport level information does not match with SOAP Message namespace”,检查xmlns属性,别搞混了
    "http://schemas.xmlsoap.org/soap/envelope/", 是 SOAP 1.1
    "http://www.w3.org/2003/05/soap-envelope", 是 SOAP 1.2

 

附上相关文档地址

SOAP 1.1 | SOAP 1.2

Security 可以参考里面post和返回的格式等


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最近发表

最新评论及回复

BBS | About | GuestBook | SiteMap | RSS | Login
Copyright 2005-2008 21ido.com. All Rights Reserved.
Powered by Z-Blog 1.8 Spirit Build 80722 | Skin by coolmud
粤ICP备05022506号