WebSpeed PASOE - How do I properly define services through D

Posted by Joe Clay on 23-Jun-2016 06:00

Just about all of my experience developing web services in ABL so far has been using Progress Data Objects - these have worked for me up to a point, but after attending a talk at the UK PUG conference that went into some detail on the new object-oriented WebSpeed, I'm interested in seeing if this might be a better approach.

I've got up and running with an instance of PASOE and the default WebHandler, but something that's confusing me somewhat is that it seems like the only way to map a URI to a different handler in Developer Studio is by creating an entirely new service and adding it to the server. This seems strange compared to how it works with Data Objects (a single service, you just tick/untick the resources you want to be included). I'm aware that it's possible to map the handlers manually through openedge.properties or OpenEdge Explorer (and I assume this is how you'd do it in production), but if there's an easier way of doing this in development, I'd like to take advantage of it!

So effectively, my question is: is adding a service to the project per handler the intended way of doing things, or is there an easier way I'm missing?

(Additionally, I'd appreciate if anyone could direct me to any more in-depth documentation on the new WebSpeed - all I've been able to find so far are the sections under "Pacific Application Server for OpenEdge" in the main docs, but it doesn't seem to go into a lot of detail!)

Posted by Mike Fechner on 23-Jun-2016 08:11

Must admit, that my personal preference is to maintain the web handlers - also in development - manually. I simply create classes inheriting from the base Web handler (or our extended version of the base web handler) and maintain the web handlers in openedge.property manually. A web handler is just an ordinary ABL class.

It's just so much faster than waiting for the publishing in PDSOE ... and makes working in a team much easier.

There's no need to restart PASOE when a new web handler was added to openedge.properties and there is also no need to restart PASOE when you modify a web handler (they don't seem to be session singletons like the REST Adapter classes).

Here's a sample of our web handler definition in openedge.properties: confluence.consultingwerkcloud.com/.../Pacific WebSpeed WebHandler based JSDO Generic Service

All Replies

Posted by egarcia on 23-Jun-2016 06:26

Hello,

In PDSOE, you can map multiple URIs to the same service/WebHandler by adding it to the Resource URI(s) list in the New Project wizard, the New Service wizard (when adding a new service to a project) and also from the Edit ABL Service dialog (from Defined Services).

Because you are working with WebHandlers and have worked with Progress Data Objects, you might be interested in the following sample that that shows a generic/dynamic service to access data from the JSDO:

   community.progress.com/.../2677

I hope this helps.

Posted by Joe Clay on 23-Jun-2016 07:03

Ah, sorry, my question wasn't very well phrased - I don't have any issues with adding multiple URIs to a single service, the part that's confusing me is whether or not you have to add a new service for every handler in your project - in other words, if I have a SalesOrderHandler, a SalesItemHandler, and a CustomerHandler, would there have to be a corresponding service in Defined Services for each one?

Also, thank you for that link! I don't think I'll be using the JSDO with my WebSpeed services, but that definitely seems like a good source of example code for handlers.

Posted by Sanjeva Manchala on 23-Jun-2016 07:44

Hi Joe,
 
For each WebHandler you have to create one WebSpeed service and have to publish that service to PASOE server.
 
Hope this helps,
Sanjeev.
 

Posted by Mike Fechner on 23-Jun-2016 08:11

Must admit, that my personal preference is to maintain the web handlers - also in development - manually. I simply create classes inheriting from the base Web handler (or our extended version of the base web handler) and maintain the web handlers in openedge.property manually. A web handler is just an ordinary ABL class.

It's just so much faster than waiting for the publishing in PDSOE ... and makes working in a team much easier.

There's no need to restart PASOE when a new web handler was added to openedge.properties and there is also no need to restart PASOE when you modify a web handler (they don't seem to be session singletons like the REST Adapter classes).

Here's a sample of our web handler definition in openedge.properties: confluence.consultingwerkcloud.com/.../Pacific WebSpeed WebHandler based JSDO Generic Service

Posted by Joe Clay on 23-Jun-2016 08:45

Ah, I wasn't aware you could change openedge.properties without restarting the server! That makes maintaining it manually seem a lot more palatable. Thanks for the examples, they look like they'll definitely come in handy!

Posted by Mike Fechner on 23-Jun-2016 08:49

Also, using the command line to use "bin\tcman start" from the instance directory start seems to be the fastest way to start PASOE. That will also launch a Java Console Window. X'ing that is the fastest way to stop PASOE.

When the instance was created from OEM, you will most likely have to run the DOS box "As Administrator".

Posted by Joe Clay on 23-Jun-2016 09:22

This might be a silly question, but how do you actually deploy your handlers to the server in development? Ordinarily I would just add the project to the server via the Servers tab in Eclipse, but without a service defined in my project this doesn't seem to do a whole lot...

Posted by Mike Fechner on 23-Jun-2016 09:24

I just add my project folders to the PASOE instance’s propath.

Posted by Joe Clay on 23-Jun-2016 09:35

Ah, I think I get it now - so are you completely bypassing using the 'Web App' project type in Eclipse altogether and using the ROOT application?

Posted by Mike Fechner on 23-Jun-2016 09:46

Typically, yes.

Posted by Joe Clay on 23-Jun-2016 09:51

Right, that makes a lot more sense (I spent more time than I'd like to admit trying to figure out how to export a .war file from a project with no services). I'll give that approach a go, thanks again for the help!

This thread is closed