L
leeo
Hi
We're using the following code to send an XML file to a secure server:
Dim wr As HttpWebRequest
Dim nc As NetworkCredential
Dim xd As XmlDocument
Dim xw As XmlTextWriter
Dim oItem As ListViewItem
Try
wr = CType(WebRequest.Create(goSettings.NHSDPBClaimsURL),
HttpWebRequest)
nc = New NetworkCredential(goSettings.NHSUserName,
goSettings.NHSPassword)
wr.Credentials = nc
wr.ContentType = "text/xml"
wr.Method = "POST"
xd = New XmlDocument
xd.Load(gsAppPath & "\temp.xml")
xw = New XmlTextWriter(wr.GetRequestStream, Nothing)
xd.WriteTo(xw)
xw.Close()
Dim wresponse As HttpWebResponse = CType(wr.GetResponse(),
HttpWebResponse)
If wresponse.StatusDescription = "OK" Then....
This works beautifully, however the server sends back an XML receipt to
confirm whether the data was sent correctly or not. How do we pick up
the instantaneous response from the server so that we can process the
XML sent back?
Thanks
We're using the following code to send an XML file to a secure server:
Dim wr As HttpWebRequest
Dim nc As NetworkCredential
Dim xd As XmlDocument
Dim xw As XmlTextWriter
Dim oItem As ListViewItem
Try
wr = CType(WebRequest.Create(goSettings.NHSDPBClaimsURL),
HttpWebRequest)
nc = New NetworkCredential(goSettings.NHSUserName,
goSettings.NHSPassword)
wr.Credentials = nc
wr.ContentType = "text/xml"
wr.Method = "POST"
xd = New XmlDocument
xd.Load(gsAppPath & "\temp.xml")
xw = New XmlTextWriter(wr.GetRequestStream, Nothing)
xd.WriteTo(xw)
xw.Close()
Dim wresponse As HttpWebResponse = CType(wr.GetResponse(),
HttpWebResponse)
If wresponse.StatusDescription = "OK" Then....
This works beautifully, however the server sends back an XML receipt to
confirm whether the data was sent correctly or not. How do we pick up
the instantaneous response from the server so that we can process the
XML sent back?
Thanks