Web Service

Saalek
Member Posts: 181
Hi
I have a problem using web services.
1- I've this XML File (is an example):
2- I've a published codeunit in Navision to read this file using BigText
3- When I call this WS, i receive this error message:
Why ?
The problem is that when I call WS, all nodes from XML file disappear, so only have node values.
I modified the function to save in a file the bigtext variable, and I only have this:
If I call this function as a normal Nav function, it works fine.
Someone knows why the nodes disappears ?
Thanks
I have a problem using web services.
1- I've this XML File (is an example):
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <navFunction xmlns="urn:microsoft-dynamics-schemas/codeunit/NAV"> <text> <field1>value1</field1> <field2>value2</field2> <field3>value3</field3> </text> </navFunction> </soap:Body> </soap:Envelope>
2- I've a published codeunit in Navision to read this file using BigText
navFunction(Text : BigText) Text[1024] CLEAR(XMLDocument); CREATE(XMLDocument); TempBlob.INIT; TempBlob.Blob.CREATEOUTSTREAM(WriteStream); TextoEntrada.WRITE(WriteStream); TempBlob.CALCFIELDS(Blob); TempBlob.Blob.CREATEINSTREAM(ReadStream); XMLDocument.load(ReadStream); XMLNodeList:=XMLDocument.childNodes; .... ....
3- When I call this WS, i receive this error message:
<?xml version="1.0"?> -<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">-<s:Body>-<s:Fault><faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLAutomationVariableNotCreatedException</faultcode><faultstring xml:lang="es-ES">The automation variable has not been instantiated.</faultstring>-<detail><string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">The automation variable has not been instantiated.</string></detail></s:Fault></s:Body></s:Envelope>
Why ?
The problem is that when I call WS, all nodes from XML file disappear, so only have node values.
I modified the function to save in a file the bigtext variable, and I only have this:
value1
value2
value3
If I call this function as a normal Nav function, it works fine.
Someone knows why the nodes disappears ?
Thanks
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