Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Dataset Schema for API
Last Post 11/06/2014 10:00 AM by Peter Donker. 5 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Ray Hastie
New Member
New Member
Posts:8


--
04/15/2011 10:10 PM
I am trying to code the functions to utilize the SetEntry and the LockEntry procedures to save and lock entries through the API.

Both of these procedures require a Dataset as an argument in the calls.

The signature for these procs are:

public bool LockEntry(System.Data.DataSet Entry, System.Guid LockKey, MethodsBiz.wsDMX.TimeSpan LockDuration)

public bool LockEntry(System.Data.DataSet Entry, System.Guid LockKey, .wsDMX.TimeSpan LockDuration)

public int wsDMX.SetEntry(System.Data.DataSet Entry)

I attempted to code the wsDMX.Service.GetEntry(int) procedure since that returns the Dataset, hoping that it would give me a clue as to how the dataset should be designed, but I the code resulted in an error being thrown.

Code for the GetEntry proc:

public bool GetEntry(int EntityID)
{
bool bRtn = false;

try
{

}
wsDMX.Service ssc = this.CreateWebService();
DataSet ds = ssc.GetEntry(EntityID);
DataTable dt = ds.Tables[0];

bRtn = true;


return bRtn;
}

The resulting exception:

System.InvalidOperationException was unhandled
Message=There is an error in XML document (1, 4254).
Source=System.Xml
StackTrace:
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at MethodsBiz.wsDMX.Service.GetEntry(Int32 EntryId) in C:\Documents and Settings\rhastie\my documents\visual studio 2010\Projects\MethodsConsoleGUI\MethodsBiz\Web References\wsDMX\Reference.cs:line 439
at MethodsBiz.DMXFileCollection.LockFile(Int32 EntityID) in C:\Documents and Settings\rhastie\my documents\visual studio 2010\Projects\MethodsConsoleGUI\MethodsBiz\DMXFileCollection.cs:line 60
at MethodsBiz.DMXFileCollection.Retrieve(Int32 ParentID) in C:\Documents and Settings\rhastie\my documents\visual studio 2010\Projects\MethodsConsoleGUI\MethodsBiz\DMXFileCollection.cs:line 38
at MethodsBiz.DMXFileCollection.Create(Int32 ParentID) in C:\Documents and Settings\rhastie\my documents\visual studio 2010\Projects\MethodsConsoleGUI\MethodsBiz\DMXFileCollection.cs:line 20
at MethodsConsole.winMain.winMain_Loaded(Object sender, RoutedEventArgs e) in C:\Documents and Settings\rhastie\my documents\visual studio 2010\Projects\MethodsConsoleGUI\MethodsConsoleGUI\winMain.xaml.cs:line 29

...

Any help would be greatly appreciated.

Thanks in advance.

Ray


Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
04/17/2011 2:18 PM
Hi Ray,

In addition to the other answers: I have to admit that the web service has not had much "love" recently. We've kept it in place in case anyone is still using it but are looking at other ways to interact with DMX data, notably JSON. This in light of mobile apps.

I can't say offhand from the code you supplied where it stumbles. If you want you can send me an email and I can share some of the web service code with you.

Peter
maoz
New Member
New Member
Posts:14


--
01/05/2013 7:03 AM
Hi Peter,
We are building a Json interface for mobile apps.
Would you advise us to use the web service or do you
have a Json API in plan?
Thanks,
Maoz
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
01/07/2013 11:21 AM
Hi Maoz,

I definitely have a plan for using the WebAPI. But there are a couple of decision points to negotiate first. The most important: I can't move the dependency of DMX up to DNN 7 yet. It is way too early for that. So I need to figure out a way to do this neatly on the side.

Peter
DrewSK
New Member
New Member
Posts:15


--
07/02/2014 10:37 PM
Peter- has the webAPI or mobile interfaces gotten any traction in the last year?

Maoz- were you able to build a JSON interface for mobile apps?
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
11/06/2014 10:00 AM
For now it's still on hold. DNN is going through a set of fairly major changes and decision points. I am lucky enough to be involved in those decisions as a member of the core architecture team. I want to hold off on major steps until it's clear where we'll be heading for the coming years.

Peter
You are not authorized to post a reply.