2013-01-15 2 views
1

이 내 오렌지 서버와 내 웹 사이트에 연결할 수없는 경우,이 오류가 다가오고 :PHP의 OOP 치명적인 오류 : catch되지 않은 SOAPFault의 예외 :

것은 나는 SSL과 비누를 사용하도록 설정하지만 여전히 작동하지 않습니다.

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: 
Parsing WSDL: Couldn't load from 'https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl': 
Start tag expected, '<' not found in C:\xampp\htdocs\test\library\connect.class.php:10 

Stack trace: #0 C:\xampp\htdocs\test\library\connect.class.php(10): SoapClient->SoapClient('https://m2mconn...') 
#1 C:\xampp\htdocs\test\application\views\items\homepage.php(20): Connect->__construct() 
#2 C:\xampp\htdocs\test\library\template.class.php(30): include('C:\xampp\htdocs...') 
#3 C:\xampp\htdocs\test\library\controller.class.php(25): Template->render() 
#4 C:\xampp\htdocs\test\library\shared.php(91): Controller->__destruct() 
#5 C:\xampp\htdocs\test\library\shared.php(91): callHook() 
#6 C:\xampp\htdocs\test\library\bootstrap.php(4): require_once('C:\xampp\htdocs...') 
#7 C:\xampp\htdocs\test\public\index.php(8): require_once('C:\xampp\htdocs...') 
#8 {main} thrown in C:\xampp\htdocs\test\library\connect.class.php on line 10 
+0

'시작 태그가 필요합니다', '<'를 찾을 수 없습니다 '는 분명해야합니까? 내가 다운로드 한 소스 코드를 보면 거기에 오류가있을 수 있습니다. –

답변

1

는 로컬 파일에 WSDL을 저장 시도하고 생성자에서 ...

편집
$client = new SoapClient('/local/path/to/wsdlfile.wsdl'); 

것을 참조 : 파일 시스템을 사용하는 동안 HTTP 오류가 있어요, 당신이하고있는 뭔가 잘못 됐어 :-)

나는 이걸 스스로 시험해 보려고했는데 이것들이 내 대답이다. 참고 : 나는 문제뿐만 아니라 오렌지 서버에 연결 했어 ... 그들의 HTTPS 연결이 다소 냄새 나는 것을 수 있습니다

신선한 SoapClient 바르 - 덤프 :

$> php -r "var_dump(new SoapClient('https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl'));" 
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl' : 
failed to load external entity "https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl" 
in Command line code on line 1 
PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl' : 
failed to load external entity "https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl" 
in Command line code:1 
Stack trace: 
#0 Command line code(1): SoapClient->SoapClient('https://m2mconn...') 
#1 {main} 
    thrown in Command line code on line 1 

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl' : 
failed to load external entity "https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl" 
in Command line code:1 
Stack trace: 
#0 Command line code(1): SoapClient->SoapClient('https://m2mconn...') 
#1 {main} 
    thrown in Command line code on line 1 

Wget'ing을 WSDL :

$> wget https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl -O MSBC.wsdl 
--19:41:45-- https://m2mconnect.orange.co.uk/orange-soap/services/MessageServiceByCountry?wsdl 
      => `MSBC.wsdl' 
Resolving m2mconnect.orange.co.uk... done. 
Connecting to m2mconnect.orange.co.uk[213.52.171.155]:443... connected. 

Unable to establish SSL connection. 

Unable to establish SSL connection. 

가 브라우저를 통해 WSDL을 다운로드하고 사용하는 일이 :

$> php -r "$s = new SoapClient('MSBC2.wsdl');var_dump($s, $s->__getFunctions());" 
object(SoapClient)#1 (2) { 
    ["_soap_version"]=> 
    int(1) 
    ["sdl"]=> 
    resource(6) of type (Unknown) 
} 
array(11) { 
    [0]=> 
    string(133) "int sendMessage(string $username, string $password, string $deviceMSISDN, string $message, boolean $deliveryReport, string $mtBearer)" 
    [1]=> 
    string(116) "ArrayOf_xsd_string getDeliveryReports(string $username, string $password, string $deviceMSISDN, string $countryCode)" 
    [2]=> 
    string(122) "ArrayOf_xsd_string readMessages(string $username, string $password, int $count, string $deviceMsisdn, string $countryCode)" 
    [3]=> 
    string(100) "boolean flushMessages(string $username, string $password, string $deviceMSISDN, string $countryCode)" 
    [4]=> 
    string(139) "ArrayOf_xsd_string waitForMessage(string $username, string $password, int $timeout, string $deviceMSISDN, int $msgref, string $countryCode)" 
    [5]=> 
    string(204) "int sendMessageWithValidityPeriod(string $username, string $password, string $deviceMSISDN, string $message, boolean $deliveryReport, string $mtBearer, string $binarySmsDcs, string $validityDaysHoursMins)" 
    [6]=> 
    string(164) "int sendBinarySmsMessage(string $username, string $password, string $deviceMSISDN, string $message, boolean $deliveryReport, string $mtBearer, string $binarySmsDcs)" 
    [7]=> 
    string(162) "ArrayOf_xsd_string sendAndWait(string $username, string $password, int $timeout, string $deviceMSISDN, string $message, boolean $deliveryReport, string $mtBearer)" 
    [8]=> 
    string(193) "ArrayOf_xsd_string sendBinarySmsAndWait(string $username, string $password, int $timeout, string $deviceMSISDN, string $message, boolean $deliveryReport, string $mtBearer, string $binarySmsDcs)" 
    [9]=> 
    string(122) "ArrayOf_xsd_string peekMessages(string $username, string $password, int $count, string $deviceMsisdn, string $countryCode)" 
    [10]=> 
    string(142) "ArrayOf_xsd_string getDeliveryReportsFromDate(string $username, string $password, string $deviceMSISDN, string $countryCode, string $fromDate)" 
} 

$> 

유효한 세부 정보가 없으므로 메소드 중 하나를 호출 할 수 없습니다.

+0

지금이 오류가 있습니다. 치명적인 오류 : Unapaught SoapFault 예외 : [HTTP] 오류 HTTP 헤더를 가져 오는 중 –

1

[WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from ...

WSDL을 가정하고 서비스가 인터넷에 실제로 액세스,이 스크립트는 원격 웹 서비스에 연결할 수 없습니다 의미 -는 WSDL을 다운로드 할 수 있으며,이 서비스를 호출 할 수 있습니다. 서버의 네트워크 연결 (특히 아웃 바운드)을 확인해야합니다. 방화벽/구성이 아웃 바운드 연결을 중지 할 수 있으므로 호스트에 요청해야 할 수 있습니다.

관련 문제