Friday, April 20, 2007

Code snippet for sending XML to kronos

Dim outxml As New MSXML2.DOMDocument40
Dim inxml As New MSXML2.DOMDocument40
'Set Receiving page
Dim strURL As String = "http://seattle-kronos/wfc/XmlService"
Dim xmlHTTP As New MSXML2.ServerXMLHTTP40
'Set path of xml file to pass via HTTP
Dim xmlPath As String = "c:\test.xml"
outxml.load(xmlPath)

With xmlHTTP


Try
.open("POST", strURL, False)
.send(outxml)
inxml = xmlHTTP.responseXML
MsgBox(inxml.xml)
Catch ex As Exception
MsgBox(ex.ToString)
End Try

End With

No comments: