Simple Web Service to create categorised pages programmatically Options
twynham
Posted: Friday, August 18, 2006 12:05:47 PM
Rank: Devotee

Joined: 7/28/2006
Posts: 57
Folks,

Here is my first attempt at writing a web service for Umbraco:

www.bawden-quinn.co.uk/gpl/umbraco/umbSimpleWS.asmx.txt

Typical problem - I needed to take a feed of new items (which could be weblog posts, news, products, etc) from an internal CRM system and save them on the website 300 miles away, filed under a particular category. If the category doesn't already exist, it should be created. Clearly, this principle could be further extended.

It takes parameters of:

startID - parent folder (which holds the categories)
categoryName - name of category (to find / create)
pageTitle - title of page
pageContent - content of page

It returns the ID of the page just created.

I'm not convinced my way of finding the category (using XML) is particularly efficient, but it appears to work OK. Naturally, some security will also be needed in the finished work - probably IP address restrictions / authentication / etc.

Enjoy!

Stewart

Bawden Quinn Associates, UK
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.