Reset Filters

SmartConnect 2018

Save Process Errors

Saves process errors that have been returned to the client from a map run back on the SmartConnect MSSQL server.

 

Service uri:

To call the get map list method make a call to SmartConnect.svc/saveerrors/{mapId}?server={tenantServer}&technicalName={tenantTechnicalName}&runNumber={runNumber}

 

Service web.config flag:

The flag used to turn this service call on or off in the WCF REST service web.config file is AllowSaveProcessErrors

SmartConnect_WCF_SaveErrorsConfig

 

Service security:

The settings used to determine WCF REST security and log settings is Save Process Errors

SmartConnect_WCF_SaveErrors

 

Return type:

The return type of this method is boolean, true if the save was successful else false.

 

Sample usage:

VB.NET

Dim request As System.Net.WebRequest = System.Net.WebRequest.Create(_

 "webservice.eonesolutions.com/SmartConnect.svc/saveerrors/TEST/?server=SERVER_NAME&technicalName=TECHNICAL_NAME&runNumber = 1")

request.Credentials = WebRequestProperties.AdminUser

request.Method = "POST"

Using writer As New StringWriter()

 errorTable.DataSet.WriteXml(writer, XmlWriteMode.WriteSchema)

End Using

Dim xml As String = writer.ToString()

request.ContentLength = xml.Length

request.ContentType = "text/xml"

Dim newStream As Stream = request.GetRequestStream()

newStream.Write(Encoding.ASCII.GetBytes(xml), 0, xml.Length)

newStream.Close()

Dim ws As WebResponse = request.GetResponse()

Dim result As String = String.Empty

Using responseStream As New System.IO.StreamReader(response.GetResponseStream())

 Dim result As String = responseStream.ReadToEnd()

End Using

Dim doc As New System.Xml.XmlDocument()

doc.LoadXml(result)

Return doc

 

C#.NET

System.Net.WebRequest request = System.Net.WebRequest.Create("webservice.eonesolutions.com/SmartConnect.svc/saveerrors/TEST/?server=SERVER_NAME&technicalName=TECHNICAL_NAME&runNumber = 1");

request.Credentials = WebRequestProperties.AdminUser;

request.Method = "POST";

DataTable dataTable = DataTable;

 

using(StringWriter writer = new StringWriter())

{

 errorTable.DataSet.WriteXml(writer, XmlWriteMode.WriteSchema);

}

string xml = writer.ToString();

request.ContentLength = xml.Length;

request.ContentType = "text/xml";

Stream newStream = request.GetRequestStream();

newStream.Write(Encoding.ASCII.GetBytes(xml), 0, xml.Length);

newStream.Close();

WebResponse ws = request.GetResponse();

string result = string.Empty;

using(System.IO.StreamReader responseStream = new System.IO.StreamReader(response.GetResponseStream()))

{

 string result = responseStream.ReadToEnd(); 
}

System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

doc.LoadXml(result);

return doc;