|
|
|
I was working with SOAP for the first time and I had to create a client that sent a date range to a WSDL (Web Services Description Language) to return some information I needed. I didn't know how to pass the params and there really was no documentation about it. The main thing you have to make sure to do is when you pass params to a method that is definied by the WSDL that you are calling is that you use the same param name for the key of the array or the object variable as shown below. Also, if you don't know what the methods/functions that a WSDL has or the params that you need to pass it you can use the __getFunctions() and __getTypes() methods after you declare your new SoapClient.
| <?php
$params["From"] = "06/01/2005"; // also can use $params->From = "date";
$params["to"] = "12/31/2005"; // also can use $params->to = "date";
$client = new SoapClient("some.wsdl");
try {
print($client->execute($params));
} catch (SoapFault $exception) {
echo $exception;
}
?> | | |
|
| file class , uploade file , download file already uploaded on another website Categories : PHP, PHP Classes, Filesystem, Web Services | | | Basic Authentication with sessions Categories : PHP, Beginner Guides, Authentication, Form Processing, Sessions | | | Introduction to Language Files Categories : PHP, Filesystem, Beginner Guides | | | email new items in db Categories : PHP, Email, Databases, MySQL, Beginner Guides | | | PHP Email image generator - hide your email from bots - using the GD Library Categories : PHP, Graphics, GD image library, Beginner Guides | | | Newbie Notes #8 - A cron trick Categories : PHP, CURL, Beginner Guides | | | a PHP Function to Get only the filename (remove the extension) using regular expressions. Categories : PHP, Regexps, Beginner Guides | | | A beginner's session handling class Categories : PHP, PHP Classes, Sessions, Beginner Guides | | | A very simple PHP single password cookie based login without usernames. Categories : PHP, Cookies, Security, Beginner Guides | | | PHP based Contact email form with multiple recipients, text file based, supports departments. Categories : PHP, Email, Beginner Guides, Filesystem | | | Db_lib - practical example usage of database abstraction and form validation.
Categories : PHP, Form Processing, PHP Classes, Data Validation, Beginner Guides | | | Easy alert box pop-up function Categories : PHP, Java Script, Beginner Guides | | | How to update selected fields only Categories : PHP, Databases, Beginner Guides | | | Beginners Array Functions Categories : PHP, Beginner Guides, Arrays | | | Newbie Notes #7 - Ridiculous regex Categories : PHP, Beginner Guides, Regexps | |
|
|
|