With Release 3.3, DevForce
now generates the necessary code to
expose your business model via web
services. You have always been able
to consume web services in a DevForce
app; and for some time, you have also
been able to base DevForce business
classes on them. Now you can publish,
too!
To activate this feature, you
set a new Web Visible property of the
business classes in the Object Mapper
to “As web method”. By doing so, you
indicate your desire to have the specified
classes exposed through web services,
so the Object Mapper generates a new
file, WebService.cs or WebService.vb,
that contains the web methods that
will be available to clients.

For each class that you marked with “As
web method” visibility, you will see
two web methods in the WebService class.
One will return business objects in
an array; the other (suitable for .NET
clients only) will return them in an
ADO.NET DataSet. If you set the visibility
of a Customer class to “As web method”,
for example, the Object Mapper will
generate methods GetCustomers() and
GetCustomersDataSet() into the WebService
class.
Another setting of the Web Visible
property, “As span object”, results
in no direct web methods, but instead
permits objects of the indicated type
to be returned from web methods as
part of the object graph of other objects.
So, for example, if Order objects are
marked “As web method” while OrderDetail
objects are marked “As span object”,
web methods will be defined for the
Order objects but not for the OrderDetail
objects. However, the OrderDetail objects
will be retrievable in a span query
as part of the object graph of Orders.
Classes and enums that the web service
consumer needs to define and use queries
against your web service are included
in the generated web service’s WSDL.
These include Query, QueryClause, SubQuery,
QuerySpan, and others. These members
become available to the consuming application
through a web reference.
More information
about web service publishing with DevForce
is currently available from two sources.
The Release Notes for the 3.3 release
of DevForce include an extended discussion;
and a new instructional unit, “Web
Service Publishing”, is now part of
the product’s Learning Materials. Both
items are available through links on
the Windows Start menu at Start / All
Programs / IdeaBlade DevForce / Documentation.
Happy publishing! |