Temporary token acquired after auth being used only once with first phase of async request. after that token was deleted from storage file and not included in http header.
[ec2-user@ FNStest]$ ruby test.rb
D, [2019-09-17T10:06:55.902457 #12347] DEBUG -- : HTTPI /peer GET request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:06:56.581077 #12347] INFO -- : SOAP request: https://openapi.nalog.ru:8090/open-api/AuthService/0.1
I, [2019-09-17T10:06:56.581240 #12347] INFO -- : SOAPAction: "urn:GetMessageRequest", Content-Type: text/xml;charset=UTF-8, Content-Length: 928
D, [2019-09-17T10:06:56.581344 #12347] DEBUG -- : <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiMessageConsumerService/1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiMessageConsumerService/types/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn://x-artefacts-gnivc-ru/ais3/kkt/AuthService/types/1.0" targetNamespace="urn://x-artefacts-gnivc-ru/ais3/kkt/AuthService/types/1.0">soap:Bodyins0:GetMessageRequestins0:Messagetns:AuthRequesttns:AuthAppInfotns:MasterTokenTOKENWASHERE_TOKENWASHERE</tns:MasterToken></tns:AuthAppInfo></tns:AuthRequest></ins0:Message></ins0:GetMessageRequest></soap:Body></soap:Envelope>
D, [2019-09-17T10:06:56.581545 #12347] DEBUG -- : HTTPI /peer POST request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:06:58.182642 #12347] INFO -- : SOAP response (status 200)
D, [2019-09-17T10:06:58.182728 #12347] DEBUG -- : <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Body<tns:AuthResponse xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageProviderService/types/1.0" xmlns:tns="urn://x-artefacts-gnivc-ru/ais3/kkt/AuthService/types/1.0">tns:Resulttns:Token5b73e45531e640309b2774d2e59ada48</tns:Token>tns:ExpireTime2019-09-17T14:06:57 +03:00</tns:ExpireTime> </tns:Result></tns:AuthResponse></soap:Body></soap:Envelope>
D, [2019-09-17T10:06:58.184691 #12347] DEBUG -- : HTTPI /peer GET request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:06:58.735418 #12347] INFO -- : SOAP request: https://openapi.nalog.ru:8090/open-api/ais3/KktService/0.1
I, [2019-09-17T10:06:58.735576 #12347] INFO -- : FNS-OpenApi-Token: 5b73e45531e640309b2774d2e59ada48, FNS-OpenApi-UserToken: ZGVmYXVsdF91c2Vy, SOAPAction: "urn:SendMessageRequest", Content-Type: text/xml;charset=UTF-8, Content-Length: 1042
D, [2019-09-17T10:06:58.735691 #12347] DEBUG -- : <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/types/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn://x-artefacts-gnivc-ru/ais3/kkt/KktTicketService/types/1.0" targetNamespace="urn://x-artefacts-gnivc-ru/ais3/kkt/KktTicketService/types/1.0">soap:Bodyins0:SendMessageRequestins0:Messagetns:CheckTicketRequesttns:CheckTicketInfotns:Fn9280440300264061</tns:Fn>tns:FiscalDocumentId004560</tns:FiscalDocumentId>tns:FiscalSign2580739101</tns:FiscalSign>tns:Date2019-08-19T09:11:00</tns:Date>tns:Sum2340.89</tns:Sum>tns:TypeOperation1</tns:TypeOperation></tns:CheckTicketInfo></tns:CheckTicketRequest></ins0:Message></ins0:SendMessageRequest></soap:Body></soap:Envelope>
D, [2019-09-17T10:06:58.735905 #12347] DEBUG -- : HTTPI /peer POST request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:06:59.356849 #12347] INFO -- : SOAP response (status 200)
D, [2019-09-17T10:06:59.357010 #12347] DEBUG -- : <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Body33ee475e-5914-46de-a100-3713f777f0df</soap:Body></soap:Envelope>
D, [2019-09-17T10:06:59.357886 #12347] DEBUG -- : HTTPI /peer GET request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:07:00.446634 #12347] INFO -- : SOAP request: https://openapi.nalog.ru:8090/open-api/ais3/KktService/0.1
I, [2019-09-17T10:07:00.446814 #12347] INFO -- : FNS-OpenApi-Token: , FNS-OpenApi-UserToken: ZGVmYXVsdF91c2Vy, SOAPAction: "urn:GetMessageRequest", Content-Type: text/xml;charset=UTF-8, Content-Length: 695
D, [2019-09-17T10:07:00.446924 #12347] DEBUG -- : <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/types/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/types/1.0">soap:Bodyins0:GetMessageRequesttns:MessageId33ee475e-5914-46de-a100-3713f777f0df</tns:MessageId></ins0:GetMessageRequest></soap:Body></soap:Envelope>
D, [2019-09-17T10:07:00.447112 #12347] DEBUG -- : HTTPI /peer POST request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:07:01.065793 #12347] INFO -- : SOAP response (status 500)
D, [2019-09-17T10:07:01.065986 #12347] DEBUG -- : <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Bodysoap:Faultsoap:ServerНе удалось обнаружить требуемые заголовки в переданном запросе</soap:Fault></soap:Body></soap:Envelope>
/home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/response.rb:85:in raise_soap_and_http_errors!': (soap:Server) Не удалось обнаружить требуемые заголовки в переданном запросе (Savon::SOAPFault) from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/response.rb:14:in initialize'
from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/operation.rb:72:in new' from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/operation.rb:72:in create_response'
from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/operation.rb:58:in call' from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/client.rb:36:in call'
from /home/ec2-user/.rvm/gems/ruby-2.4.6/bundler/gems/fnsapi-618f95660dff/lib/fnsapi/get_message_service.rb:8:in call' from /home/ec2-user/.rvm/gems/ruby-2.4.6/bundler/gems/fnsapi-618f95660dff/lib/fnsapi/kkt_service.rb:40:in parse_message'
from /home/ec2-user/.rvm/gems/ruby-2.4.6/bundler/gems/fnsapi-618f95660dff/lib/fnsapi/kkt_service.rb:12:in check_data' from /home/ec2-user/.rvm/gems/ruby-2.4.6/bundler/gems/fnsapi-618f95660dff/lib/fnsapi.rb:25:in check_data'
from test.rb:17:in `
'
Temporary token acquired after auth being used only once with first phase of async request. after that token was deleted from storage file and not included in http header.
[ec2-user@ FNStest]$ ruby test.rb
'D, [2019-09-17T10:06:55.902457 #12347] DEBUG -- : HTTPI /peer GET request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:06:56.581077 #12347] INFO -- : SOAP request: https://openapi.nalog.ru:8090/open-api/AuthService/0.1
I, [2019-09-17T10:06:56.581240 #12347] INFO -- : SOAPAction: "urn:GetMessageRequest", Content-Type: text/xml;charset=UTF-8, Content-Length: 928
D, [2019-09-17T10:06:56.581344 #12347] DEBUG -- : <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiMessageConsumerService/1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiMessageConsumerService/types/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn://x-artefacts-gnivc-ru/ais3/kkt/AuthService/types/1.0" targetNamespace="urn://x-artefacts-gnivc-ru/ais3/kkt/AuthService/types/1.0">soap:Bodyins0:GetMessageRequestins0:Messagetns:AuthRequesttns:AuthAppInfotns:MasterTokenTOKENWASHERE_TOKENWASHERE</tns:MasterToken></tns:AuthAppInfo></tns:AuthRequest></ins0:Message></ins0:GetMessageRequest></soap:Body></soap:Envelope>
D, [2019-09-17T10:06:56.581545 #12347] DEBUG -- : HTTPI /peer POST request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:06:58.182642 #12347] INFO -- : SOAP response (status 200)
D, [2019-09-17T10:06:58.182728 #12347] DEBUG -- : <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Body<tns:AuthResponse xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageProviderService/types/1.0" xmlns:tns="urn://x-artefacts-gnivc-ru/ais3/kkt/AuthService/types/1.0">tns:Resulttns:Token5b73e45531e640309b2774d2e59ada48</tns:Token>tns:ExpireTime2019-09-17T14:06:57 +03:00</tns:ExpireTime> </tns:Result></tns:AuthResponse></soap:Body></soap:Envelope>
D, [2019-09-17T10:06:58.184691 #12347] DEBUG -- : HTTPI /peer GET request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:06:58.735418 #12347] INFO -- : SOAP request: https://openapi.nalog.ru:8090/open-api/ais3/KktService/0.1
I, [2019-09-17T10:06:58.735576 #12347] INFO -- : FNS-OpenApi-Token: 5b73e45531e640309b2774d2e59ada48, FNS-OpenApi-UserToken: ZGVmYXVsdF91c2Vy, SOAPAction: "urn:SendMessageRequest", Content-Type: text/xml;charset=UTF-8, Content-Length: 1042
D, [2019-09-17T10:06:58.735691 #12347] DEBUG -- : <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/types/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn://x-artefacts-gnivc-ru/ais3/kkt/KktTicketService/types/1.0" targetNamespace="urn://x-artefacts-gnivc-ru/ais3/kkt/KktTicketService/types/1.0">soap:Bodyins0:SendMessageRequestins0:Messagetns:CheckTicketRequesttns:CheckTicketInfotns:Fn9280440300264061</tns:Fn>tns:FiscalDocumentId004560</tns:FiscalDocumentId>tns:FiscalSign2580739101</tns:FiscalSign>tns:Date2019-08-19T09:11:00</tns:Date>tns:Sum2340.89</tns:Sum>tns:TypeOperation1</tns:TypeOperation></tns:CheckTicketInfo></tns:CheckTicketRequest></ins0:Message></ins0:SendMessageRequest></soap:Body></soap:Envelope>
D, [2019-09-17T10:06:58.735905 #12347] DEBUG -- : HTTPI /peer POST request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:06:59.356849 #12347] INFO -- : SOAP response (status 200)
D, [2019-09-17T10:06:59.357010 #12347] DEBUG -- : <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Body33ee475e-5914-46de-a100-3713f777f0df</soap:Body></soap:Envelope>
D, [2019-09-17T10:06:59.357886 #12347] DEBUG -- : HTTPI /peer GET request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:07:00.446634 #12347] INFO -- : SOAP request: https://openapi.nalog.ru:8090/open-api/ais3/KktService/0.1
I, [2019-09-17T10:07:00.446814 #12347] INFO -- : FNS-OpenApi-Token: , FNS-OpenApi-UserToken: ZGVmYXVsdF91c2Vy, SOAPAction: "urn:GetMessageRequest", Content-Type: text/xml;charset=UTF-8, Content-Length: 695
D, [2019-09-17T10:07:00.446924 #12347] DEBUG -- : <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/types/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn://x-artefacts-gnivc-ru/inplat/servin/OpenApiAsyncMessageConsumerService/types/1.0">soap:Bodyins0:GetMessageRequesttns:MessageId33ee475e-5914-46de-a100-3713f777f0df</tns:MessageId></ins0:GetMessageRequest></soap:Body></soap:Envelope>
D, [2019-09-17T10:07:00.447112 #12347] DEBUG -- : HTTPI /peer POST request to openapi.nalog.ru (net_http)
I, [2019-09-17T10:07:01.065793 #12347] INFO -- : SOAP response (status 500)
D, [2019-09-17T10:07:01.065986 #12347] DEBUG -- : <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Bodysoap:Faultsoap:ServerНе удалось обнаружить требуемые заголовки в переданном запросе</soap:Fault></soap:Body></soap:Envelope>
/home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/response.rb:85:in
raise_soap_and_http_errors!': (soap:Server) Не удалось обнаружить требуемые заголовки в переданном запросе (Savon::SOAPFault) from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/response.rb:14:ininitialize'from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/operation.rb:72:in
new' from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/operation.rb:72:increate_response'from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/operation.rb:58:in
call' from /home/ec2-user/.rvm/gems/ruby-2.4.6/gems/savon-2.12.0/lib/savon/client.rb:36:incall'from /home/ec2-user/.rvm/gems/ruby-2.4.6/bundler/gems/fnsapi-618f95660dff/lib/fnsapi/get_message_service.rb:8:in
call' from /home/ec2-user/.rvm/gems/ruby-2.4.6/bundler/gems/fnsapi-618f95660dff/lib/fnsapi/kkt_service.rb:40:inparse_message'from /home/ec2-user/.rvm/gems/ruby-2.4.6/bundler/gems/fnsapi-618f95660dff/lib/fnsapi/kkt_service.rb:12:in
check_data' from /home/ec2-user/.rvm/gems/ruby-2.4.6/bundler/gems/fnsapi-618f95660dff/lib/fnsapi.rb:25:incheck_data'from test.rb:17:in `