| By David Brandow | Article Rating: |
|
| December 12, 2006 02:00 PM EST | Reads: |
8,064 |
Note that if we wanted to we could use the Database Tooling in WorkSpace to manage the database and perhaps create new stored procedures if they weren't there already.
Having decided to create a service that uses more than one stored procedure, we select the connection profile, bring up the context menu, and choose 'Create Database Service.'
Skipping some of the mundane details of file creation, this gets us to the method selection page where we decide which stored procedures we want to expose in our service.
Note that this is just an initial list; we can always change our minds later on and choose to unexposed some of the operations we choose now and expose some we didn't. So, all that's left to do is hit 'Finish':
The service is created for us, automatically adding those three operations we chose, including all their input and output parameters. We can now choose to expose that service as a Web Service when we deploy it or invoke it from other services (or both, of course). Most commonly one would choose to expose this as a Web Service (exposing it using a SOAP protocol over an HTTP transport), but one could also, or even additionally, chose an XML protocol over a JMS or E-Mail or File messaging transport. Depending on the service type and definition, one could also use a Custom Wire Format protocol as well. Choosing the transport(s) and protocol(s) you want to expose a service over is very simple, simply specify a few details, at most, about the transport(s) and select the protocol(s) to use. In a span of less than five minutes, you can expose your database's stored procedures (and the SQL statements run on your database, which I haven't shown here) either internally, externally, or both, all with no coding required.
A (Mildly) Complex Example:
Creating a Java Service in WorkSpace
So far, so
good, but at this point all we've done is expose existing
functionality, we haven't actually written any new business logic yet.
So let's try writing a simple calculator service in Java. When creating
a Java service, you can either start with an existing implementation or
create a new one from scratch. For purposes of this example, we'll
create it from scratch. Again, skipping over the boring obvious parts,
we create a new Java service that points at a new Java file,
com.sybase.pbdj.test.Calculator:
The interface and implementation are at this point empty, so we'll need to add a new operation. There are two ways of doing this, either by adding a new method to the source (either on the Source page or by editing the .java file in a separate editor) or by adding a new method to the implementation. Since it's faster, we'll add it on the Source page:
Published December 12, 2006 Reads 8,064
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By David Brandow
David Brandow, a software engineer at Sybase, Inc., has been been a key developer on Power++, PowerJ, EAServer, WorkSpace and SUP. David obtained a BMath from the University of Waterloo.
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo and The End of Tech Recession
- The Transition to Cloud Computing: What Does It Mean For You?
- A Rules Engine Built in PowerBuilder
- Sybase Named “Silver Sponsor” of iPhone Developer Summit
- How PowerBuilder Got Its Groove Back
- The Cloud Has Cross-Border Ambitions
- Ulitzer Named "New Media" Partner of Greatly Anticipated iStrategy Event in Berlin
- Risks and Enterprise Mobility?
- Steps for Success in Enterprise Mobility?
- Are Mobile Luddites Resisting Mobility?
- Hot Event in Santa Clara Becomes Cool with the iPhone
- The Difference Between Web Hosting and Cloud Computing
- Sybase CTO to Speak at 4th International Cloud Computing Expo
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo and The End of Tech Recession
- The Transition to Cloud Computing: What Does It Mean For You?
- Five Reasons to Choose a Private Cloud
- Seeding The Cloud: The Future of Data Management
- The Threat Behind the Firewall
- Economy Drives Adoption of Virtual Lab Technology
- Tips for Efficient PaaS Application Design
- A Rules Engine Built in PowerBuilder
- Sybase Named “Silver Sponsor” of iPhone Developer Summit
- Where Are RIA Technologies Headed in 2008?
- PowerBuilder History - How Did It Evolve?
- The Top 250 Players in the Cloud Computing Ecosystem
- Custom Common Dialogs Using SetWindowsHookEx
- DDDW Tips and Tricks
- OLE - Extending the Capabilities of PowerBuilder
- DataWindow.NET How To: Data Entry Form
- Book Excerpt: Sybase Adaptive Server Anywhere
- Sybase ASE 12.5 Performance and Tuning
- Working with SOA & Web Services in PowerBuilder
- Office 2003 Toolbar: A New Look For Your Old PowerBuilder App
- Dynamically Creating DataWindow Objects


































