Entries in web services (10)
Errors are part of the (web) service
Since its launch in November 2006, Lokad has been providing a programmatic access to its forecasts through the Lokad Web API. Since the very first day, we have done our best to ensure the best forecasting accuracy. Yet, the future may not always be accurately predicted based on the sole historical data.
It is far better to foresee even without certainty than not to foresee at all. Henri Poincaré in The Foundations of Science, 1946
This situation is typically dealt with through an estimation of the forecast error: in addition to the forecast itself, an estimate of the forecast error is also computed. For example, this is the suggested approach for safety stock calculation.
Thus, we have decided to extend the Web API with estimated forecast errors. For any forecasting task, it is now possible to retrieve the Mean Absolute Percentage Error, see GetMape and GetMapes web methods. The new version of the Web API stays fully compatible with the existing applications.
Forecasting in Python - the Web Services tutorial
Lokad can be accessed programmatically through our web services. We are already providing tutorials for quite a few languages, namely C#, Java, PHP and C++.
But we were not providing any Python tutorials so far, although there are several promising ERP implemented in Python. If you're not convinced, have a look at TinyERP and ERP5.
Thanks to Maxim Krikun, we have now a complete Python tutorial that explains how to use our Forecasting Web Services. As usual, the source code has been released as open source on SourceForge.
C++ time-series forecasting tutorial with gSOAP
The Lokad forecasting technology is accessible through our Forecasting API. We already had published tutorials for C#, Java and PHP.
Thanks to the contribution of Tomasz Szulist, we have just published a new tutorial for C++. As usual, the source code is available as open-source on SourceForge. In order to communicate with SOAP, we have been using the excellent gSOAP toolkit. Check-it out.
Web Services get featured - ProgrammableWeb & eSigma
The Lokad forecasting technology can be integrated into any 3rd party applications through our Web Services. We have just been featured ProgrammableWeb along with 400 other major WS API available for custom application development. The Lokad Web Services are also listed on eSigma directory.
Although the adoption rate of the Web Services has been slow (400 API providers is notmuch for a technology that was already available in 2001), Web Services are now recognized industry standard, gaining a large momentum since 2006. Below, the growing curse by ProgrammableWeb for the number of mashups relying on public Web Services.
Web Services migration - Part 3/3
We have completed the Lokad Web Services migration (see also part #1 and #2) by updating www.lokad.com. The deprecated URL www.lokad.com/ws/TimeSeries.asmx is now redirecting toward ws.lokad.com/TimeSeries.asmx. As indicated in the previous posts, if you haven't already updated the URL used by your Lokad add-on, you need to update the WS URL in the add-on settings with the new URL.
Web Services migration - Part 2/3
Update on the part 1/3 of the Lokad Web Services migration.
We have re-released the sales forecasting add-ons
- Lokad Desktop Sales Forecasting v1.1.0
- Lokad ASP.NET Sales Forecasting v1.0.8
- Lokad osCommerce Sales Forecasting v2.0.2
- Lokad OpenShell Time Series Forecasting v1.0.1
See follow up #3.
Web Services migration - Part 1/3
We have started the migration of the Lokad Web Services.
The new WS URL is http://ws.lokad.com/TimeSeries.asmx
(The old URL was http://www.lokad.com/ws/TimeSeries.asmx)
The motivations behind this migration are very similar to app.lokad.com migration that we have previously discussed in this blog.
The old URL will continue to be functional until we have re-released all our packages with the updated default settings. You can already update the WS URLs in use in all your Lokad add-ons. We apologize for the inconvenience. The new WS URL should be much more "stable" for the time being.
Ps: The Lokad Sandbox is being updated in the similar manner.
The new WS URL is http://sandbox-ws.lokad.com/TimeSeries.asmx
(The old URL was http://sandbox.lokad.com/ws/TimeSeries.asmx)
Lokad Web Services and interoperability
Release of tutorials for Web Services in Java, C#.NET and PHP
In a recent entry on this blog, we announced the release of a tutorial on Lokad Web Services in C#. Studies of programming language market shares suggest that the most popular web languages are Java, C#.NET and PHP; so we had decided to provide tutorials for this three languages.
We have just released tutorials for Web Services in Java and PHP, as well as an update of the C#.NET tutorial. Source code demonstrating the functionalities is also available. You can download them at:
Web Services and interoperability
Lokad Web Services were initially developed in C#.NET; then we tried to create clients in PHP and Java to access them. This process highlighted some interesting interoperability issues.
Microsoft has included in the .NET framework a complete API to work with web services. It is at the same time simple, coherent and complete so it fully suits the needs of Lokad. Developing a client in C#.NET was really easy.
PHP did not raise specific problems. Since the language is not strongly typed, data types conversion are automatic (and not very secure). We used the NuSOAP toolkit which provided us with all the functionalities we needed. Low-level access to the requests helped us to set-up authentication.
Java was more difficult. Actually, Sun gives several APIs to develop Web Services servers and clients. We chose JAX-WS, the most recent and high-level of this APIs. Too bad this API is not fully compatible with Microsoft's (or the other way round).
First problem we ran into was authentication. .NET uses a SOAP header to transmit user name and password. JAX-WS does not provide a simple way to add such headers. We had to develop a heavy workaround, in the form of a SOAP handler that intercepts all requests and adds the correct header. That very problem is often raised on Java forums and never answered... see source code if you are interested!
Another problem was that we initially had two Web Services: one dedicated to time-series and the other to forecasting tasks. .NET's wdsl.exe can merge types when importing several WSDLs; Java's wsimport can't. Thus we ended with two identical but separate TimeSeries classes, one in each Web Service's namespace! We finally solved this by merging the two Web Services. This also allows to instantiate only one SOAP client instead of two, so we believe it is a better design choice.
Web Services Tutorial in C# (again)
We have just updated the Lokad website. The new version comes with an extensive tutorial to work with our Web Services in C#. Through this tutorial, you will learn how to perform programmatically the basic operations associated to your Lokad account (time-series and forecasts management). In case .Net/C# is not your preferred platform, don't worry. We have already planned to translate this tutorial for Java and PHP.
Btw, Happy New Year 2007
Web Services Tutorial in C#
The Lokad Web Services provide a programmatic access to all the Lokad features. Accessing the Lokad Web Services is easy and straighforward. We have just released a 100 lines .Net project that illustrates how to perform a full round-trip with our Web Services; first uploading some time-series data and finally retrieving forecasted time-series.
The source-code is available on CodePlex under a BSD license
http://www.codeplex.com/lokad/Release/ProjectReleases.aspx?ReleaseId=1342
An extensive tutorial explaining every line of this project is under way.