Note that there are some explanatory texts on larger screens.

plurals
  1. POsoapenv:Server.userExceptionorg.xml.sax.SAXParseException: Content is not allowed in prolog for Hotelbed WSDL api
    primarykey
    data
    text
    <p>I got response 500 internal server error when i run below code, I think code is perfect, so can anyone help me about this? </p> <pre><code>&lt;?php $xml = '&lt;?xml version="1.0" encoding="UTF-8"?&gt;' . "\n"; $xml .= '&lt;CountryListRQ 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 CountryListRQ.xsd"&gt;'; $xml .= '&lt;Language&gt;ENG&lt;/Language&gt;'; $xml .= '&lt;Credentials&gt;'; $xml .= '&lt;User&gt;username&lt;/User&gt;'; $xml .= '&lt;Password&gt;password&lt;/Password&gt;'; $xml .= '&lt;/Credentials&gt;'; $xml .= '&lt;/CountryListRQ&gt;'; $url = 'http://212.170.239.71/appservices/ws/FrontendService?wsdl'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml; charset=utf-8; action="getCountryList"')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, array('xml' =&gt; $xml)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $result = @curl_exec($ch); echo "&lt;pre&gt;"; print_r($result); exit; if($result === false) { echo "Error performing request"; } else { $xml_doc = simplexml_load_string($result); echo 'status is ', $xml_doc-&gt;status, '&lt;br/&gt;'; if ($xml_doc-&gt;status == 'SUCCESS') { print_r($result); } else { echo 'Error is ', $xml_doc-&gt;errormessage, '&lt;br/&gt;'; } }?&gt; </code></pre> <p>I got response like this,</p> <pre><code>HTTP/1.1 100 Continue HTTP/1.1 500 Internal Server Error Date: Sat, 02 Feb 2013 06:02:12 GMT Server: Resin/2.1.17 Content-Type: text/xml; charset=utf-8 Vary: Accept-Encoding Connection: close Transfer-Encoding: chunked soapenv:Server.userExceptionorg.xml.sax.SAXParseException: Content is not allowed in prolog.we3mpf01 </code></pre> <p>Can anyone help me? How can i get country list using this hotelbed api?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload