سؤال

مكررة من هذا السؤال

أحاول إنشاء خدمة ويب مع ZEND_SOAP_SERVER في وضع WSDL AutoDiscovery، لكنني أحصل على تأثيرات غريبة للغاية ... هنا الرمز: الخادم: giveacodicetagpre.

Soapactions Class: giveacodicetagpre.

}

حاولت استخدام الوظيفة Test1 و Test2 باستخدام فئة zend_soap_client، هنا الرمز: giveacodicetagpre.

لا أستطيع أن أفهم لأن وظيفة Test2 تعمل كما هو متوقع، وإرجاع وظيفة Test1 الاستثناء التالي:

استثناء soapfault: [المرسل] وظيفة ("Test1") ليست طريقة صالحة ل هذه الخدمة في /usr/local/zend/share/zendframework/library/zend/soap/client.php:1121. تتبع المكدس: 0 /usr/local/zend/share/zendframework/library/zend/soap/client.php(1121): soapclient -> __ soapcall ('test1'، صفيف، null، null، صفيف) 1 /usr/local/zend/apache2/htdocs/webservice/client.php(6): zend_soap_client -> __ استدعاء ('test1'، مجموعة مصفوفة) 2 /usr/local/zend/apache2/htdocs/webservice/client.php(6): zend_soap_client-> test1 ('foo'، bar ') 3 {الرئيسية}

حاولت عكس اسم الوظائف ... النتيجة لا تصدق، يعمل فقط Test2! أحصل على مجنون، يبدو أنه في مكان ما على جانب الخادم يوفر اسم الوظيفة ...

هل يمكن لشخص ما مساعدتي؟

هل كانت مفيدة؟

المحلول

SOLVED! The problem was this setting in the php.ini file:

soap.wsdl_cache_enabled=1

I set this to 0 and now it works fine!

نصائح أخرى

If you don't want change your php.ini:

// WSDL_CACHE_NONE;     /* 0 Pas de cache */
// WSDL_CACHE_DISK;     /* 1 Sur le disque supprimer le fichier pour le réinitialiser */
// WSDL_CACHE_MEMORY;   /* 2 En mémoire => redémarrer Apache pour le réinitialiser */
// WSDL_CACHE_BOTH;     /* 3 En mémoire et sur le disque */

$options = array();
$options['cache_wsdl'] = WSDL_CACHE_NONE;
$client = new Zend_Soap_Client("http://localhost:8083/server.php?wsdl", $options);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top