2011-03-10 3 views
4

내가 호스팅 솔루션은이 웹 서비스가 rentcentric.com에서 호스팅되는PHP 및 비누

오타의 XML 스키마를 ("http://www.opentravel.org/OTA/2003/05/GetVehAvailRate") 활용하는 웹 서비스에 연결하기 위해 노력하고있어 확인 예약과 예약을 온라인으로하기 위해서, 시스템은 연결을 시도 할 때마다 공백의 흰 페이지가 생겨날 때까지 &에 접속하기 위해 사용자 이름과 패스워드가 필요합니다.

오류 메시지

에는 PHP 출력하지

임 여전히 부동산 에이전트 사이트를 사용할 때 큰 성공을 했더라도 (SOAP를 사용하는 비교적 새로운 - 을 didnt는 단순한 값 모든 인증이 필요한

나는이 사이트에서 발견 된 거의 모든 예제를 읽고 시도했다. 기쁨이 전혀없는 다른 사람들 &!

서비스에 만든 요청

는 아래에 설명되어 각 요청은 인수의 핵심 세트를 가지고 :

PickUpDateTime //date 
ReturnDateTime //date 
PickUpLocation.locationCode //string 
ReturnLocation.locationCode //string 
PromotionCod //string 

URL http://www2.rentcentric.com/Ota2007a/OTASrvc.asmx 우리에게 사용할 수있는 모든 방법을 가지고 서비스를 제공합니다.

# GetVehAvailRate 
# VehCancel 
# VehLocSearch 
# VehModify 
# VehRes 

요청 - : GetVehAvailRate

<?xml version="1.0" encoding="utf-8"?> 
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
    <soap:Header> 
    <SRVCredentials xmlns="http://www.opentravel.org/OTA/2003/05"> 
     <Username>*USERNAME*</Username> 
     <Password>*PASSWORD*</Password> 
    </SRVCredentials> 
    </soap:Header> 
    <soap:Body> 
    <OTA_VehAvailRateRQ EchoToken="string" TimeStamp="dateTime" Target="Test or Production" Version="decimal" TransactionIdentifier="string" SequenceNmbr="nonNegativeInteger" TransactionStatusCode="Start or End or Rollback or InSeries or Continuation or Subsequent" PrimaryLangID="language" AltLangID="language" RetransmissionIndicator="boolean" ReqRespVersion="string" MaxResponses="positiveInteger" MaxPerVendorInd="boolean" xmlns="http://www.opentravel.org/OTA/2003/05"> 
     <POS>............ 

코드 예제 :

$soapClient = new SoapClient("http://www2.rentcentric.com/Ota2007a/OTASrvc.asmx?wsdl"); 

    // Prepare SoapHeader parameters 
    $sh_param = array(
      'Username'=>'username', 
      'Password'=>'password'); 
    $headers = new SoapHeader('http://www2.rentcentric.com/Ota2007a/', 'UserCredentials', $sh_param); 

     // Prepare Soap Client 
     $soapClient->__setSoapHeaders(array($headers)); 

임 그냥 돌아가 뭔가를 얻으려고 벽에 모든 나는 내 머리를 bangning 필요가 올바른 방향으로 향하고 있습니다 ...

+0

샘플 코드에 서비스에 대한 실제 호출을 시도하거나 결과를 출력하는 시도가 표시되지 않습니다. user470714에 언급 된''trace '' 옵션뿐만 아니라''exceptions'' 옵션을 활성화하여 서버가 반환 한 "faults"가 클래스 SoapFault의 예외로 던져 지도록 할 수도 있습니다.분명히 빈 출력 페이지가 보이면 PHP [error reporting configured] (http://uk1.php.net/manual/en/errorfunc.configuration.php)를 올바르게 작성해야합니다. – IMSoP

답변

2

룩을 제안한다. 당신은 당신이하는 수단으로

  • SoapClient :: __ getLastRequestHeaders 사용
  • SoapClient :: __ getLastRequest
  • SoapClient :: __ getLastResponse
  • SoapClient :: __ getLastResponseHeaders 수 있음을 완료하면 최소한 전화가 끊기는 이유에 대한 피드백을 얻으십시오.