DailySalesReportLLSRQ returns TICKETING DATABASE ERROR - sabre

Request to DailySalesReport service in development enviromant:
<ns6:DailySalesReportRQ Version="2.0.0"
xmlns:ns1="http://www.ebxml.org/namespaces/messageHeader"
xmlns:ns2="http://www.w3.org/1999/xlink"
xmlns:ns3="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns4="http://schemas.xmlsoap.org/ws/2002/12/secext"
xmlns:ns6="http://webservices.sabre.com/sabreXML/2011/10"
xmlns:ns7="http://services.sabre.com/STL/v01"
xmlns:ns8="http://services.sabre.com/STL_Header/v120" xmlns:ns9="http://www.w3.org/2000/09/xmldsig#">
<ns6:SalesReport PseudoCityCode="5VYJ" StartDate="2020-02-13"/>
</ns6:DailySalesReportRQ>
Receive: ERR.SWS.HOST.ERROR_IN_RESPONSE with "TICKETING DATABASE ERROR"
What does the TICKET DATABASE ERROR mean and how can I fix it?

First of all u must check if the date u request have any doc issued.
Below the RAW request for the service="DailySalesReportLLSRQ" which i do now!
POST https://webservices.havail.sabre.com/websvc HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "DailySalesReportLLSRQ"
Content-Length: 1503
Host: webservices.havail.sabre.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Shared/IDL:IceSess/SessMgr:1.0.IDL/Common/!ICESMS/RESA!ICESMSLB/RES.LB!-2917635922269276274!1343176!0!1
soapui.gwaereo#cvccorp.com.br
https://webservices.havail.sabre.com/websvc
_
soapui.gwaereo#cvccorp.com.br
DailySalesReport
DailySalesReportLLSRQ
3912336541697520620
2020-02-21T15:02:49

https://developer.sabre.com/eticketcouponllsrq mentions:
Common errors
TICKETING DATABASE ERROR:
The ticket has been issued from PCC XXX and It can be viewed only from this PCC.
Please remove the conjunctive ticket number in your request and you should be able to get a good response.
Carrier does not seem to have the image of this ticket available.
Seems the service is orchestrated so it is impossible to identify whi PNR / ticket causes a trouble. You need to contact Sabre support and provide a request body + a date of error.

Related

ASP.NET IIS 10 service .svc error 406 Not Acceptable

i have a service .svc hosted on a machine whit windows server 2019 on IIS 10,
im tryng to send a POST request whit postman sending a json whit the following headers:
Postman-Token: calculated when request is sent>
Content-Lenght: calculated when request is sent
Host: calculated when request is sent
Accept: * / *
Content-Type: application/json
and this in the body:
{
"orderNumber": "12345",
"idTransaction":"1",
"authorization":"auth",
"amount":"14.95",
"paymentDate":"2020-01-01",
"currency":"euro",
"resultCode": "ok"
}
the service responds correctly and read the json but the status is "406 Not Accettable"
as you can see i have placed the Accept header whit value "* / *" that mean accept every kind of content-type and that is the response that i get
response headers:
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Mon, 04 Jan 2021 09:54:27 GMT
Content-Length: 69
response body
"Not found any payment whit numeroOrdine=12345."
the server/service read the json and respond corretly couse the number of order 12345 was an example and dosent exist,
but whit status code 406 not accetable,
i tryed also to add the header Accept-Charset: UTF-8 in the request but the situation dosent change,
i checked on iis on the server and after select on the mime type list i can that application/json is in the list,
Mime type IIS
maybe i have to enable it somewhere else? Specify the mime type in the web.config file?
or it could be something else?
thanks in advance

Azure storage REST Api call - Invalid Header x-ms-version

