Hi all experts,
I would like to ask some question integration part.
If 3rd party application send data in xml format thru web service, what method i should use?
Is it use XMLPort handle the xml data?
I really no idea on this.
Create a new Codeunit. Create a new function in called.
ReceiveXML(MyBigText) return time is a Text 1024.
In this function.
MyBigText.READ(Instream)
myxmlport.SETSOURCE(Instream)
if not myxmlport.import then
Exit('The xmlport was invalid') // I have to check if getlasterror would work otherwise you have to use if codeunit.run and pass the bigtext to the CU.
else
exit('success');
You publish the New codeunit and that's it.
Ahmed Rashed Amini
Independent Consultant/Developer
I haven't done this myself outside of playing around with it a bit but you should be able to expose the XMLPort as a parameter in a codeunit and get a more complete WSDL.
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Thanks for your reply.
Anyway, i don't understand what you tried to say.
Can you explain in more detail?
Thank you very much.
ReceiveXML(MyBigText) return time is a Text 1024.
In this function.
MyBigText.READ(Instream)
myxmlport.SETSOURCE(Instream)
if not myxmlport.import then
Exit('The xmlport was invalid') // I have to check if getlasterror would work otherwise you have to use if codeunit.run and pass the bigtext to the CU.
else
exit('success');
You publish the New codeunit and that's it.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I got your idea already. The mean i need to use XMLPort to handle the incoming data.
http://blogs.msdn.com/b/nav/archive/2009/11/06/using-dataports-with-web-services.aspx
Is that what you're looking for?
I've always just used methods similar to this: http://blogs.technet.com/b/gediminb/archive/2008/02/12/how-to-read-from-nav-xml-document-using-microsoft-xmldom-automation.aspx