Sending message:In the Ruby on Rails implementation using Soap4r gem, the SOAP Toolkit has beenused together with ruby Script Version 1.8.6 . The SOAP Toolkit can be downloaded from http://dev.ctor.org/soap4r.
The code in ruby is listed here.
require 'rubygems'gem 'soap4r'require 'soap/rpc/driver'require "soap/wsdlDriver"wsdl_url="http://us.ipx.com/api/services2/SmsApi51?wsdl"soap = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driverh=Hash.newh['originatingAddress']= short_code #provided by ericssonh['originatorTON'] = '0'h['userDataHeader'] =Nh['DCS'] = '17'h['PID'] = '-1'h['relativeValidityTime'] = '-1'h['deliveryTime'] =Nh['statusReportFlags'] = '0'h['accountName'] = Nh['tariffClass'] = 'USD0'h['VAT'] ='-1'h['referenceId'] = Nh['contentCategory'] =Nh['contentMetaData'] =Nh['username']= USERNAME # provided by IPXh['password'] = PASSWORD # provided by IPXh['correlationId'] = sms.correlation_id # set by user sending messageh['destinationAddress'] = sms.destination_address # destination addessh['userData'] = sms.message #actual messageresponce=soap.send(h)puts responceYou can then find the responce codes and reason code as per the table listed in part 2.
Receiving message:
User have to set the callback url from its IPX account. on which the received message will be forwarded by the IPX. The variables those will be received are listed in part 2 of this blog.

0 comments:
Post a Comment