Hallo,
In der neuen Plugin Struktur wirft der Aufruf von $client = new Soapclient (…), einen Fehler aus (503 Service unavailable), während mit der alten Struktur die Abfrage ohne Fehler ausgeführt wird.
Kann da jemand helfen?
Neue Struktur (Fehler 503 Service unavailable):
'onPreDispatchCheckout'
);
}
/***
* @param \Enlight_Event_EventArgs $arguments
*/
public function onPreDispatchCheckout(\Enlight_Event_EventArgs $arguments)
{
/**@var $subject Shopware_Controllers_Frontend_Checkout */
$subject = $arguments->getSubject();
$request = $subject->Request();
$response = $subject->Response();
$action = $request->getActionName();
$view = $subject->View();
if(!$request->isDispatched()
|| $response->isException()
|| !$arguments->getSubject()->View()->hasTemplate()
) {
return;
}
try {
$client = new SoapClient('http://www.webservicex.net/geoipservice.asmx? WSDL',array('cache_wsdl' => WSDL_CACHE_NONE,'trace' => 1, 'exceptions' => true ));
} catch(Exception $e) {
var_dump($e);
}
}
}
Alte Struktur (ohne Fehler)
subscribeEvent('Enlight_Controller_Action_PreDispatch_Frontend','onPreDispatchCheckout',1);
}
public function onPreDispatchCheckout(Enlight_Event_EventArgs $arguments)
{
/**@var $subject Shopware_Controllers_Frontend_Checkout */
$subject = $arguments->getSubject();
$request = $subject->Request();
$response = $subject->Response();
$action = $request->getActionName();
$view = $subject->View();
if(!$request->isDispatched()
|| $response->isException()
|| !$arguments->getSubject()->View()->hasTemplate()
) {
return;
}
try {
$client = new SoapClient('http://www.webservicex.net/geoipservice.asmx?WSDL',array('cache_wsdl' => WSDL_CACHE_NONE,'trace' => 1, 'exceptions' => true ));
} catch(Exception $e) {
var_dump($e);
}
}
}