I'm new to Dynamics GP 2018, and got hired to integrate it with a 3rd-party app. The part of the project I'm writing about is the fact that the machine hosting both the PHP 7 application and the GP 2018 with the Web Services component installed, does not function correctly. PHP simply cannot get a response from Dynamics GP 2018 which is hosted on the same machine.
I've tried using PHP's built-in SOAP client, as well as using Guzzle and sending it a request that way, but neither of them seem to get any response from the server. It also doesn't help that I've tried numerous variations of the same URL which seem to be correct, and yet I have no input from GP to tell me if I'm even hitting the right endpoint or not. Here are the URLs I've tried. For brevity, I'll use "localhost" to denote the local machine, but it does have a name we're using. (Not an FQDN, though - just a local hostname)
M$ deleted a good chunk of these URLs when I posted them... I'll show the paths below, but they all are after localhost:48620 and using http, not https.
- /Dynamics/GPService
- Browser shows a "You've created a service" page for the GET request. Please note that SOAP uses POST, though.
- /Dynamics/GPService/GPService.svc
- Browser gives me a 405 (Method Not Allowed) response, which makes me think I'm supposed to send a POST request, but it doesn't work using PHP.
- /Dynamics/GPService/ (Note the / at the end... don't ask.)
- Also gives me a 405 error
The WSDL does display in my browser, and PHP seems to be able to fetch it without issue when using the SOAP client. Guzzle obviously doesn't use the WSDL.
Which endpoint am I supposed to hit, and how do I get it to respond?
BTW, I tried temporarily disabling the firewall to see if it fixed it, but that doesn't seem to do anything though. I don't recall which URL I used, but I turned it on again quickly.
I've also confirmed that the posted data looks correct through RequestBin.
Sample Request:
[Request Headers
POST /Dynamics/GPService/GPService HTTP/1.1 Host: HHE-DGP2:48620 Connection: close User-Agent: PHP-SOAP/7.4.1 Content-Type: application/soap xml; charset=utf-8; action="http://schemas.microsoft.com/dynamics/gp/2010/01/IPolicy/GetPolicyByOperation" Content-Length: 344
[Request
OrganizationKeyId-1