XPO through XML Web Services - a new detail

XPO Team Blog
13 July 2006

I have previously blogged about our knowledge base article AK3911, which describes an approach to tunneling XPO’s IDataStore layer communications through XML Web Services. There’s news in this regard – no special client is needed for this any longer. The feature has actually been around since version 6.1.4, but somebody forgot to tell us about it :-)

How does it work? Very simple: the client-side functionality from the demo project of AK3911 has been integrated into XPO itself. That demo project implements a class called WebDataStore on the client side and uses that class to communicate with the Web Service on the server side. The Main method contains this code to build up the XPO data connection:

  XpoDefault.DataLayer = new SimpleDataLayer(new WebDataStore("http://localhost:2224/XpoGate/Xpo.asmx"));

With the new feature, this is no longer needed, so the WebDataStore class can be removed from the demo project. Instead of the line above, the Main method should have this line:

  XpoDefault.DataLayer = XpoDefault.GetDataLayer("http://localhost:2224/XpoGate/Xpo.asmx", AutoCreateOption.SchemaAlreadyExists);

XPO will find the extension .asmx on the end of the connection string URL and automatically connect to the given Web Service. On the server side, you can either go the lazy way that the knowledge base article suggests and only implement the two methods SelectData(…) and ModifyData(…) (in that case, make sure to use AutoCreateOption.SchemaAlreadyExists, as shown above), or you can implement all methods from the IDataStore interface for complete functionality.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
Tags
No Comments

Please login or register to post comments.