Hi I am new to vb script and we are calling webservice function from vb script by using "MSSOAP.SoapClient30" as below and getting the response.
everything is working fine but now we are trying to use "MSXML2.ServerXMLHTTP.6.0" instead of "MSSOAP.SoapClient30" in vb script to call the webservice function as below and it is returning the response however the response we are getting is different then previous one
what changes should I do to get the response same as previous one
vb script code using "MSSOAP.SoapClient30"
sAdminSOAPUrl = "http://usalvwcrmssqa08.infor.com:80/ss1001wliis_qa08/ecs/webservices/AdminService?wsdl"
Dim vaData
Set soapClient3 = CreateObject("MSSOAP.SoapClient30")
Call soapClient3.MSSoapInit(sAdminSOAPUrl, "AdminService", "AdminService")
soapClient3.ConnectorProperty("EndPointURL") = sAdminSOAPUrl
vaData = soapClient3.exportDeployment("psoli","psoli","oob_data")
WScript.Echo vaData
vb script code using "MSXML2.ServerXMLHTTP.6.0"
' Namespaces.
Dim NS, NS_SOAP, NS_SOAPENC, NS_XSI, NS_XSD
NS = "http://www.w3schools.com/webservices/"
NS_SOAP = "http://schemas.xmlsoap.org/soap/envelope/"
' Creates an XML DOM object.
Set DOM = CreateObject("MSXML2.DOMDocument.6.0")
' XML DOM objects.
Dim Envelope, Body, Operation, Param
Const URL = "http://usalvwcrmssqa08.infor.com:80/ss1001wliis_qa08/ecs/webservices/AdminService?wsdl"
' Creates the main elements.
Set Envelope = DOM.createNode(1, "soap:Envelope", NS_SOAP)
DOM.appendChild Envelope
Set Body = DOM.createElement("soap:Body")
Envelope.appendChild Body
' Creates an element for the exportDeployment function.
Set Operation = DOM.createNode(1, "exportDeployment","")
Body.appendChild Operation
' Creates an element for the exportDeployment parameter
Set Param = DOM.createNode(1, "username","")
Param.Text = "psoli"
Operation.appendChild Param
Set Param1 = DOM.createNode(1, "password","")
Param1.Text = "psoli"
Operation.appendChild Param1
Set Param2 = DOM.createNode(1, "deploymentName","")
Param2.Text = "oob_data"
Operation.appendChild Param2
' Releases the objects.
Set Param = Nothing
Set Operation = Nothing
Set Body = Nothing
Set Envelope = Nothing
DIM test
Set XMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.6.0")
XMLHTTP.Open "POST", URL, False
XMLHTTP.setRequestHeader "Content-Type", "multipart/form-data; User-Agent: SOAP Sdk"
XMLHTTP.setRequestHeader "SOAPAction", "AdminService"
XMLHTTP.send DOM.xml
' Loads the response to the DOM object.
DOM.LoadXML XMLHTTP.responseXML.xml
'WScript.Echo XMLHTTP.responseXML.xml
WScript.Echo XMLHTTP.responseXML.xml
' Releases the object.
Set XMLHTTP = Nothing
' XML DOM objects.
Dim NodeList, Element, vaData
' Searches for the exportDeploymentReturn object, which contains the value.
Set NodeList = DOM.getElementsByTagName("*")
For Each Element in NodeList
If Element.tagName = "exportDeploymentReturn" Then
vaData = Element.Text
Exit For
End If
Next
WScript.Echo vaData
everything is working fine but now we are trying to use "MSXML2.ServerXMLHTTP.6.0" instead of "MSSOAP.SoapClient30" in vb script to call the webservice function as below and it is returning the response however the response we are getting is different then previous one
what changes should I do to get the response same as previous one
vb script code using "MSSOAP.SoapClient30"
sAdminSOAPUrl = "http://usalvwcrmssqa08.infor.com:80/ss1001wliis_qa08/ecs/webservices/AdminService?wsdl"
Dim vaData
Set soapClient3 = CreateObject("MSSOAP.SoapClient30")
Call soapClient3.MSSoapInit(sAdminSOAPUrl, "AdminService", "AdminService")
soapClient3.ConnectorProperty("EndPointURL") = sAdminSOAPUrl
vaData = soapClient3.exportDeployment("psoli","psoli","oob_data")
WScript.Echo vaData
vb script code using "MSXML2.ServerXMLHTTP.6.0"
' Namespaces.
Dim NS, NS_SOAP, NS_SOAPENC, NS_XSI, NS_XSD
NS = "http://www.w3schools.com/webservices/"
NS_SOAP = "http://schemas.xmlsoap.org/soap/envelope/"
' Creates an XML DOM object.
Set DOM = CreateObject("MSXML2.DOMDocument.6.0")
' XML DOM objects.
Dim Envelope, Body, Operation, Param
Const URL = "http://usalvwcrmssqa08.infor.com:80/ss1001wliis_qa08/ecs/webservices/AdminService?wsdl"
' Creates the main elements.
Set Envelope = DOM.createNode(1, "soap:Envelope", NS_SOAP)
DOM.appendChild Envelope
Set Body = DOM.createElement("soap:Body")
Envelope.appendChild Body
' Creates an element for the exportDeployment function.
Set Operation = DOM.createNode(1, "exportDeployment","")
Body.appendChild Operation
' Creates an element for the exportDeployment parameter
Set Param = DOM.createNode(1, "username","")
Param.Text = "psoli"
Operation.appendChild Param
Set Param1 = DOM.createNode(1, "password","")
Param1.Text = "psoli"
Operation.appendChild Param1
Set Param2 = DOM.createNode(1, "deploymentName","")
Param2.Text = "oob_data"
Operation.appendChild Param2
' Releases the objects.
Set Param = Nothing
Set Operation = Nothing
Set Body = Nothing
Set Envelope = Nothing
DIM test
Set XMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.6.0")
XMLHTTP.Open "POST", URL, False
XMLHTTP.setRequestHeader "Content-Type", "multipart/form-data; User-Agent: SOAP Sdk"
XMLHTTP.setRequestHeader "SOAPAction", "AdminService"
XMLHTTP.send DOM.xml
' Loads the response to the DOM object.
DOM.LoadXML XMLHTTP.responseXML.xml
'WScript.Echo XMLHTTP.responseXML.xml
WScript.Echo XMLHTTP.responseXML.xml
' Releases the object.
Set XMLHTTP = Nothing
' XML DOM objects.
Dim NodeList, Element, vaData
' Searches for the exportDeploymentReturn object, which contains the value.
Set NodeList = DOM.getElementsByTagName("*")
For Each Element in NodeList
If Element.tagName = "exportDeploymentReturn" Then
vaData = Element.Text
Exit For
End If
Next
WScript.Echo vaData