Forum Discussion
praveensqa
13 years agoContributor
Hi Alex,
Here is the end solution.
Function LandmarkVO
Set ServiceInfo = WebServices.CreateWebServiceInfoFromItem("DeviceManagementService")
Set HomeGprsIpVO = ServiceInfo.TypeFactory.HomeGprsIpVO
HomeGprsIpVO.gprsId=null
HomeGprsIpVO.ipAddress="192.168.1.5"
HomeGprsIpVO.lastUpdated=""
HomeGprsIpVO.name="Praveenhjlllllk"
HomeGprsIpVO.port="5006"
HomeGprsIpVO.status=1
HomeGprsIpVO.updatedBy=null
Set RequestObj = ServiceInfo.PrepareRequestObject("createHomeGPRSIP")
Set RequestObj.args0 = HomeGprsIpVO
Set RequestXml = ServiceInfo.PrepareRequest("createHomeGPRSIP", RequestObj)
Set Root = RequestXml.documentElement
Set HeaderElement = RequestXml.createElement("s:Header")
Set HeaderNode = Root.insertBefore(HeaderElement, Root.childNodes.item(0))
Set usernameElement = RequestXml.createNode(1, "userName", "")
Set usernameNode = HeaderNode.appendChild(usernameElement)
Set usernameValueElement = RequestXml.createTextNode("Admin")
usernameNode.appendChild(usernameValueElement)
Set pwdElement = RequestXml.createNode(1, "password", "")
Set pwdNode = HeaderNode.appendChild(pwdElement)
Set pwdValueElement = RequestXml.createTextNode("password")
pwdNode.appendChild(pwdValueElement)
' Set ipaElement = RequestXml.createNode(1, "ipaddress", "")
' Set ipaNode = HeaderNode.appendChild(ipaElement)
' Set ipaValueElement = RequestXml.createTextNode("10.10.10.10")
' ipaNode.appendChild(ipaValueElement)
'
' Set pidElement = RequestXml.createNode(1, "portalId", "")
' Set pidNode = HeaderNode.appendChild(pidElement)
' Set pidValueElement = RequestXml.createTextNode(1)
' pidNode.appendChild(pidValueElement)
Log.Message "See XML in the Additional Information pane", RequestXml.xml
' Sending the request
Set XmlHttpRequest = CreateObject("MSXML2.XMLHTTP.3.0")
' Insert the correct service URL
Call XmlHttpRequest.open("POST", "https://devtest.idigi.com/mobile/services/DeviceManagementService.DeviceManagementServiceHttpSoap11Endpoint/", False)
Call XmlHttpRequest.send(RequestXml)
' Log.Message WebServices.DeviceManagementService.LastResponse
Set ResponseXML = XmlHttpRequest.responseXML
Call Log.Message("See the response XML in the Additional Information pane", responseXML.xml)
Set Response = ServiceInfo.ParseInfo("createHomeGPRSIP", ResponseXML)
Call Log.Message("Entity ID: " & Response.code)
End Function
Regards,
Praveen
Here is the end solution.
Function LandmarkVO
Set ServiceInfo = WebServices.CreateWebServiceInfoFromItem("DeviceManagementService")
Set HomeGprsIpVO = ServiceInfo.TypeFactory.HomeGprsIpVO
HomeGprsIpVO.gprsId=null
HomeGprsIpVO.ipAddress="192.168.1.5"
HomeGprsIpVO.lastUpdated=""
HomeGprsIpVO.name="Praveenhjlllllk"
HomeGprsIpVO.port="5006"
HomeGprsIpVO.status=1
HomeGprsIpVO.updatedBy=null
Set RequestObj = ServiceInfo.PrepareRequestObject("createHomeGPRSIP")
Set RequestObj.args0 = HomeGprsIpVO
Set RequestXml = ServiceInfo.PrepareRequest("createHomeGPRSIP", RequestObj)
Set Root = RequestXml.documentElement
Set HeaderElement = RequestXml.createElement("s:Header")
Set HeaderNode = Root.insertBefore(HeaderElement, Root.childNodes.item(0))
Set usernameElement = RequestXml.createNode(1, "userName", "")
Set usernameNode = HeaderNode.appendChild(usernameElement)
Set usernameValueElement = RequestXml.createTextNode("Admin")
usernameNode.appendChild(usernameValueElement)
Set pwdElement = RequestXml.createNode(1, "password", "")
Set pwdNode = HeaderNode.appendChild(pwdElement)
Set pwdValueElement = RequestXml.createTextNode("password")
pwdNode.appendChild(pwdValueElement)
' Set ipaElement = RequestXml.createNode(1, "ipaddress", "")
' Set ipaNode = HeaderNode.appendChild(ipaElement)
' Set ipaValueElement = RequestXml.createTextNode("10.10.10.10")
' ipaNode.appendChild(ipaValueElement)
'
' Set pidElement = RequestXml.createNode(1, "portalId", "")
' Set pidNode = HeaderNode.appendChild(pidElement)
' Set pidValueElement = RequestXml.createTextNode(1)
' pidNode.appendChild(pidValueElement)
Log.Message "See XML in the Additional Information pane", RequestXml.xml
' Sending the request
Set XmlHttpRequest = CreateObject("MSXML2.XMLHTTP.3.0")
' Insert the correct service URL
Call XmlHttpRequest.open("POST", "https://devtest.idigi.com/mobile/services/DeviceManagementService.DeviceManagementServiceHttpSoap11Endpoint/", False)
Call XmlHttpRequest.send(RequestXml)
' Log.Message WebServices.DeviceManagementService.LastResponse
Set ResponseXML = XmlHttpRequest.responseXML
Call Log.Message("See the response XML in the Additional Information pane", responseXML.xml)
Set Response = ServiceInfo.ParseInfo("createHomeGPRSIP", ResponseXML)
Call Log.Message("Entity ID: " & Response.code)
End Function
Regards,
Praveen
Related Content
- 6 years ago
- 9 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago