OK, so I'm starting to get a handle on this and I'm working my way through some XML tutorials (having a hard time finding them that deal with VB6 not .net - maybe that's why I got the idea it would not work with VB6). Now for the BIG favor - As I have worked VERY little with .net and not at all with XML, can someone look at this sample code I was given and kind of translate it into VB6 terms that I will have an easier time understanding? I've done a lot of programming with VB6 but there are just some things here I've never worked with, and as I said earlier - better to ask...
I have the format for a file that I have to create that I asume is what is referenced in the "localhost" line (I'll put my comments in where I think I might understand or have questions). Below I have posted the typical "reply" from the server containing the info for the redirect...
Private _rc As XmlHttpResult
Private Sub Send(ByVal XmlStream As String)
Dim url As String = "
Dim oHttp As MSXML2.XMLHTTP = New MSXML2.XMLHTTP
oHttp.open("POST", url, False)
oHttp.setRequestHeader("Content-Type", "application/x-
oHttp.send(XmlStream)
Me.txtResult.Text = oHttp.responseText & vbCrLf
So - here's what I kind of need translated to VB6 (the end result I need is to be able to create this in VBA so I don't have to write and call an entire .net program)
Private _rc As XmlHttpResult
Private Sub Send(ByVal XmlStream As String)
*************************************************
HERE - I assume this references the file I have to create to submit? But I'm not sure how this is pointing to the file?
*************************************************
Dim url As String = "
Dim oHttp As MSXML2.XMLHTTP = New MSXML2.XMLHTTP
oHttp.open("POST", url, False)
oHttp.setRequestHeader("Content-Type", "application/x-
oHttp.send(XmlStream)
Me.txtResult.Text = oHttp.responseText & vbCrLf
_rc = DotNet.Functions.Data.XmlDeserialize(oHttp.responseText, GetType(XmlHttpResult), False)
System.Diagnostics.Process.Start(_rc.RedirectUrl)
oHttp = Nothing
End Sub
Public Class XmlHttpResult
Private _Status As Integer
Private _ErrorMessage As String
Private _RedirectUrl As String
Private _DataGuid As String
Public Sub New()
End Sub
Public Property Status() As Integer
Get
Return _Status
End Get
Set(ByVal Value As Integer)
_Status = Value
End Set
End Property
Public Property ErrorMessage() As String
Get
Return _ErrorMessage
End Get
Set(ByVal Value As String)
_ErrorMessage = Value
End Set
End Property
Public Property RedirectUrl() As String
Get
Return _RedirectUrl
End Get
Set(ByVal Value As String)
_RedirectUrl = Value
End Set
End Property
Public Property DataGuid() As String
Get
Return _DataGuid
End Get
Set(ByVal Value As String)
_DataGuid = Value
End Set
End Property
End Class
<?xml version="1.0" encoding="utf-16"?>
<XmlHttpResult xmlns:xsd="
xmlns:xsi="
<Status>0</Status>
<ErrorMessage />
<RedirectUrl>
<DataGuid>003d3e2e-1add-4b8e-8882-29d5ed3fb24c</DataGuid>
</XmlHttpResult>