I have looked at the WSDL but can't seem to decipher the xml snippet required for the monitoradd method.
looking at https://support.ipmonitor.com/devdocs/f6178e8d151c48d3b55c807e01de52d5.aspx, it shows "xml", but does not show an example.
If I want to add a ping monitor to 192.168.1.1, can someone please post the xml required to post through the monitoradd method?
This is what my code looks like right now:
---------------------------------------------------------------------------------------------------
Imports
ServerConfig.ipMonitor_Config
Imports System.Net
Imports System.Net.Security
Imports System.Security.Cryptography.X509Certificates
Imports System.Text.RegularExpressions
Public Class Main
Dim SecurelyStoredAccount As String = "username"
Dim SecurelyStoredPassword As String = "password"
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
'ignore the SSL warning for self-signed certificate - code is in different class
ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(AddressOf MyPolicy.ValidateCertificate)
Dim proxy As New ipMonitor_Config.ipm7Config()
Dim r As New Regex("^(.*)soap/config.asmx$", RegexOptions.IgnoreCase)
Dim m As Match = r.Match(proxy.Url)
If m.Success Then proxy.Credentials = cache
Dim cache As New CredentialCache()
cache.Add(New Uri(m.Captures(0).Value), "Digest", New NetworkCredential(SecurelyStoredAccount, SecurelyStoredPassword))
txtIPMonitorResults.Text = proxy.Url
Dim objDocument As New System.Xml.XmlDocument objDocument.LoadXml(
Dim objXmlNode As System.Xml.XmlNode
Dim objXmlNodeNew As System.Xml.XmlNode
"<Settings>192.168.1.1</Settings>") Dim monlist As Long = proxy.MonitorAdd(objXmlNode)
objXmlNodeNew = objDocument.CreateElement("Settings")
objXmlNode = objDocument.DocumentElement
txtIPMonitorResults.Text = objXmlNode.OuterXml.ToString
txtIPMonitorResults.AppendText = monlist.tostring
End If
End Sub
End Class