NuSoap Sample(s) |
Site Admin
|
Soap is a protocol that requires two parts to be involved.
First one is close-end server that runs requests on the far-end server and shows results to the client. NuSoap library can run on either or on both of them. If you want to run NuSoap server on the far-end server (SOAP server) you'd create a php file and use it in your WSDL URL. For example, suppose you have a php function on far-end server and you want it to be run via SOAP protocol:
You see that this you have to define input and output parameters for your function and register it with instance of soap_server class. This way you can register as many functions as you wish. All of them can be invoked by any SOAP-compatible clients, not only NuSoap. Target WSDL document is generated using data registered in $server->register() method call. Suppose you placed test.php file shown above in the root of you web. It means that the target WSDL URL should be http://yourserver/test.php?wsdl If you run this link without wsdl argument you'll see a short description in HTML form. Now few hints about close-end server (SOAP client). It can run a given method on a given SOAP server using WSDL URL. For example with the far-end server sample shown above it can be done using the following way:
Now about NuSoap wizard. It can generate a code sample shown above to be run on SOAP client side (close-end server). First it ask if you know a particular WSDL URL or want to select one from the public domain (service). Once WSDL URL is given you are able to select an operation (hello function in our case). Once operation is selected you can see all necessary arguments for it and you can type values that the call should be generated with. |
||||||||||||||||
|
|
OK!!!
It's very interesting!! ALVARO. |
||||||||||||
|
NuSoap Sample(s) |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by