We are using Dynamics GP with Web Services and are having difficulty.
The Native endpoint is http://hermes:48620/Dynamics/GPService which indicates a wsdl at http://hermes:48620/Metadata/WCF/Full/schemas.microsoft.com.dynamics.gp.2010.01.wsdl. I have successfully retrieved the wsdl file with PHP and can produce a list of functions described by the document. I am attempting to call the "GetCurrencyList" method... but receive no response. The request header is as follows:
"
POST /Dynamics/GPService/GPService HTTP/1.1
Host: HERMES:48620
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.3
Content-Type: application/soap+xml; charset=utf-8; action="schemas.microsoft.com/.../GetCompanyByKey"
Content-Length: 349
"
I typically develop with a 10 second socket timeout and have raised it to 5 minutes (once) to wait, unsuccessfully. I am curious why the wsdl file directs PHP to post to "/Dynamics/GPService/GPService". I tried explicitly setting the endpoint to " /Dynamics/GPService" and " /Dynamics/GPService/GPService.asmx" and receive 404 Not Found's from each.
The Programming Guide mentions the Native endpoint supports wsHttpBinding, so I attempted to implement WSSE in PHP to produce a SOAP envelope like the following:
"
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="www.w3.org/.../soap-envelope" xmlns:ns1="schemas.microsoft.com/.../01" xmlns:ns2="schemas.xmlsoap.org/.../secext">
<env:Header>
<ns2:Security env:mustUnderstand="true">
<ns2:UsernameToken>
<ns2:Username>[username]</ns2:Username>
<ns2:Password>[password]</ns2:Password>
</ns2:UsernameToken>
</ns2:Security>
</env:Header>
<env:Body>
<ns1:GetPolicyByOperation/>
<param1>
<item>
<key>OrganizationKey</key>
<value>
<item>
<key>Id</key>
<value>01</value>
</item>
</value>
</item>
</param1>
</env:Body>
</env:Envelope>
"
Doing this produced no change.
When I preform a similar procedure with the legacy endpoint, the server responds with a 401 Unauthorized. I supplied the credentials of a privileged user created in the Admin area (per our last conversation) for basic HTTP authentication with no change. Additionally, the wsdl file directs PHP to post to "/DynamicsGPWebServices/DynamicsGPService.asmx" While I appreciate that this endpoint provides feedback, it does not meet our requisites for security.
*This post is locked for comments