PDA

View Full Version : XMLHTTP - communicate with server - not working on Japanese OS



leonbax
02-01-2017, 11:10 AM
Hi,

I have a WordPress site that uses a license management plugin. I have been able to set up communication with this plugin from my Excel add-in. However, during testing, I found out that even though everything works like a charm on my English OS machines, it fails on a Japanese OS machine. I have some users from Japan so I need to make this work.

This is the code of the function:



Public Function wpMultiRequest(ByVal wpURL As String, _
ByVal wpMethod As String, _
ByVal wpFunction As String, _
ByVal wpParameters As String) As String
Dim ohttp As Object
Set ohttp = CreateObject("Microsoft.XMLHTTP")
Dim wpResponse As String

If Right(wpURL, 1) <> "/" Then wpURL = wpURL & "/"

ohttp.Open wpMethod, wpURL, False
ohttp.setRequestHeader "If-Modified-Since", "Sat, 01 Jan 2000 00:00:00 GMT"
ohttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
ohttp.Send (wpParameters)
wpResponse = ohttp.responseText
Set ohttp = Nothing
wpMultiRequest = wpResponse
End Function

As said, no issues on US machines, Office 2007-2016. Just not working on Japanese OS... Can anybody point me in the right direction? I have tried searching for answers in forums, but no luck so far.

In case you are interested what arguments are passed in the wpParameters, it's an action like "status-check" or "activate", a product id like "soft-01", a license key like "TDG-67352625", a name like "Your Name", and another number like "6753363".

I hope this is enough information to give someone an idea on how to solve this. Thanks in advance for your help!

Cheers,
Leon

Leith Ross
02-02-2017, 09:05 AM
Hello Leon,

What does happen when you run the macro on a Japanese machine?