http调用webservice接口返回错误:no SOAPAction header解决方法

错误消息:

 
  
   ns1:Client.NoSOAPAction
   no SOAPAction header!
   
    host1
   
  
 

 

解决方法,
    //HttpURLConnection连接,需设置 SOAPAction Header :
    connect.setRequestProperty("SOAPAction","");//参数2可以是任意字符串,我写的url
    
        //SOAPAction正确值,应该查看:url.wsdl 的:

参考:

https://blog.csdn.net/wxyong3/article/details/38727503

https://blog.csdn.net/etttttss/article/details/21624313

推荐:根据结果搜索,健全的http调用webservice接口方法,写的比较清晰

https://www.cnblogs.com/eleven258/p/7157419.html?utm_source=itdadao&utm_medium=referral

SOAP和WSDL对Web Service、WCF进行深入了解的基础

https://www.cnblogs.com/JeffreySun/archive/2009/12/14/1623766.html

你可能感兴趣的:(http调用webservice接口返回错误:no SOAPAction header解决方法)