DonorHub ®
Bridging the information gap between you and your staff...

Can I use a SOAP/XML Web Service to query the donation data? If so, how?: Revision #1

You are currently reviewing an older revision of this page. Go to current version

Can I programmatically query the the donation data from another application? If so, how?

SOAP/XML

TntMPD.DataServer provides a SOAP/XML end point that other web applications can use to query donation data.  The Staff Portal which is included with TntMPD.DataServer gets all of its data exclusively through this web service.  If you can see something on the Staff Portal, you can programmatically retrieve the same information.

Here's a demo of the Staff Portal:
https://dataserver.tntware.com/dataserver/test/staffportal/default.aspx<o:p></o:p>

Here are demos of the SOAP web service endpoints where the Staff Portal gets its data:
https://dataserver.tntware.com/dataserver/test/dataquery/dataqueryservice.asmx
https://dataserver.tntware.com/dataserver/test/gcxauthentication/gcxauthenticationservice.asmx

[Caveat: The "Demo" Staff Portal uses a special "Test Authentication" and not "GCX Authentication" service which is available here.]<o:p></o:p>

<o:p></o:p>

The Staff Portal works with GCX single sign on.  The main way authentication works with the DataQuery service is through a session id.  Let me explain:  When the user comes to the Staff Portal, it authenticates via GCX single sign on and gets a service ticket.  It passes in the service name and service ticket to the Data Query method "Login(ServiceName, ServiceTicket)" which returns a SessionID, UserName, and UserIsRegistered.  You need to persists the SessionID as this is used for all subsequent method calls.  If the user is not registered, you need to prompt the user for a registration code and submit it to the method "RegisterUser(SessionID, RegistrationCode)" until the user is registered.

The Staff Portal is a good working model on how to use the web services.  If you'd like to look over the Staff Portal source code, it's available here (written in Delphi.NET as an ASP.NET application):
https://dataserver.tntware.com/dataserver/test/staffportal/staffportal_source.zip

Trusted Portal URL Prefixes

To ensure that only trusted web applications are querying a user's donation data on their behalf (via the SOAP/XML api), TntMPD.DataServer requires you to maintain a list of "URL Prefixes".  This is available under: Tools | System Setup | Portal.  Here you'll notice a link to "(edit prefix list)" and a link to "(view log)".  When you're first getting started the "view log" option is handy as you can see exactly what's being attempted (but not "accepted").  If you see your portal in the log, copy the left most significant part of the URL (enough to make it "trusted" and add it to the list of trusted prefixes.

The TntMPD Query.ini/CSV model

As an alternative to SOAP/XML with support for GCX Single Sign-on, you can also programatically query donation information the same way TntMPD does.  Here's documentationion on how this protocol works:
http://www.tntware.com/tntmpd/faqs/en/how-can-i-make-my-organization-s-online-donation-system-compatible-with-tntmpd.aspx

To know the Query.ini URL of your organization, in TntMPD.DataServer, under the "Tools" menu, click on "View Web URLs".  The query.ini url of the demo Staff Portal is here:
https://dataserver.tntware.com/dataserver/test/dataquery/TntQuery.aspx

One advantage of using the TntMPD Query.ini programming model is that you can support a larger variety of organizations (not just those that use TntMPD.DataServer).  Here's an actively maintained list of organizations that use TntMPD, along with their query.ini URL:
http://download.tntware.com/tntmpd/TntMPD_Organizations.csv

The main disadvantage of this approach is that you must ask the user for their login and password.  In other words, if your writing a web application that is already GCX Single Sign-on enabled, the SOAP/XML api can allow you to query the user's data without prompting them for credentials, but the TntMPD Query.ini api would require you to ask the user for their credentials.
<o:p> </o:p>

<o:p></o:p>

© 2024 TntWare, Inc. | Privacy | Terms of Use