Search DominoPower's 11,437 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
How to create a Web service to extract data from XML documents (continued)

FIGURE C


This sample code will be generated. Roll over picture for a larger image.

This new Web service is ready to run just by removing the comments from the WebMethod and HelloWorld Function. In order to process the Lotus Notes data found in the names.xml document, a small modification to the Web service code is required, as seen in Figure D.

FIGURE D


A small modification to the Web service code is required. Roll over picture for a larger image.

Figure D contains the necessary code to process and manipulate the names.xml file. The GetNotesData function takes in a single parameter (strCompanyName) that is used for filtering purposes. Inside this function the names.xml data is imported into a dataset and filtered into another dataset that is then published to the Web in XML format. Once the code from Figure D is copied to the new Web service and the names.xml file is added to the Web service's directory (c:\inetpub\wwwroot\NotesData), the Web service is ready for testing.

When run, a browser opens to the address of the Web service at http://localhost/notesdata/notesdata.asmx. In the browser you will see the Web service function GetNotesData displayed as a hyper link with a short description of the service. If you click on the GetNotesData link you will be taken to another page. This new page will allow you to enter a parameter for the GetNotesData method and invoke this Web service. If you enter a company name from the names.xml document in the Value text box and click the invoke button, XML data (based on your query) will be displayed in the browser. Figure E shows an example of the published XML data, based on entering "Testing Company" as a parameter.

FIGURE E


Here is an example of the published XML data. Roll over picture for a larger image.

The strength of XML is its portability. Creating well-structured XML documents is a fairly simple process in most programming languages by using inherent file manipulation functionality. These documents can then be processed by a Web service much like the sample, and the results can be published to the Web. XML documents can be created from just about any file format in this case and can be easily accessible over the Web using a process like this. Consuming the sample Web service well be described in a future article.

Product availability and resources
For more information on Web services, visit http://www-106.ibm.com/developerworks/webservices/.

Easy, flexible article reprints
ZATZ now offers a quick, easy, flexible and inexpensive way to use article reprints in your marketing and promotion efforts. You can now get article reprints for a one-time fee of only $200. For details, visit http://mediakit.zatz.com/reprints.

Steve Callan is a Web Applications Architect with an MS in CIS. He's worked with Microsoft languages for over ten years building internationally marketed software for both the Web and Windows. Languages he uses include VB, C#, ASP.NET, XML, HTML and C++.


« Previous  ·  1  ·  2  ·  3
Other articles you might like
Home > Internet Technologies > XML (11 articles)
   Building an XML based Content Management System using Lotus Domino: wrapping it up
   Building an XML based Content Management System using Lotus Domino: overview of the content administration system
   Building an XML based Content Management System using Lotus Domino: overview of the HTML display template
Home > Strategies > Web Services and SOA (3 articles)
   An SOA approach to implement standard source code control systems with a Lotus Notes development environment
   Lotus adds the human touch to Web services
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
Adding Quick Highlighter support to IBM Lotus Notes Domino Wiki, Weblog, or Webpage
Remember Young Admins...there are 2 files
WebSphere Portal 6.1.0.2 and Lotus Domino 8.5
The CKEditor - with Domino
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login