Is there a way to get the web service to dump copies of XML files at each http post? (Not sure if this even makes sense, sorry if it does not.)
I'm working with an external vendor who is inserting a sales order via a web service. He is trying to mix Item and Resource lines. When he tries just items it works. When he tries items and resources he gets an error saying the resource with the item number cannot be found. He claims he is not sending the type. I would like to be able to dump the XML as it comes it to see from my side what he is sending.
Does this make sense?
"There are only two truly infinite things: the universe and stupidity. And I am unsure about the universe." - Albert Einstein
Corollary- Build and idiot proof system and nature will build a better idiot.
0
Comments
The only way I can see the message is to use packet sniffer software like wireshark.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
A debugging flag set on the Service Tier that dumped the XML into a directory would be very helpful.
Corollary- Build and idiot proof system and nature will build a better idiot.
In IE you save the WSDL for the webservice as xml file. Then in SOAPUI you open that file. It will show you how to generate the xml file.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Look for Microsoft.Dynamics.Nav.Server.exe.config in directory: C:\Program Files\Microsoft Dynamics NAV\60\Service. If it's a x64 system the Program Files might look like "Program Files (x86)". With this file you can turn on the tracing and message logging feature of a WCF service. You'll be able to see the messages at the transport and service level layers as well as the traces which is handy in finding errors kicked out in the service tier. It's not perfect but it's the best visibility I've found as what's going on at the service tier. You can then use the Microsoft Service Trace Viewer (svctraceviewer.exe) to view these log files. On my dev box this is located at C:\Program Files\Microsoft SDks\Windows\v6.0A\Bin. I think this might be part of the Visual Studio install.
If you have Visual Studio you can find a tool to edit this .config file. Tools -> WCF Service Configuration Editor. That makes it easy to turn stuff on and off. Otherwise you'll have to be familiar with editing the config by hand.
This might be a bit hacked up but it would look something like this:
I've also been experimenting with this project: http://ukadcdiagnostics.codeplex.com/ and sending these WCF logs to a SQL table. It does add a bit of overhead to web service calls and I'm not sure I'd put it in a production environment but it's sometimes easier than using the WCF trace viewer.
Bill