ClipPosts

Newsgator Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



ClipPosts Expand / Collapse
Author
Message
Posted 12/29/2005 2:15:12 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 5/16/2008 11:19:58 AM
Posts: 33, Visits: 4
I wasn't entirely sure if we could issue POST statements for the ClipPosts as there was no form or sample in the docs. None the less, with this code:


function ngtoolkitClip(link, page) {
var which = link || page;
var postidXMLHttpRequest = new XMLHttpRequest();
postidXMLHttpRequest.open('POST',"http://services.newsgator.com/ngws/svc/PostItem.asmx/GetPostId");
postidXMLHttpRequest.setRequestHeader('X-NGAPIToken','6CE7A0D1DDF64CAA85D775B19B5714C6');
postidXMLHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
postidXMLHttpRequest.onreadystatechange= function () {
if (postidXMLHttpRequest.readyState==4) {
var response = postidXMLHttpRequest.responseText;
var match = response.match("<string xmlns=\"http:\/\/services.newsgator.com/ngws/svc/PostItem.asmx\">([^`]*?)<\/string>");
var clipXMLHttpRequest = new XMLHttpRequest();
clipXMLHttpRequest.open('POST',"http://services.newsgator.com/ngws/svc/PostItem.asmx/ClipPosts");
clipXMLHttpRequest.setRequestHeader('X-NGAPIToken','6CE7A0D1DDF64CAA85D775B19B5714C6');
clipXMLHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
clipXMLHttpRequest.onreadystatechange= function () {
if (clipXMLHttpRequest.readyState==4) {
var response = clipXMLHttpRequest.responseText;
alert(match[1]);
alert(response);

}
}
clipXMLHttpRequest.send("postId=" + match[1] + "&folderId=0");
}
}
postidXMLHttpRequest.send("url=" + link);

}


response comes back as

ClipPosts Web Service method name is not valid


Any ideas on what I'm doing wrong?
Post #10643
Posted 12/29/2005 11:39:10 AM
Rockstar

Rockstar

Group: Forum Members
Last Login: 3/27/2007 8:15:46 AM
Posts: 125, Visits: 19
Yeah, that's the trouble, ASP.NET won't marshal the array argument in a POST. This one has to go up as SOAP, unless I deploy a simpler version that clips only one post at a time, but that will take some time to get out to production.
Post #10661
« Prev Topic | Next Topic »


All times are GMT -7:00, Time now is 12:03pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.234. 9 queries. Compression Disabled.

NewsGator.com | Support | Developers | Partners | Press | Company
© Copyright 2003-2009  NewsGator Technologies, Inc. All Rights Reserved.
Copyright Information | Privacy Policy | Terms of Service
Microsoft Gold Certified Partner