Make Web Services more "OutSystems-y"

By Justin James on 22 Sep 2013
Add some metadata to the Web Services created in Service Studio, so that if Entities are used as Records, Service Studio can correctly handle Identifiers instead of treating them as Integers. When you are working with multi-tenancy, you sometimes need to use a Web service to pass an entity around (because the "Exposse Tenant ID" is on in a "management eSpace" but off in the typical use eSpace... so you need a Web Service that does the tenant switch, makes the update, and returns), and it is a huge hassle to populate the imported Structure generated because not all fields appear to be the same type. Make the same change for Currency type.
Good idea.

One way it could be achieved .... detect web service producer has been created by an eSpace on the same outsystems platform, then map/reference to the corresponding outsystems structures.

 


Fernando Sousa24 Oct 2013
I'm not sure if I understood it correclty, but I prefer not to use Entities in Web Service's Input or Ouput parameters.

Although using a structure similar to the entity you already have can sometimes be a pain to maintain, if for some reason you need to change an entity that is used in a web service (adding a new attribute like IsDeleted flag, to be used in soft deletes, for example), you are changing the web service signature.
Justin James24 Oct 2013
Fernando -

Yes, that's true, but we only use SOAP Web Services for internal communications, so this is the desired behavior anyways. For those of use who do it this way, the process should be smoother (or the handling of multi-tenant entities should not care about whether or not each eSpace has the same setting for "Show Tenant Identifier" set, which is why we do this at all).

J.Ja