Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

PHP gets an empty response from Dynamics GP 2018

(0) ShareShare
ReportReport
Posted on by 5

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.

  1. /Dynamics/GPService
    1. Browser shows a "You've created a service" page for the GET request. Please note that SOAP uses POST, though.
  2. /Dynamics/GPService/GPService.svc
    1. 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.
  3. /Dynamics/GPService/ (Note the / at the end... don't ask.)
    1. 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

Categories:
  • ManWithNoBrows Profile Picture
    ManWithNoBrows 5 on at
    RE: PHP gets an empty response from Dynamics GP 2018

    To anyone reading this message, we reinstalled GP Web Services, and that got rid of the issue with the exceptions console, but the exceptions console is empty. The reinstallation also fixed the issues I was having with the article showing me how to verify that Web Services is working correctly at support.microsoft.com/.../how-to-verify-if-microsoft-dynamics-gp-web-services-is-functioning-cor

    The problem is that PHP STILL can't talk to GP Web Services. The response is still always blank.

    BTW, if you're curious as to what I've logged as the output, here's what I get back as headers from the server.

    Content-Length: 0
    Server: Microsoft-HTTPAPI/2.0
    Date: Sat, 12 Sep 2020 16:47:29 GMT

    There's no body, as the content length is 0.

    EDIT: It's Sep. 22nd, and this post is not abandoned.

    A little update to anyone looking for a resolution to this: From what we can tell, it's a server misconfiguration. We're still working with MS tech support on the issue, but we have yet to solve the problem. I'll report back once we do.

  • ManWithNoBrows Profile Picture
    ManWithNoBrows 5 on at
    RE: PHP gets an empty response from Dynamics GP 2018

    Thank you. I'll send them this blog post and see if the upgrade fixes it. Once it's upgraded, I'll post here to let you know if it worked or not. I'm thinking it might be next week before we hear that it's upgraded, though.

    I appreciate your hard work, Derek.

  • RE: PHP gets an empty response from Dynamics GP 2018

    Well, the GP version and Web Services build won't match, but yes, if using 18.2 for GP, Web Services should also show 18.2 in the WSInstallStatus table, which acts like the DB_Upgrade table, to show version information per database/loader.

  • ManWithNoBrows Profile Picture
    ManWithNoBrows 5 on at
    RE: PHP gets an empty response from Dynamics GP 2018

    Web Services on Programs and Features says: 18.00.0404

    Management tools shows: 18.00.0641

    Am I correct to assume that they should correspond to the installed GP version like yours does? If so, I'll need to have the client's team upgrade it and I'll send them this article for reference. I don't have the software needed to do that unfortunately so it's on them.

    Please confirm, and I'll get that party started. :P

  • RE: PHP gets an empty response from Dynamics GP 2018

    Normally, I'd look at the WSInstallStatus table and verify the version showing there, for example mine is showing 18.2.1021 for Web Services on a GP 18.2 environment, thus this patch would've been required to be installed.

    In Control Panel > Programs and Features, Web Services for Dynamics GP 2018 shows as 18.0.1021.000.

  • ManWithNoBrows Profile Picture
    ManWithNoBrows 5 on at
    RE: PHP gets an empty response from Dynamics GP 2018

    It's running 18.2.1100. (Saw it on the login box for GP.)

    How do I verify if that patch is already installed or not? Given that 1100 > 0727, I'd say that it's patched beyond KB4527536. Correct?

  • Suggested answer
    RE: PHP gets an empty response from Dynamics GP 2018

    You mention Windows Server 2019, what version of Dynamics GP are you running? The title of the forum mentions GP 2018 but is it 18.0.xxxx or 18.2.xxxx?

    I ask because Microsoft Windows Server 2019 is only supported/compatible with version 18.2.1013 GP version or later.

    If you're on 18.2 for Dynamics GP, you'll need to slipstream the KB4527536 patch for Web Services, as mentioned in this blog >> community.dynamics.com/.../how-to-slip-stream-msp-files-for-service-packs-and-hotfixes-when-installing-microsoft-dynamics-gp

    If you don't, we've seen where the service itself for Web Services won't stay running and/or the Configuration Wizard won't allow you to complete the install of Web Services on the GP databases themselves, which is where the tables I mentioned get added to the system and company databases.

    The endpoint URLs may still work even though Web Services is not fully functional.

    If you can't access the Dynamics Security Console and Exceptions Consoles and verify everything mentioned in the KB article to verify Web Services is installed and working correctly, it's a safe bet that it is not and you may need to either reinstall or open a support case for us to get Web Service up and running correctly.

    Thanks

  • ManWithNoBrows Profile Picture
    ManWithNoBrows 5 on at
    RE: PHP gets an empty response from Dynamics GP 2018

    The 7 tables don't exist on there. (Well, at least the WSExceptionLog table doesn't, and I specifically looked for it yesterday.)

    As for TLS 1.0, everything went smoothly except for the following items.

    1. http://[SERVER_NAME]:48620/DynamicsGPWebService is an invalid endpoint. Given that we aren't using the legacy endpoint anyway, it's not a big deal.

    2. From step 5 on down, I couldn't finish them on Windows Server 2019. There aren't nodes to expand. However, it does ask me to click the "Select Applications" action, and clicking it does nothing at all.

  • RE: PHP gets an empty response from Dynamics GP 2018

    The tables may have dbo in front of them, but they should be there, i.e. dbo.WSExceptionLog, dbo.WSInstallStatus, etc.

    In the GP system database, there are 7 tables that begin with WS.

    If everything in the following article is working correctly, it would point to TLS 1.0 being enabled, which is required for Web Services to function:

    support.microsoft.com/.../how-to-verify-if-microsoft-dynamics-gp-web-services-is-functioning-cor

    Thanks

  • ManWithNoBrows Profile Picture
    ManWithNoBrows 5 on at
    RE: PHP gets an empty response from Dynamics GP 2018

    I clicked the "Yes" link by mistake as it blends in with the rest of the links... Hopefully this doesn't mess things up.

    To answer your questions, not being installed through IIS is consistent with other stuff I've read.

    How would one disable TLS 1.0 on Windows? I want to verify that it's not the issue. If it was an issue, would I still be able to view the service in a browser and see the docs telling me where to find the WSDL and what code to write to get started? If not, then we should be able to check that off the list, but I'd like to be certain of it in case that's the issue.

    The DB data structure under "DYNAMICS/System Tables" (DYNAMICS/system doesn't exist) is either hidden from me, or it's empty. The client's team had GP 2015 upgraded to 2018, so perhaps that's why the DB structure is all weird? In addition, there's no DYNAMICS/WSInstallStatus table either.

    Under DYNAMICS, I see the following tree when logged in as user "sa".

    DYNAMICS

    > Tables

    > > System Tables (Empty Directory)

    > > FileTables (Empty Directory)

    > > External Tables (Empty Directory)

    > > Graph Tables (Empty Directory)

    > > A LONG list of tables prefixed with "dbo." and then some of them are of the format ADH00100 or ASIEXP60 and so forth. They're almost certainly system-generated. However, there are some that are readable, such as CONSTANTS and eConnect_Out and the like.

    Any idea why it looks much different than I presume it should look?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans