Use WCF for create a News
How can I use ~/sitefinity/Services/Content/NewsItemmService.svc
for create and update a news?
Your WCF client example (VS 2010 solution) conyains only list and delete news methods.
The documentation on this is pretty useless.
How do I know which fields are required in the passed JSON?
And how do I know what values I can / should I use?
How can I publish/unpublish the news?
"Item":
"AllowComments":false,
"AvailableLanguages": ["it"],
"DateCreated":"\/Date(1321007676307)\/",
"PublicationDate": "\/Date(1321007676307)\/" ,
"Title":"PersistedValue": "Test 1", "Value": "Test 1" ,
"UrlName":"PersistedValue": "Test-1", "Value":"Test-1" ,
"Author":"PersistedValue": "Test page", "Value":"Test page" ,
"Content":"PersistedValue": "Lorem ipsum...", "Value":"Lorem ipsum..." ,
"Summary":"PersistedValue": "", "Value":""
I would also like to see some answers on this question.
Hi guys,
I'm attaching an example of creating a News Item, using Sitefinity's services. Mind that you have to specify credentials of a user that has create/edit permissions for news items, so that the service can be consumed. You can also check this blog post for more general information on Sitefinity's RESTful services:
http://www.sitefinity.com/blogs/svetlayankova/posts/11-11-01/getting_started_with_restful_services_in_sitefinity.aspx
Considering the required fields - they are the same as they would be if you created a NewsItem from the backend. It should have a Title, UrlName, Content, PublicationDate and an Author. Considering the error that is thrown to you, I think the reason is this line:
"AllowComments":false,