c# - 在 android studio 上调用 HTTPS 的 web SOAP Api 并得到 500 错误
问题描述
我正在尝试在具有 HTTPS 协议的 android studio 上调用 SOAP api,我收到错误 500,你们的任何帮助都会让我开心我已经在这个问题上浪费了太多时间,没有从我不知道的任何地方获得任何帮助我做错名称空间的地方是= HTTP 如果有人可以,请打开基本链接
https://183.87.134.37/DemoRitmanpayinapi/RitmanPay.svc?wsdl // base URL to get data
public static final String NAMESPACE = "http://tempuri.org/";
public static final String URL = "https://183.87.134.37/DemoRitmanpayinapi/RitmanPay.svc?wsdl";
public static final String SOAP_ACTION = "Ser/IRitmanPay/GetIDType";
public static final String METHOD_NAME = "GetIDType";
这是名称空间和其他信誉
public class getTransferRate extends AsyncTask<String , Object , String> {
@Override
protected void onPreExecute() {
super.onPreExecute();
progressBar.setVisibility(View.VISIBLE);
}
@Override
protected String doInBackground(String... strings) {
SoapObject soapObject = new SoapObject(NAMESPACE , METHOD_NAME);
soapObject.addProperty("PartnerCode" , "161333");
soapObject.addProperty("UserName" , "WAMOBILEAPP");
soapObject.addProperty("UserPassword" , "WAMOBILEAPP");
soapObject.addProperty("CountryShortName" , "ind");
SoapSerializationEnvelope sr = new SoapSerializationEnvelope(SoapEnvelope.VER11);
sr.dotNet = true;
sr.bodyOut = soapObject;
sr.setOutputSoapObject(soapObject);
// HttpsTransportSE se = new HttpsTransportSE(URL , 30000);
HttpTransportSE transportSE = new HttpTransportSE(URL , 30000);
try {
transportSE.call(SOAP_ACTION , sr);
Log.e( "doInBackground: ", (String) sr.getResponse());
}catch ( Exception e) {
e.printStackTrace();
Log.e("Ex" , e.toString());
}
return null;
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
progressBar.setVisibility(View.GONE);
}
}
谁能帮我解决我的问题
解决方案
推荐阅读
- c++ - 如何随时刷新功能区 UI?
- mysql - MySQL每天定位第一个和最后一个事件
- php - 使用 curl 获取成功消息后更新数据库中的值
- javascript - 要创建的 JavaScript 函数以根据一些信息计算价格(示例 - 商店优惠)
- python - 将动态创建的名称附加到 UI 类中的类变量
- javascript - 编辑页面的AngularJs表单验证
- angular - mat autocomplete - 如何设置未找到的选项
- python - Pylint 错误:模块 Pythoncom 没有成员
- symfony4 - 在可使用 PHP 版本 7.0.2 安装的版本中找不到稳定的包 Symfony/skeleton
- python - 为什么你不必在 Python 中返回对象?