Reputation: 3098
I never seen this kind of error , when I send request I received this message:
anyType{SendResultCode=Unsuccessfull; Error=Value cannot be null. Parameter name: address; }
I don't have any address parameter.
Here is code from java
String methodName = "SendMail";
String namespace = "http://www.xxxxxxxx.ge";
String soapAction = "http://www.xxxxxxxx.ge/SendMail";
String url = "http:///xx.xxx.xx.xxx/SmsService/SmsSendingService.asmx";
SoapObject soapObject = new SoapObject(namespace, methodName);
soapObject.addProperty("from","someaddress");
soapObject.addProperty("to","someaddress");
soapObject.addProperty("cc","someaddress");
soapObject.addProperty("bcc","someaddress");
soapObject.addProperty("subject","Message From App");
soapObject.addProperty("replyTo","someaddress");
soapObject.addProperty("messageBody","Some text here");
soapObject.addProperty("isFormatHtml",true);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(soapObject);
HttpTransportSE conn = new HttpTransportSE(url);
conn.call(soapAction, envelope); //send request
SoapObject result=(SoapObject)envelope.getResponse();
UPDATE
I found my problem, it was little tricky,
String soapAction = "http://www.xxxxxxxx.ge/SendMail"
this URL need '/' at the end like this:
String soapAction = "http://www.xxxxxxxx.ge/SendMail/"
So now everything works fine.
Upvotes: 2
Views: 277
Reputation: 1765
You did not add the Address parameter in SoapObject
soapObject.addProperty("address","#fdfdsf asdasd asdasds");
Upvotes: 1