473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using XML API Interface through ASP3

I have a test account on hotelbeds.com to use XML Integration service. and the sent me all the xml files and XSDs files PLUS pdf spacification file contains the following example :-
SOAP message request example
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <soapenv:Envelope
  3. soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  4. xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  5. <soapenv:Body>
  6. <hb:getHotelCategoryList xmlns:hb="http://axis.frontend.hydra.hotelbeds.com" xsi:type="xsd:string">
  7. <HotelCategoryListRQ echoToken="DummyEchoToken" xmlns="http://www.hotelbeds.com/schemas/2005/06/messages"
  8. xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
  9. xsi:schemaLocation="http://www.hotelbeds.com/schemas/2005/06/messages HotelCategoryListRQ.xsd">
  10. <Language>ENG</Language>
  11. <Credentials>
  12. <User>TEST</User>
  13. <Password>TEST</Password>
  14. </Credentials>
  15. </HotelCategoryListRQ>
  16. </hb:getHotelCategoryList>
  17. </soapenv:Body>
  18. </soapenv:Envelope>
  19. >>>>>>> my Question is how to implement this request to there server on the fly because they don't have any sample codes to use in ASP , ASP.net or even PHP
  20.  
  21. bye the wayI tried to use this sample 
  22. <%
  23.  
  24. 'sforceSoapServer = "Link: "
  25. sforceSoapServer = "http://212.170.239.71/appservices/http/FrontendService"
  26.  
  27. 'sforceSoapServer = "Link: "
  28.  
  29. mySoap = "<?xml version=""1.0"" encoding=""UTF-8""?>" 
  30. mySoap=mySoap& "<soapenv:Envelope soapenv:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/""" 
  31. mySoap=mySoap& " xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">"
  32. mySoap=mySoap& "<soapenv:Body>"
  33. mySoap=mySoap& "<hb:getHotelCategoryList xmlns:hb=""http://axis.frontend.hydra.hotelbeds.com"" xsi:type=""xsd:string"">"
  34. mySoap=mySoap& "<HotelCategoryListRQ echoToken=""DummyEchoToken"" xmlns=""http://www.hotelbeds.com/schemas/2005/06/messages"""
  35. mySoap=mySoap& "xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"""
  36. mySoap=mySoap& "xsi:schemaLocation=""http://www.hotelbeds.com/schemas/2005/06/messages HotelCategoryListRQ.xsd"">"
  37. mySoap=mySoap& "<Language>ENG</Language>"
  38. mySoap=mySoap& "<Credentials>"
  39. mySoap=mySoap& "<User>******</User>"
  40. mySoap=mySoap& "<Password>*****</Password>"
  41. mySoap=mySoap& "</Credentials>"
  42. mySoap=mySoap& "</HotelCategoryListRQ>"
  43. mySoap=mySoap& "</hb:getHotelCategoryList>"
  44. mySoap=mySoap& "</soapenv:Body>"
  45. mySoap=mySoap& "</soapenv:Envelope>"
  46.  
  47. strSoapRequest = mySoap
  48.  
  49. 'Build the SOAP header
  50. Set xmlhttp = CreateObject("Msxml2.ServerXMLHTTP")
  51. xmlhttp.open "POST", sforceSoapServer, False   'False = do not respond immediately
  52. xmlhttp.setRequestHeader "Man", POST & " " & sforceSoapServer & " HTTP/1.1"
  53. xmlhttp.setRequestHeader "Content-Type", "text/xml"
  54.  
  55. 'Send the SOAP request
  56. xmlhttp.send (strSoapRequest)
  57. response.write (xmlhttp.responseText)
  58.  
  59. %>
but it gets this error
500 Servlet Exception

Expand|Select|Wrap|Line Numbers
  1. java.lang.RuntimeException: FATAL ERROR. Message: 'You are not allowed
  2. to access the system.'
  3.     at com.hotelbeds.hydra.frontend.http.HTTPFrontendServlet.doPost(HTTPFrontendServlet.java:1034)
  4.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
  5.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
  6.     at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
  7.     at com.caucho.server.http.Invocation.service(Invocation.java:315)
  8.     at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
  9.     at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:253)
  10.     at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:170)
  11.     at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
  12.     at java.lang.Thread.run(Thread.java:534)
  13. Caused by: com.hotelbeds.hydra.resources.util.user.GrantException
  14. Code: C01-01-001-TS
  15. Message: You are not allowed to access the system.
  16. Detailed message: null
  17.  
  18.     at com.hotelbeds.hydra.resources.util.user.UserValidation.validateIPAddress(UserValidation.java:590)
  19.     at com.hotelbeds.hydra.frontend.http.HTTPFro
>> any help or adive will be appreciated
Nov 14 '07 #1
2 4364
Dököll
2,364 Expert 2GB
Have a look here see if this does anything:
http://www.codeproject.com/soap/WebServiceASPNET.asp

If that does not work, try the other included through that site:
http://www.codeproject.com/soap/

Please stay tuned if you need more help.

In a bit!
Nov 17 '07 #2
axmuha
1
you need ask HotelBeds to resolve you IP-address (send message to xml@hotelbeds.com )

