PASOE URI questions

Posted by Joey Samoy on 28-Nov-2019 19:34

Hi,

Not sure exactly how to frame my issue, but here goes trying:

Created a service "EDI", with handler "EDIHandler", and service "EDISvc", with URI "web/EDI". 

If I enter just http://localhost:8080/web/EDI/ the handler responds with the default response. At this time, anything after /EDI/, is just ignored. 

I'm looking to be able to submit a GET with URI like this

    web/EDI/Invoices 

    web/EDI/PurchaseOrders

And code it so that, /Invoices returns, well, invoices. Kind of entertaining the idea of parsing the URL (poRequest:PathInfo), but that would be messy.

Been googling, and could see URI samples like this:

    web/EmployeeSvc/Employees

So, looks like service name and resource (ie Employees, not sure what is called) is one to one. Given that, does it mean, construct it like this?:

    web/InvoiceSvc/Invoices 

    web/PurchaseOrderSvc/PurchaseOrders

** Note, app is deployed as root.

( Hopefully, I made sense here... )

TIA!

OE12.0 Classroom Edition

Posted by Peter Judge on 02-Dec-2019 14:08

You can use any HTTP URL after the /web/ segment . The convention we use is typically "<noun>Svc" butyou can named them anything (HTTP-legal).
 
Currently the  web transport does not enforce/require a service name (unlike services using the rest transport), though I would suggest that you use the first path segment after the transport (/web/) as a service name.  This service name is/will be used for packaging.
 
 
 

All Replies

Posted by Peter Judge on 02-Dec-2019 14:08

You can use any HTTP URL after the /web/ segment . The convention we use is typically "<noun>Svc" butyou can named them anything (HTTP-legal).
 
Currently the  web transport does not enforce/require a service name (unlike services using the rest transport), though I would suggest that you use the first path segment after the transport (/web/) as a service name.  This service name is/will be used for packaging.
 
 
 

This thread is closed