Branded Fare - Amadeus SOAP/XML
Amadeus is offering to search branded fares from hundreds of top carriers with Branded Fares Upsell, now available in the Self-Service and Enterprise catalogs. Built for integration in your REST/JSON booking engine.
Is there anything similar to it but with SOAP/XML engine?
do you know?
how many words do you know
See also questions close to this topic
-
Java - Update Elements in Large XML Files
I work with very large XML datasets (1 GB+) and need to backtrack and update specific elements per node, depending on the values of other elements that follow.
For example, in this record/node:
<user> <role>Associate</role> <team>Hufflepuff</team> <experience>7</experience> </user>
Since "experience" is greater than 5 years, the role needs to be updated from "Associate" to "Senior."
I would like to avoid loading the entire file into memory via the DOM.
Ideally, I would process each single "user" in the XML and append the data to a new XML file one at a time. I started off by processing in a stream using StAX, but I don't know how to transform each XMLEventWriter event content into a useable DOM document that writes to an XML file and clears from memory afterwards.
If the description is unclear in any way, please let me know. Any help on this will be greatly appreciated.
Thanks.
-
cant read field in xml section
Using python I got to the correct iteration of the XML (forecast) section, but one child field I cant seem to be able to read here is the section from the XML
<forecast> <fcst_time_from>2022-05-04T16:00:00Z</fcst_time_from> <fcst_time_to>2022-05-04T20:00:00Z</fcst_time_to> <change_indicator>FM</change_indicator> <wind_dir_degrees>110</wind_dir_degrees> <wind_speed_kt>6</wind_speed_kt> <visibility_statute_mi>6.21</visibility_statute_mi> <sky_condition sky_cover="SCT" cloud_base_ft_agl="4500"/> <sky_condition sky_cover="SCT" cloud_base_ft_agl="25000"/> </forecast>
I can get every field except
<sky_condition sky_cover="SCT" cloud_base_ft_agl="25000"/>
here is the code where I pull the fields
if startTime_new <= Cur_Date_UTC <= EndTime_new: #Cil2 = (l.find('sky_cover')).text wDir = (l.find('wind_dir_degrees')).text wSpd = (l.find('wind_speed_kt')).text vis = (l.find('visibility_statute_mi')).text Cil = (l.find('sky_condition')).text print(wDir) print(wSpd) print(vis) print(Cil) print(l)
The answer given did work in a comand window but I am using beautifulsoup to get the XML . I tried to import from datetime import datetime however Cil = [x.get('sky_cover') for x in elt.findall('sky_condition')] did not work
here is my full code
from bs4 import BeautifulSoup as bs import requests import pytz from datetime import datetime #pirip=False def SetDateTimes(): utc_time = datetime.now(pytz.utc) Cur_Date_UTC = utc_time.strftime("%d/%m/%y %H:%M:%S") return Cur_Date_UTC def FixDateTime(workingTime): workingTime = workingTime.replace('T', ' ') workingTime = workingTime.replace('Z', '') format = "%Y-%m-%d %H:%M:%S" dt_object = datetime.strptime(workingTime, format) day_st = dt_object.strftime("%d") month_st = dt_object.strftime("%m") year_st = dt_object.strftime("%y") time_st = dt_object.strftime("%H:%M:%S") workingTime = day_st + '/' + month_st + '/' + year_st + ' ' + time_st return workingTime def GetTAF3(): USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36" url = 'https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=tafs&requestType=retrieve&format=xml&hoursBeforeNow=3&timeType=issue&mostRecent=true&stationString=KEWR' session = requests.Session() session.headers['User-Agent'] = USER_AGENT html = session.get(url) soup = bs(html.text, 'html.parser') taf = soup.find_all("forecast") for l in soup.findAll('forecast'): startTime = l.find('fcst_time_from').text EndTime = (l.find('fcst_time_to')).text #print(startTime) startTime_new = FixDateTime(startTime) #print(startTime_new) #print(EndTime) EndTime_new = FixDateTime(EndTime) #print(EndTime_new) #break if startTime_new <= Cur_Date_UTC <= EndTime_new: #Cil2 = (l.find('sky_cover')).text print(l) wDir = (l.find('wind_dir_degrees')).text wSpd = (l.find('wind_speed_kt')).text vis = (l.find('visibility_statute_mi')).text Cil = (l.find('sky_condition')) print(wDir) print(wSpd) print(vis) print(Cil) print(l) if 'OVC' in Cil: print("OVC Found") pirip = True else: print('No PIRIP') if float(vis) < 5: print("pirip for vis") pirip = True else: print('No PIRIP') Cur_Date_UTC = SetDateTimes() GetTAF3() #print(pirip)
-
How can I use Continue in a choose statement in xslt
I want to continue to check for other if statements if the first one is met. From what I read, Choose statement does not have this functionality like other languages do. One post suggested to just run multiple if statements but this is not working. After the first if statement is met it stops there, I want it to keep running.
How can I achieve this? This is my code:
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes" omit-xml-declaration="yes"/> <xsl:template match="root"> { "entityList": [ <xsl:for-each select="//entityList"> { "notes":"<xsl:call-template name="replace"> <xsl:with-param name="text" select="./Notes"/> </xsl:call-template>", } <xsl:if test="position() != last()">,</xsl:if> </xsl:for-each> ] } </xsl:template> <xsl:template name="replace"> <xsl:param name="text"/> <xsl:param name="searchString">"</xsl:param> <xsl:param name="replaceString">\"</xsl:param> <xsl:param name="searchStringSpace">	</xsl:param> <xsl:param name="searchStringBackslash">\</xsl:param> <xsl:if test="contains($text,$searchString)"> <xsl:value-of select="replace(./Notes,'"','\\"')"/> </xsl:if> <xsl:if test="contains($text,$searchStringSpace)"> <xsl:value-of select="replace(./Notes,'	','\\t')"/> </xsl:if> </xsl:template> </xsl:stylesheet>
<root> <totalRecords>429</totalRecords> <offset>0</offset> <entityList> <Notes>Dear Deans, Chairs and "Directors,There was a 	ANDOR question about scheduling Mac Hall Auditorium,for regular classes and policy/procedure around it.,Mac Hall Auditorium was intended to be available as a,regular classroom. That is why the seats have built-in mini,desks.,Your programs are welcome to schedule classes in,Mac Auditorium - you can request it when submitting your,course schedules for the Semester or through the Schedule,Change Request Form.,There are, however, some conditions:,1)faculty members who teach in Mac Auditorium should,anticipate that their class may be displaced if the,University-wide function (president?s address, a conference,,etc.) is scheduled at the time of their class. It would be,up to the faculty to either reschedule that,class meeting for a different time, find another room/space,or substitute the class meeting with an alternative activity,There is no easy way to inform faculty about the upcoming,events, so they would have to watch University Calendar to,determine when their classes might be affected.,2)Mac Hall will be unavailable for scheduling regular,courses during evening hours (6-10 pm) ? that time will be,set aside for Pegasus Players practices.,Natalia F. Blank, Ph.D. 2/17/21</Notes> </entityList> <totalPages>1</totalPages> <page>0</page> <status>success</status> </root>
-
Make response part of body instead of header in SOAP response
I have requirements where I have to add response details in Body tag instead of Header. For now details are added in Header tag of soap response.
@XmlType public class CheckBalanceResponse { private String checkBalanceResult; @XmlElement(name="CheckBalanceResult") public String getCheckBalanceResult() { return checkBalanceResult; } public void setCheckBalanceResult(String checkBalanceResult) { this.checkBalanceResult = checkBalanceResult; } }
Generated response is below:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <CheckBalanceResponse xmlns="http://charginggw.org/"> <CheckBalanceResult>Incorrect PIN</CheckBalanceResult> </CheckBalanceResponse> </soap:Header> <soap:Body/> </soap:Envelope>
I want CheckBalanceResponse tag to be in Body instead of Header. Please suggest what should be done?
-
WSO2 EI get attachement filename in SOAP request
I need to get the filename of the attachment given in a SOAP request. The SOAP request looks like this :
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:type="http://some.type/types"> <soap:Header/> <soap:Body> <type:RequestName> <type:Data>...</type:Data> <!--Optional:--> <type:myAttachement>cid:AAA</type:myAttachement> </type:RequestName> </soap:Body> </soap:Envelope>
When MTOM is enabled in SOAP UI, I can see the following in the log Wire :
DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> " <type:myAttachement><inc:Include href="cid:AAA" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></type:myAttachement> DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> " </type:RequestName> DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> " </soap:Body>[\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "</soap:Envelope>" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "[\r][\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "------=_Part_2_1904033954.1651826827378[\r][\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "Content-Type: text/plain; charset=us-ascii; name=test.txt[\r][\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "Content-Transfer-Encoding: 7bit[\r][\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "Content-ID: <AAA>[\r][\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "Content-Disposition: attachment; name="test.txt"; filename="test.txt"[\r][\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "[\r][\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "AAABBBCCCDDD[\r][\n]" DEBUG {wire} - HTTP-Listener I/O dispatcher-2 >> "------=_Part_2_1904033954.1651826827378--[\r][\n]"
I can see the filename, Content-Type.. When I Debug the request in the sequence, the file content is inline the SOAP Payload :
<type:myAttachment>QUFBQkJCQ0NDRERE</type:myAttachment> </type:RequestName> </soap:Body></soap:Envelope>
How can I get in script mediator the attachment filename or at least the Content-Type of the attachment ?
-
getting Amadeus API Error in WordPress : 403 forbidden, code: 35283
I'm new to Amadeus development. I'm using Amadeus Self service API's to get flights search from searched term. Everything used to work fine, but from today, if i call an api, I'm receiving error 403 forbidden.
{ "errors": [ { "status": 403, "code": 35283, "title": "FORBIDDEN", "detail": "Incorrect user, no configuration found" } ] }
I have tried to with different api keys.
Any answers much appreciated.
-
Amadeus API Error : You do not have permission to access this content
I'm new to Amadeus development. I'm trying to develop an airline booking website. I'm using Amadeus Self service API's to get flights from searched term. Everything used to work fine, but from yesterday, if i call an api, I'm receiving error 403 forbidden, Invalid user. And I had a look into my Self Service workplace, It's throwing an error You do not have permission to access this content.
Any answers much appreciated.
Sample of my website is https://master.d3799dd2ybju3c.amplifyapp.com/.
Note: This is not the actual website, It's just a sample. For fetching airports i'm using my own data. It's not calling any backend api.
And once you please do reload the page again for good response.
-
How to implement Amadeus Enterprise API to a travel website (complete beginner)
I am quite new to coding practically, can someone explain how to create and implement enterprise API to my front end page. I have no idea how to connect it.