AccountService.GetSentMessages gives pessimistic results...

Help with the Esendex API

AccountService.GetSentMessages gives pessimistic results...

Postby BillFR » Tue Oct 19, 2010 3:02 pm

Hello,

I am calling the AccountService.GetSentMessages method from a VB.Net 2008. At the same time, I am looking at the corresponding "Sent Items" from our customer's Esendex Web console.

Messages which appear as "Delivered" in the Web console appear as "Failed" in the "AccountService.message.status" field.
Messages which appear with a valid "Delivered at" date/time in the Web console appear as "00:00:00" in the "receivedat" field.

Example:

Message details, seen from the Web console (URL=https://www.esendex.com/echo/Message/dffbed20-b13f-4c3d-b6a3-xxxxxxxxxxxx):

From xxx
To 3366xx446xx
Type SMS
Message Something
Direction Outbound
Status Delivered
Last updated at 13:30:00
Sent at 13:30:41
Delivered at 13:30:00
Parts 1


Fields of a message returned by AccountService.GetSentMessages:
id=dffbed20-b13f-4c3d-b6a3-xxxxxxxxxxxx,
recipient=3366xx446xx,
status=Failed
sent at=19/10/2010 13:30:41,
received at=00:00:00


Code snippet:
Code: Select all
Module Module1
   Sub Main()
      Dim myAccountService As New WS_AccountService.AccountServiceSoapClient
      Dim myMessengerHeader As New WS_AccountService.MessengerHeader
      Dim myMessages() As WS_AccountService.message
      Dim iMessageLimit As Integer
      Dim iNbMessages As Integer

      myMessengerHeader.Username = "xxx"
      myMessengerHeader.Password = "yyy"
      myMessengerHeader.Account = "zzz"

      iMessageLimit = myAccountService.GetMessageLimit(myMessengerHeader)
      myMessages = myAccountService.GetSentMessages(myMessengerHeader, 2010, 10)
      iNbMessages = myMessages.GetLength(0)

      For Each myMessage As WS_AccountService.message In myMessages
         Console.WriteLine("id=" & myMessage.id.ToString & ", recipient=" & myMessage.recipient & ", status=" & myMessage.status.ToString & ", sent at =" & myMessage.sentat & ", received at " & myMessage.receivedat)
      Next
   End Sub

End Module


Is this working as expected?
Is there a workaround, which would help me retrieve the actual status and received date/time of a message?

Thanks in advance for sharing your valuable experience in the matter.

Regards,

GB
BillFR
 
Posts: 2
Joined: Tue Oct 19, 2010 2:35 pm

Return to API



cron
© Esendex Ltd 2010
Company Registration Number: 04217280