Import Blob to XMLPort from Webservice

G8tor
Member Posts: 29
Hello. Im beginner in Nav and I have been assigned to convert form to page. When I convert to page the xml will not import to the XMLport like it did with the form.
What is the reason for that? Does anyone have solution for this?
- - - - - -- - - - - -- - - - - - - - - - -- - - - - -- - - - - - -- - - - - - -- - - - -- - - - - - -- - - - - - -- - - - -
Name DataType Subtype Length
ReadyXMLDoc Automation 'Microsoft XML, v4.0'.DOMDocument 40
XMLDoc Automation 'Microsoft XML, v4.0'.DOMDocument 40
XMLHTTP Automation 'Microsoft XML, v4.0'.XMLHTTP 40
XMLHTTP.open('GET',Url,FALSE,User,Password);
XMLHTTP.send(); // send url to get an answer
IF (XMLHTTP.status = 200) THEN BEGIN // answer is OK
IF ISCLEAR(XMLDoc) THEN
IF NOT CREATE(XMLDoc) THEN
ERROR(Text000);
XMLDoc.async:=FALSE;
XMLDoc := XMLHTTP.responseXML; // load the answer #02
CLEAR(TempTable);
TempTable.CALCFIELDS(Picture);
TempTable.Picture.CREATEOUTSTREAM(OutStreamMessage);
TempTable.Picture.CREATEINSTREAM(InStreamMessage);
IF ISCLEAR(ReadyXMLDoc) THEN
CREATE(ReadyXMLDoc);
IF NOT RemoveNamespace(XMLDoc,ReadyXMLDoc) THEN // remove namespace
ERROR(Text003,Url);
ReadyXMLDoc.save(OutStreamMessage); // save answer to an outstream
XmlCollectorPort.SETSOURCE(InStreamMessage);
IF NOT XmlCollectorPort.IMPORT THEN // import the data
ERROR(Text001) // Here comes my error
What is the reason for that? Does anyone have solution for this?
- - - - - -- - - - - -- - - - - - - - - - -- - - - - -- - - - - - -- - - - - - -- - - - -- - - - - - -- - - - - - -- - - - -
Name DataType Subtype Length
ReadyXMLDoc Automation 'Microsoft XML, v4.0'.DOMDocument 40
XMLDoc Automation 'Microsoft XML, v4.0'.DOMDocument 40
XMLHTTP Automation 'Microsoft XML, v4.0'.XMLHTTP 40
XMLHTTP.open('GET',Url,FALSE,User,Password);
XMLHTTP.send(); // send url to get an answer
IF (XMLHTTP.status = 200) THEN BEGIN // answer is OK
IF ISCLEAR(XMLDoc) THEN
IF NOT CREATE(XMLDoc) THEN
ERROR(Text000);
XMLDoc.async:=FALSE;
XMLDoc := XMLHTTP.responseXML; // load the answer #02
CLEAR(TempTable);
TempTable.CALCFIELDS(Picture);
TempTable.Picture.CREATEOUTSTREAM(OutStreamMessage);
TempTable.Picture.CREATEINSTREAM(InStreamMessage);
IF ISCLEAR(ReadyXMLDoc) THEN
CREATE(ReadyXMLDoc);
IF NOT RemoveNamespace(XMLDoc,ReadyXMLDoc) THEN // remove namespace
ERROR(Text003,Url);
ReadyXMLDoc.save(OutStreamMessage); // save answer to an outstream
XmlCollectorPort.SETSOURCE(InStreamMessage);
IF NOT XmlCollectorPort.IMPORT THEN // import the data
ERROR(Text001) // Here comes my error
0
Comments
-
We don't use webservices but maybe this can help:In the pre-SP1 version of Microsoft Dynamics NAV 2009, you could not have a BLOB field on any page that you exposed as a Web Service. In Microsoft Dynamics NAV 2009 SP1, the content of the BLOB is not transferred to the Web service consumer. The field is ignored.0
-
Thanks Savatages for the reply. This is probably the reason.
But how can I do this so the XML port will import xml. How can I catch the XML from instream if I cannot use BLOB to the instream?
Can anyone show me an example?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions