I've just converted to 2009 and can't believe how hard it is to use the new fancy webservice layer. It's amazing how easy it is to create a new codeunit and publish a service, but everything else disappoints me.
My scenario:
1. A function in a codeunit has bigtext as input parameter and this is published as a webservice.
2. I'm using vb.net to send in a huge xml file (standard in another system) into the webservice
3. To be able to get the content in the bigtext input into an XMLDomDoc, I have to save the content (xml) to a file --> read the file into an adoInStream with a charset of iso-8859-1, create an adoOutStream with a charset of utf-8 and read the file into the adoOutStream. Then i save the file again before i read the content into an XMLDomDoc.
4. Puh, no I'm finally able to get the nodes I need and save the data into Dynamics Nav 2009.
BUT, all special characters (like æøå) is converted to '>'.
Is it really this hard to create a webservice which takes an xml as input and be able to read the contents of it?
Not the most agile solution
Have any of you successfully imported a custom xml into Dynamics Nav 2009 through webservices?
Answers
Why don't you write a custom webservice in your asp.net app to accept an XML doc as a parameter and then update the NAV database from within this custom webservice, then you need to do minimal on the NAV side?
Next you need to convert the BigText with C/AL. looping through the BigText and convert fra ascii to ansi:
Then you can use a XMLport to process the BigText(xml file) or what ever you want to do with it
Hope this helps you.
br
Kenneth
Since I'm processing an xml from another system in my vb.net code, this is how i solved it:
vb.net
Dyn 2009
The blob looks nice and my problem is solved.
You made my day K!