Hello,
can't consume the NAV-Webservices via PHP nor get the service in soapui running, respectively proper results. adjustet the CustomSettings.config for the webservice configuration "WebServicesUseNTLMAuthentication" to true. so i can access the service via soapui but always get the result:
<s:Envelope xmlns:s="
http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:System.Net.WebException</faultcode>
<faultstring xml:lang="de-DE">Soap message is invalid!</faultstring>
<detail>
<string xmlns="
http://schemas.microsoft.com/2003/10/Serialization/">Soap message is invalid!</string>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
can anybody provide an example how to consume a webservice from within PHP?
Thanks in advance your help is highly appreciated
Kind regards
Bernd
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Open the WSDL in internet explorer and save it as a file and then load that in SOAPUI.
This way you can see the XML structure you need to create.
The only solution I have is to use webproxy.
http://mibuso.com/blogs/ara3n/2009/05/0 ... b-service/
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
thanks for your advice. I found that threat before. i actually managed to authenticate with soapui - at least i think. i could load the definition into soapui and could open the wsdl. but the response i got was kind of soap message invalid :-(
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:System.Net.WebException</faultcode>
<faultstring xml:lang="de-DE">Soap message is invalid!</faultstring>
<detail>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Soap message is invalid!</string>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Read some posts from Freddy telling he's providing some examples but couldn't find anything. nay ideas besides the proxy?
Thanks in advance
Bernd
If it's windows. You can use COM component (MSXMLDOM) and that works.
Here is example on how to use
http://mibuso.com/blogs/ara3n/2009/01/2 ... companies/
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I think you can find many similar tools googling PHP and WSDL.
http://blogs.msdn.com/freddyk/archive/2 ... m-php.aspx
=D> =D>
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
At this time I have covered PHP, Java, Javascript, C# (both with .net 2.0 and 3.5 = Web Reference and Service Reference), Visual Basic (with the same) and right now I am working on a NAV 2009 SP1 implementation of the scenario.
We can't hold peoples creativity back just because it is hard to get started...
/Freddy
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Could you please suggest if somebody was able to consume the webservices in SOAP Clients like SOAP-UI .. i am facing the same issue as posted in this thread and wondering how to solve this.
I am using NTLM authentication for these webservice invoke.
Thanks,
Naren
We'd also be interested in any final solution to this.
We're trying to consume Nav webservices with Adobe Flex and so far are seeing a simliar error message: "SOAP message is invalid". Working it through SOAPUI, we can see in the log a mention of an authentication problem, even though SOAPUI allows you to enter credentials against it's tests.
We're using the nav services set to NTML authentication, but are begining to think we need some sort of web service proxy. However, all this web stuff is new to us so any help would be appreciated.
Cheers...
for example this works:
<soap:Body><InboundMessage>
while putting any whitespace or newlines between them results in the "Soap message is invalid!" response from the web service.
for example this results in the error
<soap:Body> <InboundMessage>
Whitespacing\newslines in the rest of the SOAP message seem to make no difference, just on this line.
We are using soap ui(http://sourceforge.net/projects/soapui/ ... oapui/4.0/) for making the web service calls and burp proxy (http://portswigger.net/burp/proxy.html) for the NTLM authentication.
Can anybody confirm this? And can anyone suggest why this might be the case? I can consistently make successful calls without the whitespace and it will succeed, then add whitespace and it fails.... very straing.
Hi,
Yes we eventually came to the same conclusion. There is a hotfix available in build 32198
https://mbs2.microsoft.com/Knowledgebas ... US;2510959
I think Freddy's examples stringed the soap requests for his examples into one line hence he didn't suffer the same problem.
For our own problem connecting with Adobe's flex we also had to have a windows service program to host the crossdomain.xml policy file that is required. The file is hosted on the same port as the webservice.
Cheers, Tim
1. Remove all line breaks and unneccessary spaces between ><
2. Change the namespace 'soapenv' to 'soap'
Authenticating through NTLM only works when using username, password and domain fields
(by that I mean not using methods like username@domain or domain\username and leaving the domain empty)
Another way to do so is to let SOAPUI remove the whitespaces:
There is a requestproperty called "Strip Whitespaces", this one should be set to True.
http://username:password@XX.XXX.XX.XXX:7047/DynamicsNAV/WS/androidservice/Page/GetStoredata?wsdl
any help would be appreciated.