Hello
Based on this post
viewtopic.php?t=24825
I came to the conclusion, that I will be better for debugging and logging purposes to save all outgoing soap messages to xml.
With *incoming* SOAP-Messages it works like this:
CREATE(XMLDom);
XMLDom.async := FALSE;
XMLDom.load(SoapHttpConn.OutputStream);
XMLDom.save('c:\something.xml');
Does anybody know how to save *outgoing* soap messages to xml before they are sent to the webservice?
This is a part of the code how the message is sent:
SoapSerialize.StartElement('param');
..
SoapSerialize.EndElement;
SoapSerialize.EndBody;
SoapSerialize.EndEnvelope;
SoapHttpConn.EndMessage;
Many thanks in adance.
Thomas
Answers
Here's a simple out of the box working solution..
http://www.mibuso.com/forum/viewtopic.p ... 952#110952
Rvduuren
Thanks for replying. I can see the part where you save the soap response, but I can't find the part where you save the soap request (the message that is beeing sent to the webservice). Am I blind? :?
Thanks in advance
Thomas
I usually do not use SOAP Microsoft Soap Type Library, but xmlHTTP automation, and create the xml using xmlport.
Here is an example
http://mibuso.com/blogs/ara3n/2008/03/0 ... -navision/
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Thanks for your valuable post on this. With soapUI I was able to see how the XML should look like. Very helpful as everybody who has ever seen a complex wsdl file probably would confirm.
Anyway, is it possible to save the outgoing soap from the navision client? I actually cannot imagine why it doesnt work, particulary because saving the incoming soap is just that simple ](*,)
Regards
Thomas
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Thanks for the code, very much appreciated! Unfortunately the file is still empty after running that code. We are using Navision 3.7, soap3.0
Does it work on your installation?
Regards and thanks in advance
Thomas
I use Microsoft Soap Type Library V1 in 5.0 exe.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Interesting topic :-k
What are these functions?
Serializer.endElement;
Serializer.startElement
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Are there more code examples?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
It was thinking of doing this with a simple import/export but this looks to be the future of things to come. It all looks so complicated with all those definitions.
http://mibuso.com/blogs/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Thomas
Hmm, sounds interesting, do you have an example (pseudocode is ok)?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Bingo! \:D/ It works with 5.0 and 5.0 SP1, but not with 3.7! Since the installation in question will upgrade to 5.0 anyway this is ok for us.
Thanks for all your help, espacially to Rashed.
Thomas
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n