how to set soap Header using ksoap2 - android

后端 未结 2 1311
耶瑟儿~
耶瑟儿~ 2020-11-27 17:58

I need to set the soap header information as part of authentication of a web method. I\'m using ksoap2 API to call .NET web service. Here is the so

2条回答
  •  情深已故
    2020-11-27 18:38

    Spent 2 days trying to get this to work with java and .net and have finally got it working..

    ArrayList headerProperty = new ArrayList();
    
    headerProperty.add(new HeaderProperty("guid", "value..."));
    
    androidHttpTransport.call(soap_action,envelope,headerProperty); 
    

    tried the above example and would add a header section but wasn't compatible with .net.

    My piece of code works but requires KSoap2 version ksoap2-android-assembly-2.5.7-jar-with-dependencies.jar from here: ksoap jar file location

    right click and view raw file and click save as.

    Thanks for all the help in the forums as pointed me in the right direction...

提交回复
热议问题