I have a test account on hotelbeds.com to use XML Integration service. and the sent me all the xml files and XSDs files PLUS pdf spacification file contains the following example :-
SOAP message request example
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<hb:getHotelCategoryList xmlns:hb="http://axis.frontend.hydra.hotelbeds.com" xsi:type="xsd:string">
<HotelCategoryListRQ echoToken="DummyEchoToken" xmlns="http://www.hotelbeds.com/schemas/2005/06/messages"
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation="http://www.hotelbeds.com/schemas/2005/06/messages HotelCategoryListRQ.xsd">
<Language>ENG</Language>
<Credentials>
<User>TEST</User>
<Password>TEST</Password>
</Credentials>
</HotelCategoryListRQ>
</hb:getHotelCategoryList>
</soapenv:Body>
</soapenv:Envelope>
>>>>>>> my Question is how to implement this request to there server on the fly because they don't have any sample codes to use in ASP , ASP.net or even PHP

bye the wayI tried to use this sample
<%

'sforceSoapServer = "Link: "
sforceSoapServer = "http://212.170.239.71/appservices/http/FrontendService"

'sforceSoapServer = "Link: "

mySoap = "<?xml version=""1.0"" encoding=""UTF-8""?>"
mySoap=mySoap& "<soapenv:Envelope soapenv:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/"""
mySoap=mySoap& " xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">"
mySoap=mySoap& "<soapenv:Body>"
mySoap=mySoap& "<hb:getHotelCategoryList xmlns:hb=""http://axis.frontend.hydra.hotelbeds.com"" xsi:type=""xsd:string"">"
mySoap=mySoap& "<HotelCategoryListRQ echoToken=""DummyEchoToken"" xmlns=""http://www.hotelbeds.com/schemas/2005/06/messages"""
mySoap=mySoap& "xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"""
mySoap=mySoap& "xsi:schemaLocation=""http://www.hotelbeds.com/schemas/2005/06/messages HotelCategoryListRQ.xsd"">"
mySoap=mySoap& "<Language>ENG</Language>"
mySoap=mySoap& "<Credentials>"
mySoap=mySoap& "<User>******</User>"
mySoap=mySoap& "<Password>*****</Password>"
mySoap=mySoap& "</Credentials>"
mySoap=mySoap& "</HotelCategoryListRQ>"
mySoap=mySoap& "</hb:getHotelCategoryList>"
mySoap=mySoap& "</soapenv:Body>"
mySoap=mySoap& "</soapenv:Envelope>"

strSoapRequest = mySoap

'Build the SOAP header
Set xmlhttp = CreateObject("Msxml2.ServerXMLHTTP")
xmlhttp.open "POST", sforceSoapServer, False 'False = do not respond immediately
xmlhttp.setRequestHeader "Man", POST & " " & sforceSoapServer & " HTTP/1.1"
xmlhttp.setRequestHeader "Content-Type", "text/xml"

'Send the SOAP request
xmlhttp.send (strSoapRequest)
response.write (xmlhttp.responseText)

%>
but it gets this error
500 Servlet Exception

java.lang.RuntimeException: FATAL ERROR. Message: 'You are not allowed
to access the system.'
at com.hotelbeds.hydra.frontend.http.HTTPFrontendServ let.doPost(HTTPFrontendServlet.java:1034)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:103)
at com.caucho.server.http.FilterChainServlet.doFilter (FilterChainServlet.java:96)
at com.caucho.server.http.Invocation.service(Invocati on.java:315)
at com.caucho.server.http.CacheInvocation.service(Cac heInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(H ttpRequest.java:253)
at com.caucho.server.http.HttpRequest.handleConnectio n(HttpRequest.java:170)
at com.caucho.server.TcpConnection.run(TcpConnection. java:139)
at java.lang.Thread.run(Thread.java:534)
Caused by: com.hotelbeds.hydra.resources.util.user.GrantExcep tion
Code: C01-01-001-TS
Message: You are not allowed to access the system.
Detailed message: null

at com.hotelbeds.hydra.resources.util.user.UserValida tion.validateIPAddress(UserValidation.java:590)
at com.hotelbeds.hydra.frontend.http.HTTPFro

>> any help or adive will be appreciated
Dec 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: gokul | last post by:
Hi, Iam a newbie to dotnet and I experience problems in using the Browser control in VB .net. Though Iam able to use it with its basic features, I need to customise it. ...
1
by: Andy Smith | last post by:
I have been having massive problems trying to get data from ASP3 to XML. Could anyone suggest as effective solution for building and XML file on the fly? Many Thanks, Andy
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
8
by: Joakim Persson | last post by:
Hello all. I am involved in a project where we have a desire to improve our software testing tools, and I'm in charge of looking for solutions regarding the logging of our software (originating...
1
by: virajajgaonkar | last post by:
Hello All, My aim is to have a MFC application which takes two word file names as input. Then it opens these two word files in ms word apllication windows for comparing side by side with...
26
by: Marius Horak | last post by:
As in subject. Thanks MH
0
by: Hitesh | last post by:
I am using ASP.NET (.ASPX) to develop a web application. I am using one of my old COM component dll, which has a method "OnStartPage", which has a parameter of type "ScriptingContext". My old...
1
by: Kevin S. Goff | last post by:
Hi, all, Hopefully this will make sense: I have 2 classes that implement the same generic interface. public interface IAgingReport<T> { T GetAgingReport(DateTime dAsOfDate); }
15
by: Gustaf | last post by:
Using VS 2005. I got an 'IpForm' class and an 'IpFormCollection' class, containing IpForm objects. To iterate through IpFrom objects with foreach, the class is implemented as such: public class...
6
by: greek_bill | last post by:
Hi, I'm interested in developing an application that needs to run on more than one operating system. Naturally, a lot of the code will be shared between the various OSs, with OS specific...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.