Hello Guys
I want your help concerning Xmlport and text.
The situation:
I have php and .Net client that want to check an item from navision. The client want the result to be in xml format.
Solution:
I decided to use XmlPort as it is quite straightforward and the response will be well formatted.
I have done this.
CreateItemXml(itemNo : Code[20];VAR Result : BigText)
Item.SETRANGE(Item."No.", itemNo);
IF Item.FINDFIRST THEN BEGIN
XmlFile.CREATE('D:\XmlItem.xml');
XmlFile.CREATEOUTSTREAM(XmlStream);
XmlItem.SETDESTINATION(XmlStream);
XmlItem.SETTABLEVIEW(Item);
XmlItem.EXPORT();
XmlFile.CLOSE();
END;
The result is as the client expected:
<?xml version="1.0" encoding="UTF-16"?>
<Response>
<Item><No>1110</No></Item>
</Response>
but my current solution is creating an xml file.
What i want is to get the text representation of the xmlport result and send it through my web service.
How can i either
1. convert the Outstream into Bigtext OR
2. get the text value of the Xml port. ???
I hope you have understand what i am trying to ask you guys..
See you with your answers...
Heveen
Comments
Which version are you using, 2009 or 2013?
From my point of view 2009 does not support your request. But it is possible in 2013.
Ironluc