#native_company# #native_desc#

Building Web Services Using NuSOAP Toolkit Page 6

By Mitja Kramberger
on December 26, 2003

So where’s the difference? When we’re creating “soapclient” object we now pass URL to the WSDL file (second argument tells the client that we are
using WSDL). Next we generate proxy class (line 15); we simply call “getProxy” method and that’s all.
Now we have in our proxy class all the methods that our web service has. So we can “locally” access “getWeather” method, which sends and returns
data from web service. Lastly, we do the same error checking just like in previous client.
I have told you that you can get all the needed data from WSDL (webmethod name and required parameter). You can take a look at WSDL file,
which is accessed from http://somewhere.org/soap/server.php?wsdl (use parameter wsdl), but if you go to http://somewhere.org/soap/server.php
you will get nice GUI which tells us accessible methods and required parameters. This GUI and WSDL is created by NuSOAP toolkit, it’s accessible
because we generated WSDL in the server.


This was just a simple example of using SOAP with NuSOAP toolkit. You could build the same system using XML-RPC or WDDX but SOAP has some
other “goodies” like advance error checking, XSD validation and other cool stuff. You can also just use web service (there are some good web services
resources like www.xmethods.com). So dig into SOAP and NuSOAP API documentation.
Happy messaging!
You can download the full source code