
XML HTTP question...one more try
Sorry for cross-posting but I thought this might be better posted here....
I am trying to do a simple XML post to a server. Does the XML text need to
contain the "xml version" and "Doctype"? Assuming that the TNXphoneservelet
is expecting XML, does the XML string appear to be formatted properly? As
you might guess, I am new to this...Thanks in advance...
Private Sub cmdGetAddr_Click()
Dim oSrvXmlHttp As New MSXML2.ServerXMLHTTP
Dim strXML As String
strXML = "<?xml version=" & Chr(34) & "1" & Chr(34) & "?>" & _
"<!DOCTYPE TNXRequest SYSTEM " & Chr(34) &
"http://localhost:7001/dtd/tnx/getphone.dtd" & Chr(34) & ">" & _
"<TNXRequest>" & _
"<TNXRequestHeader>" & _
"<TNXCOMMAND>GETPHONE</TNXCOMMAND>" & _
"</TNXRequestHeader>" & _
"<TNXRequestBody>" & _
"<NAME>" & _
"<FIRST>Joe</FIRST>" & _
"<LAST>Smith</LAST>" & _
"</NAME>" & _
"</TNXRequestBody>" & _
"</TNXRequest>"
oSrvXmlHttp.open "POST", " http://www.*-*-*.com/ ;, False
oSrvXmlHttp.setRequestHeader "Content-Type", "text/xml"
oSrvXmlHttp.send strXML
MsgBox oSrvXmlHttp.responseText
End Sub