Created
January 23, 2014 11:29
-
-
Save adamdilek/8577095 to your computer and use it in GitHub Desktop.
TTmesaj Ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = Savon::Client.new(wsdl: "http://ws.ttmesaj.com/service1.asmx?WSDL") | |
message = { | |
"username" => "kullanici adi", | |
"password" => "sifre", | |
"numbers" => "Numara", | |
"message" => "Deneme", | |
"origin" => "origin", | |
"sd" => "", | |
"ed" => "" } | |
response = client.call( :send_single_sms, message: message) | |
#Response | |
I, [2014-01-23T13:17:47.494957 #57325] INFO -- : SOAP request: http://ws.ttmesaj.com/service1.asmx | |
I, [2014-01-23T13:17:47.495038 #57325] INFO -- : SOAPAction: "http://tempuri.org/sendSingleSMS", Content-Type: text/xml;charset=UTF-8, Content-Length: 524 | |
D, [2014-01-23T13:17:47.495102 #57325] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://tempuri.org/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:sendSingleSMS><tns:username>kullanici adi</tns:username><tns:password>sifre</tns:password><tns:numbers>05548732936</tns:numbers><tns:message>Deneme</tns:message><tns:origin>origin</tns:origin><tns:sd></tns:sd><tns:ed></tns:ed></tns:sendSingleSMS></env:Body></env:Envelope> | |
D, [2014-01-23T13:17:47.495247 #57325] DEBUG -- : HTTPI POST request to ws.ttmesaj.com (net_http) | |
I, [2014-01-23T13:17:47.559489 #57325] INFO -- : SOAP response (status 200) | |
D, [2014-01-23T13:17:47.559580 #57325] DEBUG -- : <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><sendSingleSMSResponse xmlns="http://tempuri.org/"><sendSingleSMSResult>WP:00 Kullanıcı adı yada şifreniz hatalı</sendSingleSMSResult></sendSingleSMSResponse></soap:Body></soap:Envelope> | |
#<Savon::Response:0x007fd9cb272f48 @http=#<HTTPI::Response:0x007fd9cb251078 @code=200, @headers={"cache-control"=>"private, max-age=0", "content-type"=>"text/xml; charset=utf-8", "server"=>"Microsoft-IIS/7.5", "x-aspnet-version"=>"4.0.30319", "x-powered-by"=>"ASP.NET", "date"=>"Thu, 23 Jan 2014 11:17:46 GMT", "cteonnt-length"=>"409", "content-length"=>"251"}, @raw_body="<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><sendSingleSMSResponse xmlns=\"http://tempuri.org/\"><sendSingleSMSResult>WP:00 Kullan\xC4\xB1c\xC4\xB1 ad\xC4\xB1 yada \xC5\x9Fifreniz hatal\xC4\xB1</sendSingleSMSResult></sendSingleSMSResponse></soap:Body></soap:Envelope>", @body="<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><sendSingleSMSResponse xmlns=\"http://tempuri.org/\"><sendSingleSMSResult>WP:00 Kullan\xC4\xB1c\xC4\xB1 ad\xC4\xB1 yada \xC5\x9Fifreniz hatal\xC4\xB1</sendSingleSMSResult></sendSingleSMSResponse></soap:Body></soap:Envelope>">, @globals=#<Savon::GlobalOptions:0x007fd9d1c609c8 @option_type=:global, @options={:encoding=>"UTF-8", :soap_version=>1, :namespaces=>{}, :logger=>#<Logger:0x007fd9d1c60950 @progname=nil, @level=0, @default_formatter=#<Logger::Formatter:0x007fd9d1c60928 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x007fd9d1c608d8 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @mutex=#<Logger::LogDevice::LogDeviceMutex:0x007fd9d1c608b0 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x007fd9d1c60860>>>>, :log=>true, :filters=>[], :pretty_print_xml=>false, :raise_errors=>true, :strip_namespaces=>true, :convert_response_tags_to=>#<Proc:0x007fd9d1c607e8@/Users/muhammetdilek/.rvm/gems/ruby-2.0.0-p247@payfit/gems/savon-2.3.3/lib/savon/options.rb:56 (lambda)>, :multipart=>false, :wsdl=>"http://ws.ttmesaj.com/service1.asmx?WSDL"}>, @locals=#<Savon::LocalOptions:0x007fd9d1b8a3f0 @option_type=:local, @options={:advanced_typecasting=>true, :response_parser=>:nokogiri, :multipart=>false, :message=>{"username"=>"kullanici adi", "password"=>"sifre", "numbers"=>"05548732936", "message"=>"Deneme", "origin"=>"origin", "sd"=>"", "ed"=>""}}>> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment