Send Transfer the result of an XmlPort via WebService

heveen
Member Posts: 20
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.
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
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
0
Comments
-
Hi Heveen,
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.
Ironluc0
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