NEMUG NewsletterJune 2003, Articles
Board MeetingsNEMUG Executive Board Meetings are open to anyone to attend. Your presence and views are welcome at any time. The meetings are held on the second Monday of even-numbered months, at the office of Henry Elliott in Wellesley. We try to get started at 6:00 pm. Dates for the next few meetings are:
If you are planning to attend, please let a board member know in advance, as we provide food and eat as we work, and need to be sure we have enough for everyone. The complete address for the meetings is: Henry Elliott and Company Inc. From the ChairIn this issue's column, I am pleased to make three announcements:
As always, we on the board are here to serve you, the members of NEMUG. Let us know what topics and speakers you'd like to hear at the meetings, and anything else that we can do to help further the knowledge and use of M. Marilyn D. Paterno, Chair May Business MeetingElections for the 2003-2004 year were conducted at the May 13th meeting. Those elected, whose names appear below, will begin their terms of office in July. The rest of the business meeting was postponed to the July meeting.
May Meeting: XML, SOAP and Caché Web ServicesPresenter: Bill McCormick, Manager of Applications Development Support at Intersystems XML (eXtensible Markup Language) is a mark-up language exchanging data between applications, just as HTML is an Internet mark-up language for displaying data. The structure of XML is hierarchical and multidimensional, the same as the Caché database. Adding %XML.Adaptor to a Caché class adds methods that enable the class to export data in XML format. This also enables the class to create either a DTD (Document Type Definition) or an XML Schema for the class which define the structure of the XML data. There are methods that allow you to output data to the principle device, to a 32k variable string or to a stream object. Caché projects objects as XML documents using a XML projection. Object instances correspond to top level XML elements. The XML projection determines how object properties correspond to XML elements or attributes. Properties can be projected as an element (default), attribute, collection or not projected (none). XML elements are shown with start and end tags in a XML document (<NAME> Harry </NAME>). Attributes are shown as name-value pairs within an element with the value in quotes ( <CUSTOMER NAME="Harry"> </CUSTOMER>). The %XML.Reader class works in conjunction with the methods provided by the %XML.Adaptor class. It allows you to read a XML document and create instances of XML enabled objects that correspond to the elements of the document. Data can be read from files, streams or line by line. Web Services are a way of sharing application functionality over the Internet by using a collection of related methods that a client application can invoke using the SOAP (Simple Object Access Protocol). Web Services have a public interface described in WSDL (Web Service Definition Language) and they return an XML document formatted according to SOAP. To create a Web Service add %SOAP.WebService to a Caché class. Within the class definition you define class methods (SOAP does not support invoking instance methods) that correspond to the methods of the Web Service. Each method has to have the keyword WebMethod in its definition. The Web Service class must define the following parameters:
When the Web Service class is compiled, Caché creates a SOAP interface for each method that converts a SOAP XML request into a specific call to the Web Method. Also, a WSDL document is created. The WSDL document is an XML document that lists the available methods with their signatures (parameters and types) for each Web Service. A SOAP client uses the WSDL document to determine which methods are available and how to invoke them. When invoked, the Web Method executes the method code and returns an XML response document to the SOAP client. Web Methods can return arrays of objects by defining a class query, a result set based on either a SQL statement or user defined code. Caché also has limited support for SOAP clients. These allow you to access Web Services that are implemented as web sites, .NET, or other Caché systems. To implement a SOAP Client, the %SOAP.WebClient must be added to the Caché class. As with Web Services, the Web Client class must define the LOCATION, SERVICENAME and NAMESPACE parameters that match the service. The methods must be class methods and include the keyword WebMethod in their definition. The method signatures of the Web Client and the Web Service must match. Bill's presentation slides are available in PowerPoint format. Also, the Caché 5 documentation includes excellent information on XML, SOAP and Web Services. NEMUG would like to thank Bill McCormick for his excellent and informative presentation. ~ submitted by Ben Hurley |
For more information about NEMUG, contact: Gardner Trask at gtrasknemug@gt3.com or call him at (978) 774–1338.
Last Updated: 12-July-05