ongwc
October 29th, 2002, 09:15 PM
Hi
Thanks for answering my early question...
Now I'm getting the above error when I do a
"MSXML2.XMLHTTP" - send method. Below is my code:
Dim objHTTP As New MSXML2.XMLHTTP
objHTTP.open "post", "http://127.0.0.1:8189", False
objHTTP.setRequestHeader "X-NOKIA-MMSC-Charging", "100"
objHTTP.setRequestHeader "Content-Type",
"application/vnd.wap.mms-message"
objHTTP.setRequestHeader "Content-Length", UBound(b)
objHTTP.send b
Note: 'b' is Byte Array. Im using "Microsoft XML, v2.6"
What's wrong with my code? Please advice...
Thanks for your time.
Cimperiali
October 30th, 2002, 04:34 AM
I am moving this question there
Btw,
Private Sub Form_Load()
'Dim objHTTP As New MSXML2.xmlhttp
Dim myVariantB As Variant
myVariantB = "abc=123"
''Dim b(10) As Byte
'objHTTP.open "post", "http://127.0.0.1:8189", False
'objHTTP.setRequestHeader "X-NOKIA-MMSC-Charging", "100"
'objHTTP.setRequestHeader "Content-Type", "application/vnd.wap.mms-message"
'objHTTP.setRequestHeader "Content-Length", Len(myVariantB)
'objHTTP.send 'myVariantB
'example from msdn
Dim xmlhttp As New MSXML2.xmlhttp
xmlhttp.open "GET", "http://localhost/sample.xml", False
xmlhttp.send myVariantB
MsgBox xmlhttp.responseXML.xml
End Sub
'from MSDN
'SYMPTOMS
'When you use the Send method of XMLHttp on XML 2.6
'and XML 3.0, you may see a return result code of 0x800C0008.
'CAUSE
'There are no languages specified in Internet Explorer.
'RESOLUTION
'To check these settings in Internet Explorer, click Tools,
'click Internet Options, and then click Languages....
'If this box is empty, add at least one language.
'MORE Information
'Steps to Reproduce This Behavior
'Clear the languages section in Internet Explorer.
'Use the following code to create a Receiver.asp file
'on the Internet Information Services (IIS) server:
'<%@language=vbscript%>
' <%
' Value = Request.Form("id")
' response.ContentType = "text/xml"
' response.write "<ReturnValue>" & Value & "</ReturnValue>"
' %>
'On the client, create a Windows Script Host file named
'Test.vbs using the following code:
'NOTE: Replace <ServerName> with the name of your IIS server.
'DataToSend = "id=1"
'Set xmlhttp = CreateObject("MSXML2.XMLHTTP.2.6")
'xmlhttp.open "POST", "http://servername/receiver.asp", False
'xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
'xmlhttp.send DataToSend
'WScript.Echo xmlhttp.responseXML.xml
'Run Test.vbs. You should see the error code returned in a dialog box.
'[Visual Basic]
'Visual Basic Syntax
'oXMLHttpRequest.send (varBody)
'Parameters
'varBody
'Variant. Case-insensitive name.
'Example
'Dim xmlhttp As New MSXML2.xmlhttp
'xmlhttp.open "GET", "http://localhost/sample.xml", False
'xmlhttp.send
'MsgBox xmlhttp.responseXML.xml