I'm trying to export data from Access to ASPDotNetStoreF ront with XML. Can anyone tell me why I am getting a status 400 "Invalid Request" after the .send here in line 28?
I am using Access 2003.
Thanks,
Jim
I am using Access 2003.
Code:
Public Function GetNewGuid() As String
On Error GoTo GetNewGuid_Error
Dim XMLsubmission As String
Dim XMLReceived As String
Dim HttpReq As New MSXML2.XMLHTTP30
Dim myHTTP As MSXML2.XMLHTTP30 ' MSXML3.XMLHTTP
Dim myDom As MSXML2.DOMDocument
Dim XMLUrl As String ' address for xml requests
Dim x As String
Set myHTTP = CreateObject("MSXML2.XMLHTTP")
XMLUrl = "http://thehostserver.no-ip.info:4436/ipx.asmx"
myHTTP.Open "POST", XMLUrl, False
x = myHTTP.Status
'XMLsubmission = "<?xml version=""" & "1.0" & """ encoding=""" & "UTF-8" & """?>"
XMLsubmission = ""
XMLsubmission = XMLsubmission & XMLLogin() & vbNewLine ' supplies id and password
XMLsubmission = XMLsubmission & "<AspDotNetStorefrontImport Verbose=""" & "false" & """>" & vbNewLine
XMLsubmission = XMLsubmission & "<GetGUID Count=""" & "1" & """/>" ' just want to get a GUID from ASPDNSF
XMLsubmission = XMLsubmission & "</AspDotNetStorefrontImport>"
myHTTP.send XMLsubmission
x = myHTTP.Status ' here x = "400" --- why?
Dim bResult As Boolean
bResult = True
XMLReceived = myHTTP.responseXML.Text
Do While bResult
bResult = ShowXMLResult(myHTTP)
Loop
Set myHTTP = Nothing
On Error GoTo 0
Exit Function
GetNewGuid_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure GetNewGuid of Class Module cls_XML_Customer"
Resume Next
End Function
Jim