<legend id='JIi8Q'><style id='JIi8Q'><dir id='JIi8Q'><q id='JIi8Q'></q></dir></style></legend>
    <i id='JIi8Q'><tr id='JIi8Q'><dt id='JIi8Q'><q id='JIi8Q'><span id='JIi8Q'><b id='JIi8Q'><form id='JIi8Q'><ins id='JIi8Q'></ins><ul id='JIi8Q'></ul><sub id='JIi8Q'></sub></form><legend id='JIi8Q'></legend><bdo id='JIi8Q'><pre id='JIi8Q'><center id='JIi8Q'></center></pre></bdo></b><th id='JIi8Q'></th></span></q></dt></tr></i><div id='JIi8Q'><tfoot id='JIi8Q'></tfoot><dl id='JIi8Q'><fieldset id='JIi8Q'></fieldset></dl></div>

    <small id='JIi8Q'></small><noframes id='JIi8Q'>

      <bdo id='JIi8Q'></bdo><ul id='JIi8Q'></ul>
    1. <tfoot id='JIi8Q'></tfoot>

      1. Web 服务 Http 身份验证 - Android 上的 KSOAP2

        时间:2023-07-08

          1. <small id='CLsaj'></small><noframes id='CLsaj'>

            <tfoot id='CLsaj'></tfoot>
            <i id='CLsaj'><tr id='CLsaj'><dt id='CLsaj'><q id='CLsaj'><span id='CLsaj'><b id='CLsaj'><form id='CLsaj'><ins id='CLsaj'></ins><ul id='CLsaj'></ul><sub id='CLsaj'></sub></form><legend id='CLsaj'></legend><bdo id='CLsaj'><pre id='CLsaj'><center id='CLsaj'></center></pre></bdo></b><th id='CLsaj'></th></span></q></dt></tr></i><div id='CLsaj'><tfoot id='CLsaj'></tfoot><dl id='CLsaj'><fieldset id='CLsaj'></fieldset></dl></div>

              <bdo id='CLsaj'></bdo><ul id='CLsaj'></ul>

                  <tbody id='CLsaj'></tbody>
                  <legend id='CLsaj'><style id='CLsaj'><dir id='CLsaj'><q id='CLsaj'></q></dir></style></legend>

                  本文介绍了Web 服务 Http 身份验证 - Android 上的 KSOAP2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我已经在网上搜索了一段时间,但无法为我的问题找到合适的解决方案.这篇文章也没有真正的帮助,因为使用的类和方法在 ksoap2 for android 中不存在:使用 KSOAP for android 的基本 HTTP 身份验证

                  I have been searching the web for a while now, but wasn't able to find a appropriate solution for my problem. This article does not really help either, because the classes and methods used are not present in ksoap2 for android: Basic HTTP authentication using KSOAP for android

                  我正在尝试访问我在 sap soa 管理器中设置的 SAP web 服务.Web 服务需要在 http 标头中进行基本身份验证.通过soapUI访问这个web服务是没有问题的,因为可以在那里设置http认证.

                  I am trying to access a SAP webservice, which I set up in the sap soa manager. The webservice requires basic authentication in the http header. Accessing this web service by soapUI is not a problem, because it is possible to set up http authentication there.

                  我的问题:我想使用 android 设备访问 Web 服务,并且我想使用 KSOAP2 for Android,因为我已经有一些使用该库的经验.我的问题是我不知道如何对 Web 服务进行身份验证?

                  My Problem: I want to access the web service with a android device and I want to use KSOAP2 for Android because I already have some experience with that libary. My problem is that I don't know how to authenticate to the webservice?

                  有没有人遇到过类似的问题并且知道如何解决?如果您能帮助我,我将不胜感激!

                  Has anyone had a similar problem and knows how to solve it? I would be grateful if you could help me!

                  推荐答案

                  希望还不算太晚.这就是我使用 KSOAP 访问 SAP Web 服务的方式:

                  I hope it is not too late. That is how I access SAP webservice with KSOAP:

                  List<HeaderProperty> headers = new ArrayList<HeaderProperty>();
                  headers.add(new HeaderProperty("Authorization", "Basic XXXXXXXXXX"));
                  HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
                  Object result = null;               
                  final Object response = androidHttpTransport.call(SOAP_ACTION, envelope, headers);
                  

                  将 XXXXXXXX 替换为您的用户名和密码的编码哈希.要获得它,只需查看soapUI 原始标头请求.希望能帮助到你.

                  Replace the XXXXXXXX with the encoded hash of your username and password. To get it just look in soapUI raw header request. Hope it helps.

                  这篇关于Web 服务 Http 身份验证 - Android 上的 KSOAP2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:带有自定义标头的 Android WebView 发布请求 下一篇:加载桌面版 WKWebView iOS 9

                  相关文章

                  <tfoot id='zT3BK'></tfoot>

                    1. <legend id='zT3BK'><style id='zT3BK'><dir id='zT3BK'><q id='zT3BK'></q></dir></style></legend>

                      <small id='zT3BK'></small><noframes id='zT3BK'>

                        <bdo id='zT3BK'></bdo><ul id='zT3BK'></ul>
                    2. <i id='zT3BK'><tr id='zT3BK'><dt id='zT3BK'><q id='zT3BK'><span id='zT3BK'><b id='zT3BK'><form id='zT3BK'><ins id='zT3BK'></ins><ul id='zT3BK'></ul><sub id='zT3BK'></sub></form><legend id='zT3BK'></legend><bdo id='zT3BK'><pre id='zT3BK'><center id='zT3BK'></center></pre></bdo></b><th id='zT3BK'></th></span></q></dt></tr></i><div id='zT3BK'><tfoot id='zT3BK'></tfoot><dl id='zT3BK'><fieldset id='zT3BK'></fieldset></dl></div>