בעיה עם SOAP

tochnitanit

New member
בעיה עם SOAP

I have a php code that uses soap I get the error ERROR: WSDL - SOAP-ERROR: Parsing WSDL: Couldn't load from it's a security wsdl so i need to send also username and password. what is wrong in my code? I see it at web and does'nt work from soap in php code. here is my code:

$soap_url = 'http://some-ip/prod/app/soap/user/storeitemws?WSDL';

$sh_param = array(
'username' => 'aya',
'password' => 'aya');

$soap_client = new SoapClient($soap_url);

$test = $soap_client->Authenticate($sh_param);

echo $test . "\nDone";

?> thanks
if I go to it from the browser it askes for username and password.
 

bnayal

New member
פשוט לקרוא את התיעוד

הבנאי (constructor) של המחלקה SoapClient מקבל פרמטר ראשון כתובת של ה WSDL ופרמטר שני מערך של אפשרויות.
http://il.php.net/manual/en/soapclient.soapclient.php
את אמורה להשתמש ככה:

$client = new SoapClient("some.wsdl", array('login' => "some_name", 'password' => "some_password"));

לגבי הפונקציה Authenticate - אין לי מושג מאיפה הבאת אותה, אבל היא לא קיימת במחלקה (לא לפי התיעוד לפחות) ופונקציות מהWSDL כנראה שעדיין לא שמישות לך...

בהצלחה ועדכני תוצאות,
בניה
 

bnayal

New member
ניסית כמו הדוגמא שצירפתי? מה השגיאה?

מה לא עובד?
 

bnayal

New member
כלומר זה עובד או לא?

לא ביצעת שום פעולה בSOAP ולא עשית שום פלט, אז יש סיבה שלא יהיה דף ריק?
 

tochnitanit

New member
לא

עשיתי אח"כ ECHO ולא רואים זאת
כך שזה אומר שלא עבר את השורה הזו
 

bnayal

New member
מוזר. יש לך error reporting מלא?

קשה לעזור בלי אפשרות לנסות...
 
למעלה