{Ошибка получена - процедура или функция 'ETI_User_Get_By_Email' ожидает параметр '@EMail_Address', который не был предоставлен.}
/ ****************************** /
Параметры WSDL -
EmailAddress - String
Transaction_Amount - Double
/ ******************************* /
Код Android JAVA ниже
открытый класс MainActivity расширяет AppCompatActivity {
EditText textBox1, textbox2;
Button button;
TextView text;
String URL = "hidden";
String NAMESPACE = "hidden";
String SOAP_ACTION = "hidden";
String METHOD_NAME = "VerifyETIWallet";
String PARAMETER_NAME1 = "EmailAddress";
String PARAMETER_NAME2 = "Transaction_Amount";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textBox1 = (EditText)findViewById(R.id.textbox1);
textbox2 = (EditText)findViewById(R.id.textbox2);
button = (Button)findViewById(R.id.button);
text = (TextView)findViewById(R.id.text);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new CallWebService().execute(textBox1.getText().toString(),textbox2.getText().toString());
}
});
}
class CallWebService extends AsyncTask<String, Void, String> {
@Override
protected void onPostExecute(String s) {
text.setText("Result = " + s);
}
@Override
protected String doInBackground(String... params) {
String result = "";
SoapObject soapObject = new SoapObject(NAMESPACE, METHOD_NAME);
PropertyInfo propertyInfo1 = new PropertyInfo();
propertyInfo1.setName(PARAMETER_NAME1);
propertyInfo1.setValue(params[0]);
propertyInfo1.setType(String.class);
PropertyInfo propertyInfo2 = new PropertyInfo();
propertyInfo2.setName(PARAMETER_NAME2);
propertyInfo2.setValue(params[1]);
propertyInfo2.setType(Double.class);
soapObject.addProperty(propertyInfo1);
soapObject.addProperty(propertyInfo2);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(soapObject);
HttpTransportSE httpTransportSE = new HttpTransportSE(URL);
try {
httpTransportSE.call(SOAP_ACTION, envelope);
SoapPrimitive soapPrimitive = (SoapPrimitive)envelope.getResponse();
result = soapPrimitive.toString();
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
}
}