How to use a webservice? Options
Arnim
Posted: Saturday, October 20, 2007 1:50:12 PM

Rank: Devotee

Joined: 5/31/2007
Posts: 54
Location: Kirchheim Teck, Germany
Hello,

I'm about to realize a small tool for uploading and managing images remotely to umbraco - similar to Umbraco Tools, but only for images, small, handy and for entry-level users who want to mange their gallerys.

I would like to utilize the webservice but have absolutly no clue, where to start and how it works.

Where can I find documentation, sample sources or similar???


Thanx, Arnim.

What the heck is PHP? ;-)
chrism
Posted: Saturday, October 20, 2007 2:12:01 PM
Rank: Devotee

Joined: 1/11/2007
Posts: 57
hi arnim,

basically, use visual studio, on your project, click "Add Web Reference", point it to your site's address http://localhost/umbraco/webservices/api/[ServiceName].asmx, and it will show you the various functions of the web service. I assume these are documented in the documentation link on the homepage under MSDN style API or whatever its called.

Anyway, once you've added the reference you should be able to to an include/import in your code for
imports localhost.[ServiceName]

and then if vb, then
Dim s as new FileService
s.UploadFile(byte[], name) (i'm making that up!)

Hope that helps you... if you want any more assistance, someone has written the umbraco Xslt editor which is a pretty nifty tool and uses web services a bit. its on codeplex
http://www.codeplex.com/uxeditor/ so take a look at that.

the other thing you need to do is enable web services in your umbraco.config file, which you can do in notepad or whatever takes your fancy.

have a nice day,
chris
Arnim
Posted: Saturday, October 20, 2007 3:50:37 PM

Rank: Devotee

Joined: 5/31/2007
Posts: 54
Location: Kirchheim Teck, Germany
Fast answer! COOL!

I tried to run the XSLT Editor and encountered the following problems:

- Web services weren't enabled -> set enabled to True
- FilesService.asmx is placed inside webservices/api/ -> copied it to webservices/
- 'data' wasn't included -> included 'data'

When I now try to connect I get access to the XSLT Files but the connect dialog still is poping up immediatly after clicking ok. I can click cancel and browse through my XSLT-Files but Current Page dropdown stays empty.

What could I have forgotten, do I have to "install" the webservices someway?

Thanx, Arnim.

What the heck is PHP? ;-)
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.