Read XML from Azure CDN Marshalled error
I would like to load an XML file stored in Azure CDN in a Windows 8.1 App. This code throws Marshaling error:The application called an interface that was marshalled for a different thread. (Exception from HRESULT:
0x8001010E (RPC_E_WRONG_THREAD))
public async Task<XDocument> LoadXmlFromCDNAsync()
var url = new Uri("http://azXXXXXX.vo.msecnd.net/cdn/Data.xml");
var handler = new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip };
var client = new HttpClient(handler);
XDocument doc = new XDocument();
using (var stream = await client.GetStreamAsync(url))
doc = XDocument.Load(stream);
return doc;
Thanks.
FS
Hi,
I test your codes. And the result below:
I can successfully load the XML file. I think there is no problem in the codes which you used to load an XML file.
And as the error says, the problem is the thread on which the call occurs: the app cannot manipulate UI elements from non-UI threads. That error usually means you are calling something that requires the UI thread from a different thread. You can
call Dispatcher.RunAsync to marshall a task back to the UI thread.
See
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.core.coredispatcher.runasync.aspx
And see the thread below:
https://social.msdn.microsoft.com/Forums/en-US/f1fe027f-2c6c-4a22-9418-566fcf67cebe/the-application-called-an-interface-that-was-marshalled-for-a-different-thread?forum=winappswithcsharp
Best Wishes!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
Similar Messages
-
Read XML from a hardware sensor file into ODI
Read XML from a hardware sensor file into ODI
Hi,
I am trying to extract xml data from a flowmeter that generates XML data.
The xml file is found in http://ip_address/history.xml
I’ve defined my Topology as such
JDBC Driver: com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
JDBC URL: jdbc:snps:xml?f=http://192.168.0.202/history.xml&ro=true
Please note to access the file I have to supply a username and password so I did in the definition But when testing my setup I get an error:
ava.sql.SQLException: The DTD file "http://192.168.0.202/history.dtd" doesn't exist: Server redirected too many times (20)
Please note I cannot write dtd to the device as it is a read only device.
Has anyone came across such an issue, how can I achieve this.
Thanks
HichamHi David,
Thanks for your reply.
I've tried this jdbc url
jdbc:snps:xml?f=http://192.168.0.202/history.xml&d=c:\temp\history.dtd
but when I test the connection i get the following error
java.sql.SQLException: While generating the DTD from the XML file, a java.io.IOException exception occurred saying: Server returned HTTP response code: 401 for URL: http://192.168.0.202/history.xml
If I browse http://192.168.0.202/history.xml and i supply the username and password I get an xml page.
I've supplied the username and password in the definition tab of the Data Server windows but still getting the above error.
THanks
Hicham -
Hello.
I have ContentServer on SLES 11 and MaxDB 7.6.06.
When I don`t create backup:
dbmcli -d SDB -u superdba,123456 -uUTL u2013c backup_start completeT
dbmsrv: /SAP_DB/76_SP_REL/linuxx86_64/genopt/sys/wrk/incl/SAPDB/ToolsCommon/Tools_DynamicUTF8String.hpp:871: Tools_UTF8ConstIterator Tools_DynamicUTF8String::GetIteratorAtBasis(unsigned int) const: Assertion `(ToPtr(iter) == ToPtr(End())) || (ToPtr(iter) < ToPtr(End()) && ElementType::IsValid(iter))' failed.
DBM-Api error ( -4'Reading header from pipe:(0:NO ERROR(0))')
But when I try create this backup from SAP MaxDB Database Studio - all ok.
Regards.Hello,
1. "But when I try create this backup from SAP MaxDB Database Studio - all ok".
Did you connect to the database as superdba user?
What is the dbm user of the database?
Did you use the completeT medium to create the database backup?
2. "dbmcli -d SDB -u superdba,123456 -uUTL u2013c backup_start completeT"
Run:
dbmcli -d SDB -n localhost -u superdba,123456
<enter>
dbmcli on SDB>db_connect
<enter>
dbmcli on SDB>backup_start completeT
<enter>
dbmcli on SDB>exit
update with results.
See the document at:
http://maxdb.sap.com/doc/7_6/43/b2fbe195701bbde10000000a1553f7/content.htm
Regards, Natalia Khlopina -
Reading XML from Oracle directory to generate charts
Hi,
I have a requirement create graphs, charts and maps based on data from a data warehouse (dw). As I see things, there are two possibilities:
Graphs, charts and maps based on an XML file
Graphs, charts and maps based on Oracle tables
Both would contain small data sets that will allow for quick response. The intent of these graphs, charts and maps is to generate a dashboard that would allow the user to quickly drill down to the desired warehouse data.
The proof of concept has already been validated using the Oracle table scenario. My question is whether or not this could be accomplished reading xml files for generating the same set of dashboard items?
My Oracle database and APEX environments configuration are as follows:
NLSRTL 11.2.0.1.0 Production
Oracle Database 11g Enterprise Edition 11.2.0.1.0 64bit Production
PL/SQL 11.2.0.1.0 Production
TNS for Solaris: 11.2.0.1.0 Production
Application Express 4.2.2.00.11
APEX Listener Release 2.0.2. / Tomcat
An Oracle database directory has been setup and is accessible to our APEX application.
Any suggestions/help is appreciated.
Thanks,
CharlesAn Oracle Directory has an underlying OS directory associated with it, Oracle just overlays it's control structure onto an existing folder in the OS. You can manipulate the files with stored procedures in Oracle or at the OS level from outside of Oracle.
If you manipulate the files from the OS level, outside of Oracle, you may need a refresh of the Oracle Directory structure. -
Write n then read xml from database to create graph in an applet
Hi mates
I have one problem I want show a trend(graph) from sql database which is having the records of about 8600 in a day. And i want to show a graph for a day
but sometimes it gives a problem like out-of-memory, so can anyone tell me how i can get read of it.
and other this can i use xml for this means first write a data in xml format from database then read it at sametime and show graph in applet
can anytell me how to do it
any suggesion is appreciable
thanxHere's are two example for what you are looking for
Re: Load xml data in Oracle table
Re: insert .xml file into xmltype table?
First you need to create a DIRECTORY object. That is how Oracle works and it expects a DIRECTORY object instead of a physical path when performing operations that read/write from disk. The directory path provided to the CREATE DIRECTORY command must be a directory that the machine Oracle DB resides on can see.
Then you can go either of two routes. You can INSERT that XML directly into a table, as shown in the second link I provided or you can read it into PL/SQL as the first link shows. Then in either case, you can use SQL to parse the XML for you.
Depending upon your needs, you may get better performance if you insert the XML into a table as the second link shows, assuming the XMLType column is stored as SECUREFILE BINARY XML. -
How to read XML from web page inside servlet/jsp ?
i have a url, which on sending request, shows XML in browser.
Now i need to read this XML in browser and then manipulate it according to my need and display it on another page.
actually the process is. :
1) i have to first retrieve an xml from other site. (XML will only be shown in browser)
2.)then i have to read the Xml and show it in according to my requirements.
Is there any way to read XML directly from a Web Page ??
is their logic to accomplish this.
e.g in Servlet i can do somewhat like this :
String wholeXml=Somemethod(url);
Please AdviceHi,
if u wanna extract data from XML. you can use Digester(Apache-jakarta) parser. All u need to create the beans(as per the data in xml), that will be populated by Digester.
Digester takes xml(string) as parameter and populates the bean specified.
U can use this bean in ur JSP.
:::Note:::; use Digester in ur servlet.
for more read:::
http://www.onjava.com/pub/a/onjava/2002/10/23/digester.html
I hope it shall work..
@mit -
Not sure if this is even possible.
I am using APEX on a INTERNAL server, on the same network is another server hosting files.
Using PL/SQL code, I need to read the XML file.
So APEX/ORACLE is at http:\\server1\apex\f?p........
And the files are at \\server2\xml\file.xml
Can I load the xml from server2 using pl/sql in server1?
The XML is generated automatically from another system and can not be stored on the APEX server. It does not need to go into the database, just read, parced, and displayed.Hi,
Using PL/SQL code, I need to read the XML file. You can create a directory object pointing to the location on server2 :
CREATE DIRECTORY xml_dir AS '\\server2\xml';then you can access the XML content like this :
DECLARE
v_xml_doc xmltype;
BEGIN
v_xml_doc := xmltype(bfilename('XML_DIR', 'file.xml'), nls_charset_id('CHAR_CS'));
-- XML processing here...
END;
/ -
Hi experts,
I need to read a XML from https address,i have no idea to make it possible, any idea?
points for all
thanks all.Hi,
It is secure link at XI end need to configure SSL else it is not possible. We can read data through HTTP & SOAP adapter.
Find below links for more help.
http://help.sap.com/saphelp_nw04/helpdata/en/14/ef2940cbf2195de10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/f7/c2953fc405330ee10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/14/ef2940cbf2195de10000000a1550b0/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/964f67ec-0701-0010-bd88-f995abf4e1fc
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/23894238-0701-0010-40b0-a0a6d5c4ad9f?prtmode=navigate -
Read xml from application server
Hello guys,
I have craeted program read xml file from presentation server. its working fine...
below is program
now i want to program read xml file from Application server.
so please give me some idea for that.........
<MODIFIED BY MODERATOR - RESPECT THE 2,500 CHARS LIMIT>
thanks
jigar
Edited by: Alvaro Tejada Galindo on Jan 12, 2010 11:50 AMHi
U need to just replace the fm to upload the file with command OPEN DATASET / READ DATASET / CLOSE DATASET: if you upload the data from application server in the same internal table loaded by fm for presentation your report should be the same
Max -
Hi there,
I would like to read XML data from Applet,
first of all is it possible?
If yes then how and will I require any extra pugin other than Java Plug-in?
ThanksSure you can, as long as the applet has permissions to read the xml file. If it is in the same directory as the applet it should be ok.
There is no need for an extra plugin. Here's a starting point:
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(<some stream>);
Element data = doc.getDocumentElement();
NodeList dbChildren = db.getChildNodes(); -
Hello
I need to read a xml from a sql server 2000 database. The field in the database is declare as text.
When a try to read <a>3</a> the database adapter returns something like this.
/a/3//a/.
How do I solve the problem?
Thanks
Gonçalo RibeiroHello again.
I'm using ora:parseEscapedXML to convert the string that contains XML into XML.
I'm doing it in an assign. My doubt is what kind of variable should received the information?
Thanks
Gonçalo Ribeiro -
I am developing web services based GIS, I have XML file which was generated from Geoserver. I dont know how to link Java with XML and query XML from Java. I need help pls.
PAIthere are apis to parse xml using java,
http://www.cafeconleche.org/books/xmljava/chapters/ch09s06.html
try this link..
regards
Shanu -
Help required in writing And Reading Xml From Database
Hi
i m new to java.
i m facing problem while writing Xml file from Mysql Database in java i m using the WebRowSet
and also for Reading WebRowSet
after reading the Xml i have to save this in Database
(required source code)
is there any one to help me in this way
regards
aamirshadab_think_globally wrote:
{noformat}*hi everybody,
please send me a ajax with jsp application
suppose i enter a word in text area ajax will populate/suggest all string from database ,who started
from that entering character(s).like a google string search.
please send full source code
*{noformat}how about you do it yourself? -
Reading XML from a plugin (Mac OSX 10.4.10)
Hi gurus,
Basically, I want to read an XML file from within a plugin, without using the AIXMLxxxSuites. Sound simple? Answers on a postcard please, because I haven't managed it yet, and I'm running out of hair!
I've tried using libxml2, which works great... until you quit Illustrator, then it crashes and I can't stop it from doing so. I can only assume that something's being released when my plugin is unloaded which Illustrator's not expecting, causing a crash on exit, but I'm just guessing.
I've also tried eXpat, which was a complete nightmare to install but I got it working eventually. Only problem is that when you compile it with fink (or some other package manager) it compiles for your specific architecture, i386 in my case. This doesn't end well when you have over 500 mixed PPC/i386 Macs to target.
So anyone else got any ideas? I'm quite new to Mac development coming from a Windows dev background (where'd MSXML go?!) so please be gentle :)
Thanks in advance!
--WI see no reason why you couldn't get libxml, eXpat or Xerces working, however with the provided information I see no way to offer advice.
I suspect it will take a debugger and a good look at your code to understand your situation, so I just offered a (simple) suggestion. I will add that you do get something by developing a home brewed solution, namely no limitations, cross platform capability, and complete understanding (hopefully).
I run a software company based on opensource software, so I routinely build and use the packages you mentioned (without Fink). I am afraid however, that providing assistance here is beyond the scope of this forum.
Best regards,
-jeshua -
How to read xml from jsp?
i hav written database into xml file .
now i want to read that xml file data from JSP
pls help me out.Now is a good time to start reading about XML parsers and some OOP principles. It's not a good idea to mix all the xml parsing logic within a JSP. Try a Google search for XML parsers and find out which is the best way for you to go about.
Maybe you are looking for
-
Unable to delete photos from iPhone 5 Model MD655LL/A
My wife needs to free up some space on her iPhone so she can take more photos and videos. She has an iPhone 5 Model MD655LL/A. In General > About the device shows a Capacity of 12.7 GB and Available 1.1 GB. She has 9 videos and 1,488 photos on thi
-
N97 Main Menu .. For those who didnt know !
Hi All , Lots of ppl out there complain that the Main Menu Cant be extended for scrolling & adding items & icons , for new users it might seem its just doable in Applications .. Well I thought so too but figured it out by Chance ! you just go to Ap
-
LV7.1 DAQmx PCI-6036E SC-2345 Windows 2000 Greetings. I am simply trying to synchronize AI readings with readings from one Counter. I am trying to perform buffered analog input synchronized with buffered counter acquisition. I'd like the AI acquistio
-
DW Right-justifying the index for one site only
Dreamweaver has suddenly started showing the directory for one of my sites as right-justified: Does anyone know how I can get this back to left-justified? Thanks Steve
-
HP Photosmart 6520 - Black ink not printing after being replaced
I have searched this forum and tried all suggestions to no avail. I live in Maine, USA. My printer will not print black, only colors. I bought new cartidges that gave the same result. I have had this printer for maybe 2 years and it is barely used. I