RS First Dynamics NAV Blog


...from NAV 3.60 to NAV 2013
Archivio Posts
Anno 2015

Anno 2014

Anno 2013

Anno 2012

Anno 2011

Anno 2010

Anno 2009

Anno 2008

Anno 2007

Web Services : come esportare con DOM un XML in BigText

Web Services : come esportare con DOM un XML in  BigText

 

Per importare xml da nav

 Testfile = File

TestStream = INSTREAM

XMLPORTPIPPO = XMLPORT

  

TestFile.CREATE('C:\XML-Test\XML Import\Import.xml');
TestFile.CREATEINSTREAM(TestStream);
XMLPORTPIPPO.IMPORT(74300, TestStream);
TestFile.CLOSE;

 

 Per esportare xml da nav

 Testfile = File

TestStream = OUSTREAM

XMLPORTPIPPO = XMLPORT

 

TestFile.CREATE('C:\XML-Test\XML Import\Import.xml');
TestFile.CREATEOUTSTREAM(TestStream);
XMLPORT.EXPORT(74300, TestStream);
TestFile.CLOSE;

 

 

XML DOM per esposizione in Big TextVar

Carico in un oggetto DOM di tipo BigText usando una variabile di tipo BigText

 

“Alternatively, you could expose a BigText as a VAR, take the incoming request, load that into a Xml Dom object, parse, perhaps do some processing logic and then kick off an xmlport to build xml, clear your bigtext variable and then return the resultant Xml as a string.”

XmlPort.SETTABLEVIEW(Rec);
blobTemp.Blob.CREATEOUTSTREAM(OutStream);
XmlPort.SETDESTINATION(OutStream);
XmlPort.EXPORT;
blobTemp.Blob.CREATEINSTREAM(InStream);
XmlDomDoc.load(InStream);
BigTextVar.ADDTEXT(XmlDomDoc.xml);

 

BigTextVar è una variabile di tipo BigText

XmlDomDoc è una variabile di tipo automation 'Microsoft XML, v3.0'.DOMDocument

blobTemp è una variabile di tipo Record( temporaneo ) che ha un campo di tipo Blob. 

martedì, 02 ott 2012 Ore. 16.18

Messaggi collegati


Statistiche
  • Views Home Page: 451.253
  • Views Posts: 863.664
  • Views Gallerie: 0
  • n° Posts: 343
  • n° Commenti: 0
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003