Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Premium Land with House for Sale
anil1961
Updated:
Friday at 10:15 AM
AWS Certified Solutions Architect-Associate + AWS Certified Cloud Practitioner
Sanjeewani95
Updated:
Wednesday at 8:16 PM
🚀 එක පැකේජ් එකයි - මාසෙටම Unlimited Internet! 🌐
sayuru bandara
Updated:
Tuesday at 10:57 AM
🎬 CapCut Pro 1 Month Access! LKR 600
sayuru bandara
Updated:
Tuesday at 10:55 AM
🚀 Google One AI PRO Plan (Gemini Pro Activation) – 18 Months Access! LKR 2200
sayuru bandara
Updated:
Tuesday at 10:53 AM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Problems and Troubleshooting
Web Service එකට Request එකක් යවල , Response එක ගන්නේ කොහමද ??
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Seven Net" data-source="post: 23587107" data-attributes="member: 497416"><p><strong>Web Service එකට Request එකක් යවල , Response එක ගන්නේ කොහමද ??</strong></p><p></p><p><span style="font-size: 18px">Web Service එකට Request එකක් යවල , Response එක ගන්නේ කොහමද ??</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">Amadeus කියන අය හදපු Web Service එකක් තියේනව. එයාලම දුන්නා WSDL ෆයිල් එක හා XSD ෆයිල්ස් ටික හා මම ඒවා ටික Host කරා. මම Request එකක් යවල , Response එකක් ගන්න , මේ පහල විධියට JavaScript , Ajax වලින් ස්ක්රිප්ට් එකක් ලිව්වා. එත් , මම Request එකක් යැවුවට , Response එකක් එන්නේ නැ. මම මෙහිදි Ajax වල URL එක විධියට දෙන්නේ Amadeus Web Service එකේ Endpoint එක. මිට අමතරව WSDL ෆයිල් එකේ හා XSD ෆයිල්ස් ටිකේ ලින්ක් එකත් දෙන්න ඕනද ??</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">නැත්නම් WSDL ෆයිල් එක හා XSD ෆයිල් ටිකත් භාවිතා කරන් , Request එකක් යවල , Response එකක් ගන්නේ කොහමද ??</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">මේක තමයි ලිව්ව JavaScript , Ajax එක. </span></p><p></p><p>[CODE]<html></p><p><head></p><p> <title></title></p><p> <meta charset="utf-8"/></p><p> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script></p><p> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script></p><p> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment.min.js"></script></p><p> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script></p><p> <script src="http://www.timestampgenerator.com/js/common.js"></script></p><p> </p><p></head></p><p><body></p><p></p><p><div class="container"> <!-- Start Of The Container Class --></p><p></p><p> <div class="row text-center"> <!-- Start Of The Row Class --></p><p></p><p> <div class="col-md-12 col-sm-12 hero-feature"> <!-- Start Of The Col Class --></p><p></p><p> <h3>Tasks of the Developers</h3> <br></p><p></p><p> <form class="form-horizontal" method="POST" action="#" enctype="multipart/form-data" id="signupForm"></p><p> </p><p> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --></p><p> Message Id : <input class="form-control" id="messageid" type="text" placeholder="Results will be placed here..." readonly size="40"/> <br></p><p> </div></p><p> </p><p> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --></p><p> Nonce : <input class="form-control" id="nonceshow" type="text"/> <br></p><p> </div></p><p> </p><p> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --></p><p> Timestamp : <input class="form-control" type="text" name="timestampama" id="timestampama"/> <br></p><p> </div></p><p> </p><p> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --></p><p> Text : <input type="text" class="form-control" name="strex" id="strex" size="20" /> <br></p><p> </div></p><p> </p><p> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --></p><p> SHA-1 : <input type="text" class="form-control" name="strcrypt" id="strcrypt" size="33" /> <br></p><p> </div></p><p></p><p> <a href="#" id="ghsubmitbtn" class="btn btn-success">Search</a></p><p></p><p> <p id="errorModal"></p> <br></p><p></p><p> <div id="ghapidata" class="clearfix"></div></p><p></p><p> </form></p><p></p><p> <p id="body"></p></p><p></p><p> <script type="text/javascript"></p><p> </p><p> //Main Function</p><p> $(document).ready(function () {</p><p> </p><p> $.getScript("PwJs.js", function () {</p><p> });</p><p></p><p> $('#ghsubmitbtn').on('click', function(e) {</p><p> var country = $('#country').val();</p><p> var year = $('#year').val();</p><p> var month = $('#month').val();</p><p> </p><p> var messageid = guid();</p><p> //var nonce = nonceid();</p><p> //var nonceremove = nonce.slice(0, -4); //Remove last 4 characters</p><p> //var n = nonceremove.length; //Length</p><p> var pw = 'SSSSSS';</p><p></p><p> var str = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://xml.amadeus.com/2010/06/Security_v1" xmlns:typ="http://xml.amadeus.com/2010/06/Types_v1" xmlns:iat="http://www.iata.org/IATA/2007/00/IATA2010.1" xmlns:app="http://xml.amadeus.com/2010/06/AppMdw_CommonTypes_v3" xmlns:link="http://wsdl.amadeus.com/2010/06/ws/Link_v1" xmlns:ses="http://xml.amadeus.com/2010/06/Session_v3" xmlns:fmp="http://xml.amadeus.com/FMPTBQ_14_3_1A">' +</p><p> '<soapenv:Header>' +</p><p> '<add:MessageID xmlns:add="http://www.w3.org/2005/08/addressing">' + messageid + '</add:MessageID>' +</p><p> '<add:Action xmlns:add="http://www.w3.org/2005/08/addressing">http://webservices.amadeus.com/ZZZZZ</add:Action>' +</p><p> '<add:To xmlns:add="http://www.w3.org/2005/08/addressing">https://nodeD1.test.webservices.amadeus.com/XXXXXX</add:To>' +</p><p> '<link:TransactionFlowLink xmlns:link="http://wsdl.amadeus.com/2010/06/ws/Link_v1"/>' +</p><p> '<oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' +</p><p> '<oas:UsernameToken oas1:Id="UsernameToken-1" xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' +</p><p> '<oas:Username>WSEOLMTT</oas:Username>' +</p><p> '<oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' + noncemove + '</oas:Nonce>' +</p><p> '<oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">' + hashedPw + '</oas:Password>' +</p><p> '<oas1:Created>' + timestampama + '</oas1:Created>' +</p><p> '</oas:UsernameToken>' +</p><p> '</oas:Security>' +</p><p> '<AMA_SecurityHostedUser xmlns="http://xml.amadeus.com/2010/06/Security_v1">' +</p><p> '<UserID AgentDutyCode="SU" POS_Type="1" PseudoCityCode="CMBI228AJ" RequestorType="U"/>' +</p><p> '</AMA_SecurityHostedUser>' +</p><p> '</soapenv:Header>' +</p><p> '<soapenv:Body>' +</p><p> '<Fare_MasterPricerTravelBoardSearch>' +</p><p> '<numberOfUnit xmlns="http://xml.amadeus.com/FMPTBQ_14_3_1A">' +</p><p> '<unitNumberDetail>' +</p><p> '<numberOfUnits>1</numberOfUnits>' +</p><p> '<typeOfUnit>PX</typeOfUnit>' +</p><p> '</unitNumberDetail>' +</p><p> '<unitNumberDetail>' +</p><p> '<numberOfUnits>250</numberOfUnits>' +</p><p> '<typeOfUnit>RC</typeOfUnit>' +</p><p> '</unitNumberDetail>' +</p><p> '</numberOfUnit>' +</p><p> '<paxReference>' +</p><p> '<ptc>ADT</ptc>' +</p><p> '<traveller>' +</p><p> '<ref>1</ref>' +</p><p> '</traveller>' +</p><p> '</paxReference>' +</p><p> '<fareOptions>' +</p><p> '<pricingTickInfo>' +</p><p> '<pricingTicketing>' +</p><p> '<priceType>ET</priceType>' +</p><p> '<priceType>TAC</priceType>' +</p><p> '<priceType>RP</priceType>' +</p><p> '</pricingTicketing>' +</p><p> '</pricingTickInfo>' +</p><p> '</fareOptions>' +</p><p> '<itinerary>' +</p><p> '<requestedSegmentRef>' +</p><p> '<segRef>1</segRef>' +</p><p> '</requestedSegmentRef>' +</p><p> '<departureLocalization>' +</p><p> '<departurePoint>' +</p><p> '<locationId>DEL</locationId>' +</p><p> '</departurePoint>' +</p><p> '</departureLocalization>' +</p><p> '<arrivalLocalization>' +</p><p> '<arrivalPointDetails>' +</p><p> '<locationId>BOM</locationId>' +</p><p> '</arrivalPointDetails>' +</p><p> '</arrivalLocalization>' +</p><p> '<timeDetails>' +</p><p> '<firstDateTimeDetail>' +</p><p> '<date>161018</date>' +</p><p> '</firstDateTimeDetail>' +</p><p> '</timeDetails>' +</p><p> '<flightInfo>' +</p><p> '<cabinId>' +</p><p> '<cabin>Y</cabin>' +</p><p> '</cabinId>' +</p><p> '</flightInfo>' +</p><p> '</itinerary>' +</p><p> '</Fare_MasterPricerTravelBoardSearch>' +</p><p> '</soapenv:Body>' +</p><p>'</soapenv:Envelope>';</p><p> </p><p> //console.log(departureDate);</p><p></p><p> $.ajax({</p><p> url: 'https://nodeD1.test.webservices.amadeus.com/XXXXXX',</p><p> method: 'POST',</p><p> contentType:"text/xml; charset=utf-8",</p><p> data: str,</p><p> //headers: {"Authorization": 'Bearer ' + bat},</p><p> beforeSend: function (xhr) {</p><p> xhr.setRequestHeader('SOAPAction', 'http://webservices.amadeus.com/ZZZZZ');</p><p> },</p><p> </p><p> success: function (data) {</p><p></p><p> console.log(data);</p><p></p><p> }</p><p> </p><p> });</p><p> </p><p> });</p><p> </p><p> });</p><p></p><p> </script></p><p></p><p> </div> <!-- End Of The Col Class --></p><p></p><p> </div> <!-- End Of The Row Class --></p><p></p><p></div> <!-- End Of The Container Class --></p><p></p><p></body></p><p></html>[/CODE]</p></blockquote><p></p>
[QUOTE="Seven Net, post: 23587107, member: 497416"] [b]Web Service එකට Request එකක් යවල , Response එක ගන්නේ කොහමද ??[/b] [SIZE="5"]Web Service එකට Request එකක් යවල , Response එක ගන්නේ කොහමද ?? Amadeus කියන අය හදපු Web Service එකක් තියේනව. එයාලම දුන්නා WSDL ෆයිල් එක හා XSD ෆයිල්ස් ටික හා මම ඒවා ටික Host කරා. මම Request එකක් යවල , Response එකක් ගන්න , මේ පහල විධියට JavaScript , Ajax වලින් ස්ක්රිප්ට් එකක් ලිව්වා. එත් , මම Request එකක් යැවුවට , Response එකක් එන්නේ නැ. මම මෙහිදි Ajax වල URL එක විධියට දෙන්නේ Amadeus Web Service එකේ Endpoint එක. මිට අමතරව WSDL ෆයිල් එකේ හා XSD ෆයිල්ස් ටිකේ ලින්ක් එකත් දෙන්න ඕනද ?? නැත්නම් WSDL ෆයිල් එක හා XSD ෆයිල් ටිකත් භාවිතා කරන් , Request එකක් යවල , Response එකක් ගන්නේ කොහමද ?? මේක තමයි ලිව්ව JavaScript , Ajax එක. [/SIZE] [CODE]<html> <head> <title></title> <meta charset="utf-8"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> <script src="http://www.timestampgenerator.com/js/common.js"></script> </head> <body> <div class="container"> <!-- Start Of The Container Class --> <div class="row text-center"> <!-- Start Of The Row Class --> <div class="col-md-12 col-sm-12 hero-feature"> <!-- Start Of The Col Class --> <h3>Tasks of the Developers</h3> <br> <form class="form-horizontal" method="POST" action="#" enctype="multipart/form-data" id="signupForm"> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --> Message Id : <input class="form-control" id="messageid" type="text" placeholder="Results will be placed here..." readonly size="40"/> <br> </div> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --> Nonce : <input class="form-control" id="nonceshow" type="text"/> <br> </div> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --> Timestamp : <input class="form-control" type="text" name="timestampama" id="timestampama"/> <br> </div> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --> Text : <input type="text" class="form-control" name="strex" id="strex" size="20" /> <br> </div> <div class="col-md-4 col-sm-12 hero-feature"> <!-- Start Of The Col Class --> SHA-1 : <input type="text" class="form-control" name="strcrypt" id="strcrypt" size="33" /> <br> </div> <a href="#" id="ghsubmitbtn" class="btn btn-success">Search</a> <p id="errorModal"></p> <br> <div id="ghapidata" class="clearfix"></div> </form> <p id="body"></p> <script type="text/javascript"> //Main Function $(document).ready(function () { $.getScript("PwJs.js", function () { }); $('#ghsubmitbtn').on('click', function(e) { var country = $('#country').val(); var year = $('#year').val(); var month = $('#month').val(); var messageid = guid(); //var nonce = nonceid(); //var nonceremove = nonce.slice(0, -4); //Remove last 4 characters //var n = nonceremove.length; //Length var pw = 'SSSSSS'; var str = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://xml.amadeus.com/2010/06/Security_v1" xmlns:typ="http://xml.amadeus.com/2010/06/Types_v1" xmlns:iat="http://www.iata.org/IATA/2007/00/IATA2010.1" xmlns:app="http://xml.amadeus.com/2010/06/AppMdw_CommonTypes_v3" xmlns:link="http://wsdl.amadeus.com/2010/06/ws/Link_v1" xmlns:ses="http://xml.amadeus.com/2010/06/Session_v3" xmlns:fmp="http://xml.amadeus.com/FMPTBQ_14_3_1A">' + '<soapenv:Header>' + '<add:MessageID xmlns:add="http://www.w3.org/2005/08/addressing">' + messageid + '</add:MessageID>' + '<add:Action xmlns:add="http://www.w3.org/2005/08/addressing">http://webservices.amadeus.com/ZZZZZ</add:Action>' + '<add:To xmlns:add="http://www.w3.org/2005/08/addressing">https://nodeD1.test.webservices.amadeus.com/XXXXXX</add:To>' + '<link:TransactionFlowLink xmlns:link="http://wsdl.amadeus.com/2010/06/ws/Link_v1"/>' + '<oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' + '<oas:UsernameToken oas1:Id="UsernameToken-1" xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' + '<oas:Username>WSEOLMTT</oas:Username>' + '<oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">' + noncemove + '</oas:Nonce>' + '<oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">' + hashedPw + '</oas:Password>' + '<oas1:Created>' + timestampama + '</oas1:Created>' + '</oas:UsernameToken>' + '</oas:Security>' + '<AMA_SecurityHostedUser xmlns="http://xml.amadeus.com/2010/06/Security_v1">' + '<UserID AgentDutyCode="SU" POS_Type="1" PseudoCityCode="CMBI228AJ" RequestorType="U"/>' + '</AMA_SecurityHostedUser>' + '</soapenv:Header>' + '<soapenv:Body>' + '<Fare_MasterPricerTravelBoardSearch>' + '<numberOfUnit xmlns="http://xml.amadeus.com/FMPTBQ_14_3_1A">' + '<unitNumberDetail>' + '<numberOfUnits>1</numberOfUnits>' + '<typeOfUnit>PX</typeOfUnit>' + '</unitNumberDetail>' + '<unitNumberDetail>' + '<numberOfUnits>250</numberOfUnits>' + '<typeOfUnit>RC</typeOfUnit>' + '</unitNumberDetail>' + '</numberOfUnit>' + '<paxReference>' + '<ptc>ADT</ptc>' + '<traveller>' + '<ref>1</ref>' + '</traveller>' + '</paxReference>' + '<fareOptions>' + '<pricingTickInfo>' + '<pricingTicketing>' + '<priceType>ET</priceType>' + '<priceType>TAC</priceType>' + '<priceType>RP</priceType>' + '</pricingTicketing>' + '</pricingTickInfo>' + '</fareOptions>' + '<itinerary>' + '<requestedSegmentRef>' + '<segRef>1</segRef>' + '</requestedSegmentRef>' + '<departureLocalization>' + '<departurePoint>' + '<locationId>DEL</locationId>' + '</departurePoint>' + '</departureLocalization>' + '<arrivalLocalization>' + '<arrivalPointDetails>' + '<locationId>BOM</locationId>' + '</arrivalPointDetails>' + '</arrivalLocalization>' + '<timeDetails>' + '<firstDateTimeDetail>' + '<date>161018</date>' + '</firstDateTimeDetail>' + '</timeDetails>' + '<flightInfo>' + '<cabinId>' + '<cabin>Y</cabin>' + '</cabinId>' + '</flightInfo>' + '</itinerary>' + '</Fare_MasterPricerTravelBoardSearch>' + '</soapenv:Body>' + '</soapenv:Envelope>'; //console.log(departureDate); $.ajax({ url: 'https://nodeD1.test.webservices.amadeus.com/XXXXXX', method: 'POST', contentType:"text/xml; charset=utf-8", data: str, //headers: {"Authorization": 'Bearer ' + bat}, beforeSend: function (xhr) { xhr.setRequestHeader('SOAPAction', 'http://webservices.amadeus.com/ZZZZZ'); }, success: function (data) { console.log(data); } }); }); }); </script> </div> <!-- End Of The Col Class --> </div> <!-- End Of The Row Class --> </div> <!-- End Of The Container Class --> </body> </html>[/CODE] [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom