سلام
ما از سرویس soap مگفا برای ارسال اس ام اس میخوایم استفاده کنیم اس ام اس ارسال میشه ولی result که شامل کد شناسه پیام هست رو به من نمیدهد. پشتیبانی پاسخگو نبود هرچقدر تیکت زدیم من نمونه کد های خودم رو میذارم لطفا اگر کسی همچین تجربه ای داشت و حلش کرد کمک کنه


string[] messageBodies = { message };
string[] recipientNumbers = mobile;
string[] senderNumbers = { "3000" };
int[] encodings;
string[] udhs;
int[] messageClasses;
int[] priorities;
long[] checkingMessageIds = { 1234 };
BasicHttpBinding basicHttpBinding = null;
EndpointAddress endpointAddress = null;
ChannelFactory<ServiceReference1.SoapSmsQueuableIm plChannel> factory = null;
ServiceReference1.SoapSmsQueuableImplChannel serviceProxy = null;

try
{
basicHttpBinding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
basicHttpBinding.Security.Transport.ClientCredenti alType = HttpClientCredentialType.Basic;
endpointAddress = new EndpointAddress(new Uri("https://sms.magfa.com/services/urn:SOAPSmsQueue?wsdl"));
factory = new ChannelFactory<ServiceReference1.SoapSmsQueuableIm plChannel>(basicHttpBinding, endpointAddress);

factory.Credentials.UserName.UserName = "**";
factory.Credentials.UserName.Password = "****";
serviceProxy = factory.CreateChannel();

//((ICommunicationObject)serviceProxy).Open();
//var opContext = new OperationContext((IClientChannel)serviceProxy);
//var prevOpContext = OperationContext.Current; // Optional if there's no way this might already be set
//OperationContext.Current = opContext;

using (var scope = new OperationContextScope((IContextChannel)serviceProx y))
{
var result = await serviceProxy.enqueueAsync("magfa", messageBodies, recipientNumbers, senderNumbers ,new int[] { 0 },
new string[] { "" },
new int[] { 0 },
new int[] { 0 }, checkingMessageIds).ConfigureAwait(false););

}

factory.Close();
((ICommunicationObject)serviceProxy).Close();
}
catch (MessageSecurityException ex)
{
throw;
}
catch (Exception ex)
{
throw;
}



از این روش هم امتحان شد و باز هم نتیجه نداد :

ServiceReference1.SoapSmsQueuableImplClient client = new ServiceReference1.SoapSmsQueuableImplClient();
//GetBindingForEndpoint returns a BasicHttpBinding
var httpBinding = client.Endpoint.Binding as BasicHttpBinding;
httpBinding.Security.Transport.ClientCredentialTyp e = HttpClientCredentialType.Basic;
client.ClientCredentials.HttpDigest.ClientCredenti al = new NetworkCredential("***", "*****");
var result2 = await client.enqueueAsync("***");