Unable to load XMLDOM from OUTSTREAM in RTC?

pdj
Member Posts: 643
NAV2009 R2 - I have this code, which works fine in the classic client:
I have tried with CREATE(xmldomXSL,TRUE,TRUE) but that gives me an error: "Streams cannot be used with client-side invoked automation objects.". I don't wish to do it client side, so there is no need to "solve" this issue.
Variables: OutStreamXSL: OutStream xmldomXSL: Automation: 'Microsoft XML, v6.0'.DOMDocument Code: SomeRec.GET; SomeRec.CALCFIELDS("Some BLOB Field"); IF NOT SomeRec."Some BLOB Field".HASVALUE THEN ERROR('Some error'); SomeRec."Some BLOB Field".CREATEOUTSTREAM(OutStreamXSL); CREATE(xmldomXSL); xmldomXSL.load(OutStreamXSL); MESSAGE(xmldomXSL.documentElement.nodeName);This works fine in the Classic client, but the MESSAGE gives me an "The automation variable has not been instantiated." in the RTC. The code needs to work in both the Classic Client and the RTC so using .NET Interop is not an option. Can anybody tell me what I'm doing wrong?
I have tried with CREATE(xmldomXSL,TRUE,TRUE) but that gives me an error: "Streams cannot be used with client-side invoked automation objects.". I don't wish to do it client side, so there is no need to "solve" this issue.
Regards
Peter
Peter
0
Answers
-
Which is why there is no need to look further at the CREATE statement :-)
It seems it is my mistake - I'm using OutStreams where I should use InStreams :oops:
Apparently the classic client doesn't mind... :?Regards
Peter0 -
Can you post your code, as I'm still having the same issue?
Thanks in advance"When you eliminate the impossible, whatever remains, however improbable, must be the truth" - Sherlock Holmes
"God and developers are in a constant battle. Developments to make their applications more idiot-proof, and God to produce bigger idiots!"0 -
Well, it is a long time ago, but I'm quite sure I just replaced the OutStream variable with an InStream variable. (And the CREATEOUTSTREAM with CREATEINSTREAM)Regards
Peter0 -
Okay thanks. I done that.
I'm still getting issue but hoping it will be resolved when running it as a web service rather than from a report which I was doing to test it."When you eliminate the impossible, whatever remains, however improbable, must be the truth" - Sherlock Holmes
"God and developers are in a constant battle. Developments to make their applications more idiot-proof, and God to produce bigger idiots!"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