Download presentation
Presentation is loading. Please wait.
Published byDamon Cooper Modified over 9 years ago
1
XML Over The Web Today Dino Esposito Wrox Press 6-313
3
Agenda Present and future of XML and HTTP Present and future of XML and HTTP XmlHttpRequest XmlHttpRequest Using XmlHttpRequest in Visual C++ ® apps Using XmlHttpRequest in Visual C++ ® apps Architecturally speaking… Architecturally speaking…
4
Why XML Text-based and human-authorable Text-based and human-authorable Available on (almost) all platforms Available on (almost) all platforms Great for describing data Great for describing data Designed to be simple and effective Designed to be simple and effective
5
Why HTTP Broadly accepted Broadly accepted Jumps through firewalls Jumps through firewalls Designed to be simple but effective Designed to be simple but effective No runtime support unlike DCOM
6
Why XML And HTTP Another (better?) component model Another (better?) component model Increase interoperability Increase interoperability No mandated API or runtime No mandated API or runtime Industry standards Industry standards
7
The World Without XML HTML and ASP HTML and ASP Server-side pages Remote data services Remote data services COM calls through HTTP Remote scripting Remote scripting ECMAScript calls through HTTP
8
The World Without HTTP DCOM DCOM Complexity and dynamic ports COM Internet services COM Internet services DCOM over HTTP via tunneling TCP Internet InterORB protocol Internet InterORB protocol Protocol to connect different ORBs
9
The World With XML+HTTP Connect to remote services Connect to remote services Platform and language neutrality Send and receive XML text Send and receive XML text Get the best of both worlds Get the best of both worlds Encoding and data representation Connect to a Linux CGI from Visual Basic ® !
10
SOAP Breaks In Services over the network Services over the network Connect through HTTP Communicate through XML An XML-based language for remote method invocation An XML-based language for remote method invocation Open specification with trial implementations Open specification with trial implementations Doesn’t reinvent any wheel Doesn’t reinvent any wheel
11
Agenda Present and future of XML and HTTP Present and future of XML and HTTP XmlHttpRequest XmlHttpRequest Using XmlHttpRequest in Visual C++ apps Using XmlHttpRequest in Visual C++ apps Architecturally speaking… Architecturally speaking…
12
XmlHttpRequest? Part of MSXML ( Microsoft.XMLHTTP ) Part of MSXML ( Microsoft.XMLHTTP ) Arbitrary HTTP requests and responses Arbitrary HTTP requests and responses Does not use SOAP (yet?) Does not use SOAP (yet?)
13
XmlHttpRequest And SOAP Client Web Service SOAP Request SOAP Response Web Service COM-based client XmlHttpRequest URL XMLDOM
14
How It Works Create an instance of the object Create an instance of the object Set operation and URL Set operation and URL Send data Send data Get the response Get the response Raw text, XMLDOM, IStream, array
15
A XMLHTTP Request Set xmlhttp = CreateObject("Microsoft.XMLHTTP") xmlhttp.open "GET", “http://expoware/demo/test.asp", false false xmltext = " MSDN " Set xmldom = CreateObject("Microsoft.XMLDOM") xmldom.loadXML xmltext xmlhttp.send xmldom
16
A XMLHTTP Response <% set xmldom = Server.CreateObject("Microsoft.XMLDOM") xmldom.load(Request) set n = xmldom.selectSingleNode("magazine") n.text = “MSDN Magazine" strText = “New text is: " & xmldom.xml Response.Write strText %>
17
Methods And Properties
18
Agenda Present and future of XML and HTTP Present and future of XML and HTTP XmlHttpRequest XmlHttpRequest Using XmlHttpRequest in Visual C++ apps Using XmlHttpRequest in Visual C++ apps Architecturally speaking… Architecturally speaking…
19
Example #1 C++ application that utilizes the component C++ application that utilizes the component XmlHttpRequest
20
Example #2 MFC application that fills its own UI with XML data taken from an ASP page MFC application that fills its own UI with XML data taken from an ASP page XmlHttpRequest
21
Exchanging XMLDOM Use send to pass an XMLDOM Use send to pass an XMLDOM Target ASP pages process it Target ASP pages process it xml.loadXML(Request) ASP page returns XML text ASP page returns XML text Set ContentType to text/xml Use responseXML to retrieve it
22
Agenda Present and future of XML and HTTP Present and future of XML and HTTP XmlHttpRequest XmlHttpRequest Using XmlHttpRequest in Visual C++ apps Using XmlHttpRequest in Visual C++ apps Architecturally speaking… Architecturally speaking…
23
Web Services Any service available on the Web Any service available on the Web Components, applications, servers, pages Platform and language neutrality Platform and language neutrality Web services versus DCOM Web services versus DCOM
24
New Web Apps Web client Web Server Operating System Components Any platform! DataStore Win32 client Other platform client
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.