|
|
|
Forum Member
Group: Forum Members
Last Login: 10/20/2005 2:27:00 PM
Posts: 4,
Visits: 1
|
|
I made a simple application that uses the NewsGator API to sync subscriptions and store the feeds on my local server. I was not sending the Developer Token, and as of the update yesterday, the application broke because of this. So, i am in the process of updating the application to use the Developer Token to make all calls to the API.
I have been able to get the GetUpdates() method of the SubscriptionWebService object to work, regardless of the token i set for the object. I am able to call the GetSubscriptionList method, however.
For example, the following code runs fine until the SubSvc.GetUpdates call. Does the GetSubscriptionList not require the API token and the GetUpdates does?
SubSvc.NGAPITokenValue = New com.newsgator.services1.NGAPIToken SubSvc.NGAPITokenValue.Token = config.NGAPIToken xe = SubSvc.GetSubscriptionList(config.Location, lastSubUpdate.SyncToken) arrStr = SubSvc.GetUpdates(config.Location, lastSubUpdate.SyncToken, newToken)
Any suggestions would be appreciated.
Thanks, Brian
----------------------------------- Brian Go BIG Network
|
|
|
|
|
Rockstar
Group: Forum Members
Last Login: 3/27/2007 8:15:46 AM
Posts: 125,
Visits: 19
|
|
| Ok, it turns out that GetUpdates isn't reading the token, but it's trying to set up a transaction context which is probably causing it to blow up. Give me a little bit to get this fixed...
|
|
|
|
|
Forum Member
Group: Forum Members
Last Login: 10/17/2008 4:50:59 PM
Posts: 10,
Visits: 8
|
|
Yes, I've had much of my work break, also. And I was sending the token, but obviously not doing it corrently. Do you have a sample SOAP request with the developer token embedded in it, so that I can figure out how to make my PHP SOAP call?
Shelley
|
|
|
|
|
Rockstar
Group: Forum Members
Last Login: 3/27/2007 8:15:46 AM
Posts: 125,
Visits: 19
|
|
Here's a live capture from the sample app:
POST /ngws/svc/Subscription.asmx HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.2032) Content-Type: text/xml; ch****t=utf-8 SOAPAction: "http://services.newsgator.com/svc/Subscription.asmx/GetSubscriptionList" Authorization: Digest username="elaina w",realm="NewsGator Online Services",nonce="MTAvMTkvMjAwNSA5OjAzOjUyIFBN",uri="/ngws/svc/Subscription.asmx",algorithm="MD5",cnonce="3a31a66d0b553801518c5e33c432d63a",nc=00000001,qop="auth",response="fb3e2828a4eda16c3946b6996c3cfe5d",opaque="0000000000000000" Content-Length: 588 Connection: Keep-Alive Host: services.newsgator.com
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Header> <NGAPIToken xmlns="http://services.newsgator.com/svc/Subscription.asmx"> <Token>A8A8A9B5DC8240a4B1065C8CE4771074</Token> </NGAPIToken> </soap:Header> <soap:Body> <GetSubscriptionList xmlns="http://services.newsgator.com/svc/Subscription.asmx"> <location>nggordon</location> <syncToken>MDEyMDA1LTEwLTE5VDIxOjAyOjAw</syncToken> </GetSubscriptionList> </soap:Body> </soap:Envelope>
I also worked up a simple PHP example at http://www.agileprogrammer.com/eightytwenty/archive/2005/10/18/8745.aspx I'm sure I violated all sorts of PHP coding rules but it does work. The tricky thing about the API token header is that it takes on the namespace of the web service being called.
|
|
|
|
|
Forum Member
Group: Forum Members
Last Login: 10/20/2005 2:27:00 PM
Posts: 4,
Visits: 1
|
|
The issue with GetUpdates is a separate issue, correct? Any ETA on when it might be fixed?
Thanks, Brian
----------------------------------- Brian Go BIG Network
|
|
|
|
|
Forum Member
Group: Forum Members
Last Login: 10/17/2008 4:50:59 PM
Posts: 10,
Visits: 8
|
|
Thanks, I've got the tokens working. Sorry to have added an off-topic post.
Shelley
|
|
|
|
|
Rockstar
Group: Forum Members
Last Login: 3/27/2007 8:15:46 AM
Posts: 125,
Visits: 19
|
|
| Rawdrib, sorry, forgot to mention that I loaded a fix for GetUpdates around 17:00 MDT yesterday, are you still broken?
|
|
|
|
|
Forum Member
Group: Forum Members
Last Login: 10/20/2005 2:27:00 PM
Posts: 4,
Visits: 1
|
|
It wasn't working until i reloaded the Web References in my .NET project. Weird...shouldn't that update automatically if the web service changes?
Thanks for the quick response!
----------------------------------- Brian Go BIG Network
|
|
|
|
|
Rockstar
Group: Forum Members
Last Login: 3/27/2007 8:15:46 AM
Posts: 125,
Visits: 19
|
|
| Ah, you may have to reload them again, then. I left the Token header declaration off of that method, though it was expecting a token, which is why that method would blow up.
|
|
|
|