apex5.0, call webservice to populate data in form - oracle-apex-5

Is there a way in apex5.0, to call a webservice and output the details in a form.
webservice
input parameter : employee_no
output
employee_name
employee_address
employee_phn
employee_hire_date
And the fields in the form should be populated when the employee no is entered.
Any idea.. how to do that?

Add Web Service References from Shared Components --> Data References. APEX engine can use Web Service References to access a Web service across the network.
Also, check out APEX_WEB_SERVICE API. It enables you to integrate other systems with APEX by allowing you to interact with Web services anywhere you can use PL/SQL in your application. The API contains procedures and functions to call both SOAP and RESTful style Web services.
Link to documentation --> https://docs.oracle.com/database/121/AEAPI/apex_web_service.htm#AEAPI537
There is pre-built packaged application that is shipped with APEX 5, it is called "Sample REST Services" which showcases how to access external REST services from Oracle Application Express pages

Related

Is there official documentation on the `appian.self` service user?

Appian Service Account Users are defined and used inside Appian to identify e.g. process models started by calls from a given API if you are designing web APIs within Appian.
On top of that, there are usually other service accounts in an Appian installation like deployment.daemon (used by deployment processes) and appian.self. I am after the latter one. Is there an official definition for the tasks and purpose of appian.self ?

What replaces Session variables in Blazor Web Assembly?

So in a .Net web forms project, I would simply use session variables to be able to set and get them across different pages. What is the proper way to do that in Blazor Web Assembly (with core hosting) ? i.e a user logs in, things like their ID, email, first name, etc are stored and then needed to be accessed in other pages.
in a .Net web forms project, I would simply use session variables
Your Wasm app is a regular C# app so you can use most normal storage mechanisms. I would stay away from static but you can use your own SessionStateService. Just a bunch of properties. Inject it as a singleton or use it as a Cascading value.
But ye old Session data was stored server-side. That means there is a subtle difference with Blazor wasm solutions as soon as the user opens a second tab with the same app. Every tab runs its own instance of the app so your data will be local to that tab. There is no sharing.
When you do want to share between tabs, use JavaScripts localstorage (persisted) or create an endpoint on your API server (persistance is up to you).
things like their ID, email, first name
Those should preferably be stored as claims in a JWT. Especially when you want to base some (serverside) authorization or logic on those values.
You use a Scoped DI service to maintain state, and inject it into any components that need to use or add/update the information.
See Ms Docs - https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/dependency-injection?view=aspnetcore-6.0

Should you have a separate database for managing users in .net core API microservice?

I am trying to design a simple microservice application. In a large application where application screens are shown to user based on roles.
Is it a good idea to design a separate user database and create user service to authenticate users.
System Details:
Lets say I have 2 microservices designed in .net core 3.1
Product Service and Orders Service.
Authentication of requests will be managed by API gateway-Ocelot service. User service will be generating token and passing it on to front end who will call my gateway- ocelot which will call Product and Orders service.
I am just focusing on user database for this question scope. Below is what i found so far
Force users to use Azure AD. This way you don't have to manage a separate database
Have user table in both Product and Orders database. This way authorization based on roles will be convenient but here you will be violating microservices concept and duplicating user code.

Fetching client id and client secret of a Salesforce connected app from backend

Is there a way to fetch the client id and client secret of a Salesforce connected app from backend (through any apex code or anything) without using the UI? I am actually working on Salesforce API automation so need to fetch these in runtime and store in string variables to use them in the API request headers.
You could use Metadata API to retrieve details of connected app(s). Sample XML you'd get is at the bottom of https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_connectedapp.htm
I don't think there's a pure Apex solution, you might have some luck with this Apex wrapper for the callouts: https://github.com/financialforcedev/apex-mdapi
If you're after automation you might want to look into creating connected apps on the fly? https://help.salesforce.com/articleView?id=remoteaccess_oidc_dynamic_client_reg_flow.htm&type=5

Two DomainContext or data sources with WCF RIA - Silverlight page

I am writting a Silverlight Business Application with WCF RIA link.
I have 2 databases on same SQL server, Public and Private.
The Public database contains a table which is mostly for public access level, like "user" table which has basic user information
The Private database contains a table which has "private" information, user bank transactions etc
I created 2 ADO.Net entity models, one each for Private and Public database and selected the tables.
I also created 2 different domain context services
On on Silverlight page, I need to get information from the tables that are across 2 databases, Private and Public as described above.
How do I achieve this? I am thinking of some kind of a wrapper that internally gets data from domain services.
Whats the best approach?
You can simply just create two, or more domain services classes in your web application and (rebuild) they will be available in the Silverlight application.
There are a few restrictions, you can't have the same table in two different domain services classes. You can't use two domain services from two separate web applications the domain services must exist in the same web application which you chose for the WCF RIA link.
Hope this helps.
Rich