changes.mady.by.user Mike Fechner
Saved on Jun 04, 2016
Saved on Jun 20, 2016
WebHandler configuration from the openedge.properties file:
[smartpas.ROOT.WEB] adapterEnabled=1 defaultCookieDomain= defaultCookiePath= defaultHandler=OpenEdge.Web.CompatibilityHandler handler1=Consultingwerk.OERA.JsdoGenericService.WebHandler.CatalogWebHandler: /Catalog/{EntityName} handler2=Consultingwerk.OERA.JsdoGenericService.WebHandler.CountWebHandler: /Resource/{EntityName}/count handler3=Consultingwerk.OERA.JsdoGenericService.WebHandler.ResourceSubmitWebHandler: /Resource/{EntityName}/SubmitData handler4=Consultingwerk.OERA.JsdoGenericService.WebHandler.InvokeMethodWebHandler: /Resource/{EntityName}/{MethodName} handler4handler5=Consultingwerk.OERA.JsdoGenericService.WebHandler.ResourceWebHandler: /Resource/{EntityName} srvrAppMode=development srvrDebug=1 wsRoot=/static/webspeed
Settings from .restapplicationsettings file:
{ "RestServiceName": "web", "RestServiceAddress": "\/Resource", }
Samples based on CustomerBusinessEntity:
http://localhost:8820/web/Catalog/Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity
http://localhost:8820/web/Resource/Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity/count?filter=
http://localhost:8820/web/Resource/Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity
Content-Type = application/json
{ "dsCustomer": { "prods:hasChanges": true, "eCustomer": [ { "prods:id": "eCustomer147712", "prods:rowState": "created", "CustNum": 0, "Country": "GER", "Name": "Marko Rüterbories", "Address": "Unter Käster 1-3", "Address2": "", "City": "Köln", "State": "NRW", "PostalCode": "50667", "Contact": "Me", "Phone": "+49 (160) 7008229", "SalesRep": "BBB", "CreditLimit": 100999, "Balance": 0.0, "Terms": "Net30", "Discount": 45, "Comments": "This customer is on credit hold.", "Fax": "", "EmailAddress": "marko.rueterbories@consultingwerk.de", "Flags": "C", "SmartRecordKey": "", "SmartAttachments": true, "SmartComments": false, "SmartCopiedFrom": "", "id": "1", "seq": 1 } ], "prods:before": { "eCustomer": [ { "prods:id": "eCustomer147712", "prods:rowState": "created", "CustNum": 0, "Country": "", "Name": "", "Address": "", "Address2": "", "City": "", "State": "", "PostalCode": "", "Contact": "", "Phone": "", "SalesRep": "", "CreditLimit": 0.0, "Balance": 0, "Terms": "", "Discount": 0, "Comments": "", "Fax": "", "EmailAddress": "", "Flags": "", "SmartRecordKey": "", "SmartAttachments": true, "SmartComments": false, "SmartCopiedFrom": "", "id": "1", "seq": 1 } ] } } }
http://localhost:8820/web/Resource/Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity/TestMethodMobile42
{ "plcParameter" : { "SerializedType": "Consultingwerk.CharacterHolder", "Value": "" } }
Configuration
WebHandler configuration from the openedge.properties file:
Settings from .restapplicationsettings file:
Sample requests
Samples based on CustomerBusinessEntity:
Retrieving the Catalog
http://localhost:8820/web/Catalog/Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity
GetCount of Customers where SalesRep = "BBB"
http://localhost:8820/web/Resource/Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity/count?filter=
{"ablFilter": "salesrep EQ 'BBB'"}CRUD operation for Customer
http://localhost:8820/web/Resource/Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity
Header:
Content-Type = application/json
Body:
InvokeMethod of CustomerBusinessEntity
http://localhost:8820/web/Resource/Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity/TestMethodMobile42
Header:
Content-Type = application/json
Body: