SmartConnect 2018
XML Output Run Map
Runs the specified map and returns the xml output and run results from the map.
Service uri:
To call the get map list method make a call to SmartConnect.svc/getmapxml/{mapId}
Service web.config flag:
The flag used to turn this service call on or off in the WCF REST service web.config file is AllowRunMap
Service security:
The settings used to determine WCF REST security and log settings is Run Map
Implementation details:
While the credentials of the user configured to run the SmartConnect WCF REST service are used to run the map, the credentials provided with the service call are used to determine access to the map.
This method may only be called on a map that has a destination that allows output to xml.
Return type:
The return type of this method is RunMapXmlResponse
Sample usage:
VB.NET
' runs a map with an id of TEST
Dim request As System.Net.WebRequest = System.Net.WebRequest.Create("webservice.eonesolutions.com/SmartConnect.svc/getmapxml/TEST")
request.Credentials = New System.Net.NetworkCredential("username", "password", "domain")
Dim response As System.Net.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 XmlDocument()
doc.LoadXml(result)
Return doc
C#.NET
// runs a map with an id of GP_ACC
System.Net.WebRequest request = System.Net.WebRequest.Create("webservice.eonesolutions.com/SmartConnect.svc/getmapxml/GP_ACC");
request.Credentials = new System.Net.NetworkCredential("username","password","domain");
System.Net.WebResponse response = request.GetResponse();
string result = string.Empty;
using(System.IO.StreamReader responseStream = new System.IO.StreamReader(response.GetResponseStream()))
{
string result = responseStream.ReadToEnd();
}
XmlDocument doc = new XmlDocument();
doc.LoadXml(result);
return doc;