Failing to access the server from VBA (1 Viewer)

nector

Member
Local time
Today, 18:49
Joined
Jan 21, 2020
Messages
465
Hello

Whenever I try to communicate with the server it return the response as below which is clearly an error:

Code:
{"timestamp":"2024-02-03T14:23:38.333+00:00","status":404,"error":"Not Found","path":"/nector/"}

Below is my VBA code

Code:
Private Sub CmdInitializer_Click()
Dim n As Integer
Dim Request As Object
Dim stUrl As String
Dim Response As String
Dim requestBody As String
stUrl = "http://localhost:8080/nectorserverdf/"
Set Request = CreateObject("MSXML2.XMLHTTP")
requestBody = "{ ""Tax Pin"": ""1002623668"", " & _
    """BranchID"": ""012300"", " & _
    """fvcSrLno"": ""nec60000005""}"
    With Request
        .Open "POST", stUrl, False
        .setRequestHeader "Content-type", "application/json"
        .send requestBody
        Response = .responsetext
    End With
If Request.Status <> 200 Then
MsgBox Request.responsetext, vbCritical, "Internal Audit Manager"
n = FreeFile()
Open "C:\Users\necto\Desktop\Testing\test.txt" For Output As #n
Print #n, Request.responsetext
Close #n
Exit Sub
End If
End Sub

I do not believe that the code has anything to do with this , any idea here? I have run out of ideas now
 
Its Apache tomcat, this is done via JAVA runtime with the deployed WAR files in Apache tomcat
 
Well, your server is responding, which is why you got that pretty error. So you CAN access your server. That error suggests you should check the URL and its requestBody. Can you do the POST request from some other place?
 
404 is webpage not found.
Are you sure about the strurl
I just tried pasting it on my phone and got a standard error message. Try it on your system and see what happens.
 
its seams like the client server they changed the path , I have to contact them on Monday next week
 

Users who are viewing this thread

Back
Top Bottom