Hallihallo und Grüße an die Community!
Habe ein (kleines?) Problem mit einem PhP-SOAP Client (PHP5.2). Dieser greift auf einen .NET-Webservice zu, der auf der gleichen Maschine liegt.
In meiner Entwicklungsumgebung (WinVista 32bit, XAMPP) funktioniert dieser problemlos. Wobei der .NET-Webserver hier nicht auf der selben Maschine liegt, sondern nur im gleichen Netzwerk...
Nach Übertragen der Website auf den Produktivserver (Win2003 Server 64bit, IIS 6, PHP5.2) funktioniert der SOAP-Zugriff leider nicht mehr. :-(
Der Fehler:
- Die Website (PHP / HTML) ansich wird korrekt geladen.
- Im Webservice wird KEINE Verbindung verzeichnet, weder erfolgreich noch erfolglos!
- Allerdings wird dem PhP-Client "Forbidden" als Fehler zurückgemeldet, und zwar beim ersten Aufruf einer beliebigen Webservice-Funktion (hier der var_dump der Exception):
	
		
Bisher Überprüft:
- Das WSDL wird korrekt geladen, die zur Verfügung stehenden Funktionen angezeigt (->__getFunctions()).
- Die Extensions sind sowohl im IIS freigegeben, als auch in der PHP.ini (php_info zeigt die Module korrekt an).
- Keine Zertifikate eingerichtet - werden derzeit auch noch nicht benötigt, SOAP-Kontenpunkte ohne Verschlüsselung (nur mit Transport-Authentifizierung).
- Firewall testweise komplett deaktiviert.
Die Connection wird über folgenden Aufruf aufgebaut:
	
Ein Funktionsaufruf, der den Fehler auslöst (Beispiel):
	
Weitere Ideen, wo der Fehler genau liegen könnte:
- Leider kein Schimmer mehr...
Hilfe!
Vielen Dank im Voraus,
LuWo (>',,'<)
					Habe ein (kleines?) Problem mit einem PhP-SOAP Client (PHP5.2). Dieser greift auf einen .NET-Webservice zu, der auf der gleichen Maschine liegt.
In meiner Entwicklungsumgebung (WinVista 32bit, XAMPP) funktioniert dieser problemlos. Wobei der .NET-Webserver hier nicht auf der selben Maschine liegt, sondern nur im gleichen Netzwerk...
Nach Übertragen der Website auf den Produktivserver (Win2003 Server 64bit, IIS 6, PHP5.2) funktioniert der SOAP-Zugriff leider nicht mehr. :-(
Der Fehler:
- Die Website (PHP / HTML) ansich wird korrekt geladen.
- Im Webservice wird KEINE Verbindung verzeichnet, weder erfolgreich noch erfolglos!
- Allerdings wird dem PhP-Client "Forbidden" als Fehler zurückgemeldet, und zwar beim ersten Aufruf einer beliebigen Webservice-Funktion (hier der var_dump der Exception):
			
			
				object(SoapFault)#5 (8) { ["message rotected"]=>  string(9) "Forbidden" ["string
rotected"]=>  string(9) "Forbidden" ["string rivate"]=>  string(0) "" ["code
rivate"]=>  string(0) "" ["code rotected"]=>  int(0) ["file
rotected"]=>  int(0) ["file rotected"]=>  string(59) "*****\soapCon.php" ["line
rotected"]=>  string(59) "*****\soapCon.php" ["line rotected"]=>  int(66) ["trace
rotected"]=>  int(66) ["trace rivate"]=>  array(7) { [0]=>  array(4) { ["function"]=>  string(11) "__doRequest" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(5) { [0]=>  string(252) " false " [1]=>  string(28) "*****" [2]=>  string(39) "*****/GetUser" [3]=>  int(1) [4]=>  int(0) } } [1]=>  array(4) { ["function"]=>  string(6) "__call" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(2) { [0]=>  string(7) "GetUser" [1]=>  array(1) { [0]=>  array(1) { ["zip"]=>  bool(false) } } } } [2]=>  array(6) { ["file"]=>  string(59) "*****\soapCon.php" ["line"]=>  int(66) ["function"]=>  string(7) "GetUser" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(1) { [0]=>  array(1) { ["zip"]=>  bool(false) } } } [3]=>  array(6) { ["file"]=>  string(56) "*****\user.php" ["line"]=>  int(31) ["function"]=>  string(7) "getUser" ["class"]=>  string(7) "soapCon" ["type"]=>  string(2) "::" ["args"]=>  array(1) { [0]=>  &string(5) "*****" } } [4]=>  array(6) { ["file"]=>  string(57) "*****\login.php" ["line"]=>  int(19) ["function"]=>  string(5) "login" ["class"]=>  string(4) "user" ["type"]=>  string(2) "->" ["args"]=>  array(2) { [0]=>  &string(5) "*****" [1]=>  &string(5) "*****" } } [5]=>  array(4) { ["file"]=>  string(63) "*****\page_header.php" ["line"]=>  int(45) ["args"]=>  array(1) { [0]=>  string(57) "*****\login.php" } ["function"]=>  string(12) "include_once" } [6]=>  array(4) { ["file"]=>  string(56) "*****\home.php" ["line"]=>  int(4) ["args"]=>  array(1) { [0]=>  string(63) "*****\page_header.php" } ["function"]=>  string(12) "include_once" } } ["faultstring"]=>  string(9) "Forbidden" ["faultcode"]=>  string(4) "HTTP" }
rivate"]=>  array(7) { [0]=>  array(4) { ["function"]=>  string(11) "__doRequest" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(5) { [0]=>  string(252) " false " [1]=>  string(28) "*****" [2]=>  string(39) "*****/GetUser" [3]=>  int(1) [4]=>  int(0) } } [1]=>  array(4) { ["function"]=>  string(6) "__call" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(2) { [0]=>  string(7) "GetUser" [1]=>  array(1) { [0]=>  array(1) { ["zip"]=>  bool(false) } } } } [2]=>  array(6) { ["file"]=>  string(59) "*****\soapCon.php" ["line"]=>  int(66) ["function"]=>  string(7) "GetUser" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(1) { [0]=>  array(1) { ["zip"]=>  bool(false) } } } [3]=>  array(6) { ["file"]=>  string(56) "*****\user.php" ["line"]=>  int(31) ["function"]=>  string(7) "getUser" ["class"]=>  string(7) "soapCon" ["type"]=>  string(2) "::" ["args"]=>  array(1) { [0]=>  &string(5) "*****" } } [4]=>  array(6) { ["file"]=>  string(57) "*****\login.php" ["line"]=>  int(19) ["function"]=>  string(5) "login" ["class"]=>  string(4) "user" ["type"]=>  string(2) "->" ["args"]=>  array(2) { [0]=>  &string(5) "*****" [1]=>  &string(5) "*****" } } [5]=>  array(4) { ["file"]=>  string(63) "*****\page_header.php" ["line"]=>  int(45) ["args"]=>  array(1) { [0]=>  string(57) "*****\login.php" } ["function"]=>  string(12) "include_once" } [6]=>  array(4) { ["file"]=>  string(56) "*****\home.php" ["line"]=>  int(4) ["args"]=>  array(1) { [0]=>  string(63) "*****\page_header.php" } ["function"]=>  string(12) "include_once" } } ["faultstring"]=>  string(9) "Forbidden" ["faultcode"]=>  string(4) "HTTP" }
			
		
	 rotected"]=>  string(9) "Forbidden" ["string
rotected"]=>  string(9) "Forbidden" ["string rivate"]=>  string(0) "" ["code
rivate"]=>  string(0) "" ["code rotected"]=>  int(0) ["file
rotected"]=>  int(0) ["file rotected"]=>  string(59) "*****\soapCon.php" ["line
rotected"]=>  string(59) "*****\soapCon.php" ["line rotected"]=>  int(66) ["trace
rotected"]=>  int(66) ["trace rivate"]=>  array(7) { [0]=>  array(4) { ["function"]=>  string(11) "__doRequest" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(5) { [0]=>  string(252) " false " [1]=>  string(28) "*****" [2]=>  string(39) "*****/GetUser" [3]=>  int(1) [4]=>  int(0) } } [1]=>  array(4) { ["function"]=>  string(6) "__call" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(2) { [0]=>  string(7) "GetUser" [1]=>  array(1) { [0]=>  array(1) { ["zip"]=>  bool(false) } } } } [2]=>  array(6) { ["file"]=>  string(59) "*****\soapCon.php" ["line"]=>  int(66) ["function"]=>  string(7) "GetUser" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(1) { [0]=>  array(1) { ["zip"]=>  bool(false) } } } [3]=>  array(6) { ["file"]=>  string(56) "*****\user.php" ["line"]=>  int(31) ["function"]=>  string(7) "getUser" ["class"]=>  string(7) "soapCon" ["type"]=>  string(2) "::" ["args"]=>  array(1) { [0]=>  &string(5) "*****" } } [4]=>  array(6) { ["file"]=>  string(57) "*****\login.php" ["line"]=>  int(19) ["function"]=>  string(5) "login" ["class"]=>  string(4) "user" ["type"]=>  string(2) "->" ["args"]=>  array(2) { [0]=>  &string(5) "*****" [1]=>  &string(5) "*****" } } [5]=>  array(4) { ["file"]=>  string(63) "*****\page_header.php" ["line"]=>  int(45) ["args"]=>  array(1) { [0]=>  string(57) "*****\login.php" } ["function"]=>  string(12) "include_once" } [6]=>  array(4) { ["file"]=>  string(56) "*****\home.php" ["line"]=>  int(4) ["args"]=>  array(1) { [0]=>  string(63) "*****\page_header.php" } ["function"]=>  string(12) "include_once" } } ["faultstring"]=>  string(9) "Forbidden" ["faultcode"]=>  string(4) "HTTP" }
rivate"]=>  array(7) { [0]=>  array(4) { ["function"]=>  string(11) "__doRequest" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(5) { [0]=>  string(252) " false " [1]=>  string(28) "*****" [2]=>  string(39) "*****/GetUser" [3]=>  int(1) [4]=>  int(0) } } [1]=>  array(4) { ["function"]=>  string(6) "__call" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(2) { [0]=>  string(7) "GetUser" [1]=>  array(1) { [0]=>  array(1) { ["zip"]=>  bool(false) } } } } [2]=>  array(6) { ["file"]=>  string(59) "*****\soapCon.php" ["line"]=>  int(66) ["function"]=>  string(7) "GetUser" ["class"]=>  string(10) "SoapClient" ["type"]=>  string(2) "->" ["args"]=>  array(1) { [0]=>  array(1) { ["zip"]=>  bool(false) } } } [3]=>  array(6) { ["file"]=>  string(56) "*****\user.php" ["line"]=>  int(31) ["function"]=>  string(7) "getUser" ["class"]=>  string(7) "soapCon" ["type"]=>  string(2) "::" ["args"]=>  array(1) { [0]=>  &string(5) "*****" } } [4]=>  array(6) { ["file"]=>  string(57) "*****\login.php" ["line"]=>  int(19) ["function"]=>  string(5) "login" ["class"]=>  string(4) "user" ["type"]=>  string(2) "->" ["args"]=>  array(2) { [0]=>  &string(5) "*****" [1]=>  &string(5) "*****" } } [5]=>  array(4) { ["file"]=>  string(63) "*****\page_header.php" ["line"]=>  int(45) ["args"]=>  array(1) { [0]=>  string(57) "*****\login.php" } ["function"]=>  string(12) "include_once" } [6]=>  array(4) { ["file"]=>  string(56) "*****\home.php" ["line"]=>  int(4) ["args"]=>  array(1) { [0]=>  string(63) "*****\page_header.php" } ["function"]=>  string(12) "include_once" } } ["faultstring"]=>  string(9) "Forbidden" ["faultcode"]=>  string(4) "HTTP" }
			
		Bisher Überprüft:
- Das WSDL wird korrekt geladen, die zur Verfügung stehenden Funktionen angezeigt (->__getFunctions()).
- Die Extensions sind sowohl im IIS freigegeben, als auch in der PHP.ini (php_info zeigt die Module korrekt an).
- Keine Zertifikate eingerichtet - werden derzeit auch noch nicht benötigt, SOAP-Kontenpunkte ohne Verschlüsselung (nur mit Transport-Authentifizierung).
- Firewall testweise komplett deaktiviert.
Die Connection wird über folgenden Aufruf aufgebaut:
PHP Code:
	
	
    soapCon::$client = new SoapClient($SOAP_wsdlPath, 
                                    array('login'    => $login,    
                                          'password' => $pw,    
                                          'trace'    => 1,
                                          'cache_wsdl' => 0,
                                          'connection_timeout' => 5)); 
Ein Funktionsaufruf, der den Fehler auslöst (Beispiel):
PHP Code:
	
	
$result = soapCon::$client->GetUser(array ('zip' => soapCon::$zip) ); 
- Leider kein Schimmer mehr...
Hilfe!
Vielen Dank im Voraus,
LuWo (>',,'<)
 
          
 PhP SOAP - "Forbidden"
									
									
									PhP SOAP - "Forbidden"
								
Comment