newbie questions...gadget SDK
Hi,
Can anybody explain me :
1)What all values can be stored for p_args argument of the gadget class function?
I saw few of the values in the samples like "module","dashboard"....
2)What do these values indicate?
3) For testing purposes, I am planning to use existing web services listed in this site..( I am new to web services also.)
http://www.webservicex.net/WS/WSDetails.aspx?CATID=12&WSID=56
I am not sure if I can use them in the gadget building directly..And if I can, what all functions do I need to make a call to these services.
I would appreciate any suggestions...
Thanks..
[821 byte] By [
Raros] at [2008-1-12]
p_args: Module is probably the most useful bit. In general you probably won't ever need to look at the rest. If you write your own bindings, you can pass whatever you want into their p_args.
Web services: The service you linked to is a SOAP service. Most SOAP services are POST-only, which is a problem because the live.com framework doesn't currently proxy XMLPost calls (you need proxying to bypass cross-domain security restrictions). It looks like the weather service you linked supports SOAP over HTTP-GET, which is what you'll need to use. For example, http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry?CountryName=US. You'll want to use the Web.Network.createRequest() method to make your call (the SDK has examples).
BTW, using this web service is going to suck pretty hard. The output of the API calls are strings containing XML, not actual XML nodes. That means that when you get your response back to the gadget, you'll have to pull out the <string> node (it's the root), grab its text, and load that into an XMLDocument to actually be able to do anything useful with it.
Thanks ToddOs for your answers...
can I find a list of attributes somewhere on p_args.module...because everytime I see a new gadget it uses another attribute like for e.g.
in one of the gadget I found this code:
m_strlanguage = m_module.getLanguage();
m_strtitle = m_module.getTitle();