Following the advice from this question, and the API documentation (e.g., Blob service REST API), I have an x-ms-version specified in the header. My code works against Azurite, and is authenticated by Azure, but returns a
HTTP/1.1 400 The value for one of the HTTP headers is not in the correct format.
The xml body has more details:
<Error>
<Code>InvalidHeaderValue</Code>
<Message>The value for one of the HTTP headers is not in the correct format.
RequestId:d39d2cad-301e-009e-1546-3940de000000
Time:2018-08-21T11:58:14.2369850Z</Message>
<HeaderName>x-ms-version</HeaderName>
<HeaderValue>2017-01-19</HeaderValue>
</Error>
My guess is it is not the format, but the value. How do I find the right value, or even a list of all possible values that I can try running one at a time, or does someone know that this is a misleading error, and I need to be looking somewhere else?
While playing with this a little more a x-ms-version=2015-02-21 generates.
HTTP/1.1 400 One of the request inputs is out of range.
Here is the request:
-> GET /mike-ecu-test?restype=container&comp=list HTTP/1.1
-> Host: mikeecutest.blob.core.windows.net
-> User-Agent: libcurl/7.54.0 r-curl/3.1 httr/1.3.1
-> Accept-Encoding: gzip, deflate
-> Accept: application/json, text/xml, application/xml, */*
-> Authorization: SharedKey mikeecutest/mike-ecu-test:9j5XodD9OIslzMnzHXiU7c76EpOXFi5jeQITbHk/Y8g=
-> x-ms-date: Wed, 22 Aug 2018 01:35:06 GMT
-> x-ms-version: 2018-03-28
Here is the r code that generates it, credit for the code is answer 4 to this question
library("httr")
azureout <- function(){
url <- "http://mikeecutest.blob.core.windows.net/mike-ecu-test?restype=container&comp=list"
sak <- "dfgwhsfhsfg.....hjdkfgs=="
requestdate<-format(Sys.time(),"%a, %d %b %Y %H:%M:%S %Z", tz="GMT")
msapiversion<- "2018-03-28"
signaturestring<-paste0("GET",paste(rep("\n",12),collapse=""),
"x-ms-date:",requestdate,
"x-ms-version:",msapiversion,"\n",
"mikeecutest", "\n",
"comp:list","\n",
"restype:container")
headerstuff<-add_headers(Authorization=paste0("SharedKey mikeecutest/mike-ecu-test:",
RCurl::base64(digest::hmac(key=RCurl::base64Decode(sak, mode="raw"),
object=enc2utf8(signaturestring),
algo= "sha256", raw=TRUE))),
`x-ms-date`=requestdate,
`x-ms-version`=msapiversion)
content(GET(url,config = headerstuff, verbose() ))
}
Storage API version 2018-03-28 generates a:
<- HTTP/1.1 400 One of the request inputs is out of range.
Storage API version 2018-02-01 generates a:
<- HTTP/1.1 400 The value for one of the HTTP headers is not in the correct format.
You are right, 2017-01-19 is not a valid Storage service version, see all versions here. The documentation article Versioning for the Azure Storage services also suggests the latest API version at the top.
Recommend you to use the latest if there is no specific requirement.
Update
See three points to fix:
signaturestring<-paste0("GET",paste(rep("\n",12),collapse=""),
"x-ms-date:",requestdate,"\n", # miss "\n"
"x-ms-version:",msapiversion,"\n",
"/mikeecutest/mike-ecu-test", "\n", # should be /accountname/containername
"comp:list","\n",
"restype:container")
headerstuff<-add_headers(Authorization=paste0("SharedKey mikeecutest:", # only need accountname here
RCurl::base64(digest::hmac(key=RCurl::base64Decode(sak, mode="raw"),
object=enc2utf8(signaturestring),
algo= "sha256", raw=TRUE))),
`x-ms-date`=requestdate,
`x-ms-version`=msapiversion)
Package of REST API is always preferred, you can have a try at that provided by #Hong.
Consider using my AzureStor package which is an interface to file and blob storage on Azure. It handles authentication, including both access key and SAS, and admin details like getting the API version right.
install.packages("AzureStor")
library(AzureStor)
bl <- blob_endpoint("http://mikeecutest.blob.core.windows.net",
key="your_key")
cont <- blob_container(bl, "mike-ecu-test")
list_blobs(cont)
upload_blob(cont, "srcfile", "destblob") # blocked upload is supported for blob storage
download_blob(cont, "srcblob", "destfile")
newcontainer <- create_blob_container(bl, "newcontainer")
delete_blob_container(newcontainer)

Getting error 401 when using httr get

I am trying to use R to access a web page in our organization using httr GET.
However i get a message that "Access is denied due to invalid credentials".
I can do the desired action manually.
it seems that authorization is done automatically when i use internet explorer to get to the web site but the access is blocked when trying to do the same action through R.
This is how i'm trying to do it:
(I can't supply the exact address because it's an intranet address which can be used only inside the organization the same for the proxy address)
library(httr)
r <- GET(myurl, useproxy(myproxyid, 80), verbose())
-> GET http: //myurl
-> host: xxx
-> User-Agent : libcurl...
-> Accept-Encoding: gzip, deflate
-> Proxy-Connection: Keep-Alive
-> Accept: application/json, text/xml, application/xml, *.*
<- HTTP/1.1 401 Unauthorized
<- Content-Type: text/html
<- Server: Microsoft-IIS/8.5
<- WWW-Authenticate: Negotiate
<- WWW-Authenticate: NTLM
<- X-Powered-By: ASP.NET
r
Response [myurl]
Date
Status: 401
...
<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
....
I understand that i somehow have to send my credentials with my request.
is it possible to somehow use automatic authentication?
Thanks
Rafael
OK
I finally made it.
I had to supply authentication data to my get command like this:
library(httr)
r <- GET(myurl,
useproxy(myproxyid, 80),
verbose(),
authenticate(user = "myuserid", password = "mypassword", type = "ntlm"))
I hope it helps anybody
Thanks
Rafael

Change Response from HTTP Request sent by a program

I have a program that activate an chip for racing results. (Its just a piece of hardware).
I watch with Fiddler (Sniffing program) the in and outgoing traffic from my pc when I connect the chip with my computer.
The program sends the following HTTP Request:
POST http://example.com/index.php HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Content-Length: 185
Content-Type: application/x-www-form-urlencoded
Host: example.com
Pragma: no-cache
User-Agent: SomeProgram 1.2.3
Data==%0D%0AAjlFNEEw-SOMELONGSECRETKEY-RGAw%3D%3D%0D%0A
I receive the following response:
<?xml version="1.0" encoding="utf-8"?>
<message type="3" result="1" txid="someid" activationdate="" availablecredits="732" firstname="John" lastname="Doe" email="JohnDoe#outlook.com" phonenumber="00123445" notification_email="1" notification_text="1"/>
Is it possible to edit the response so that when the programs check for the availablecredits variable, he get the value 9999 instead of 732.
Im working on a Windows 8 laptop.
Definitely - Fiddler allows you to modify requests and responses by adding rules to FiddlerScript. Citing Fiddler documentation:
To make custom changes to web requests and responses, use
FiddlerScript to add rules to Fiddler's OnBeforeRequest or
OnBeforeResponse function. Which function is appropriate depends on
the objects your code uses: OnBeforeRequest is called before each
request, and OnBeforeResponse is called before each response.
So, all you have to do is to add to OnBeforeResponse the logic for replacing the availablecredits attribute value with any value you desire.

Modify HTTP response on the fly NOT using Fiddler2

Let`s assume that program 'xyz' use pretty simple authentication via HTTP/1.1 GET method. What i want to do is modify response header, exactly from "Content: 1; Bad User Name or Password" to "Content: 0; Pass".
To be more specific:
0) I'm using win 7 x86, program 'xyz' was written in VB. Fiddler is not capturing packets, btw don't know why ;-( => i wanted to use AutoResponder. Wireshark captures nicely ;-)
1) I run 'xyz' and fill credentials: User Name = 'fake_foo' and Password = 'fake_bar' than press login
2) In wireshark i see HTTP request packet to 111.222.223.224:80:
GET /result?u=fake_foo&p=fake_bar HTTP/1.1
User-Agent: CheckL
TimeStamp: 1234567890
Host: 111.222.223.224:80
3) Next packet is response from that server:
HTTP/1.1 200 OK
Date: 05:00:00 AM
Content-Type: text/html
Content: 1;Bad User Name or Password
Now when i put reliable credentialas than response is:
HTTP/1.1 200 OK
Date: 05:00:00 AM
Content-Type: text/html
Content: Content: 0; Pass
and program starts.
How to, what software can use to modify on the fly this response to be 'pass' after sending request with fake data?
Thanks

Resources