Pass http request header parameter in SAP Gateway - odata

I created a oData in the SAP Gateway system and want to read odata from SAP gateway system with passing parameter in the HTTP header.
In the UI debug view I can see my parameter in the "Request Headers"
But the custom parameter "_user" doesn't appear in the SAP gateway system side when I open the debugger view
Can you please give me some hints about this issue? I tried both sap odata model and jQuery to call odata service which is provided by SAP gateway system, but none of them have the custom parameter in the gateway system side. Thank you!

Related

Swagger (SpringDoc) UI requests throught gateway

It seems that when we use Swagger (SpringDoc) UI for the gateway, when a request is sent through it, the request is made directly to the service and not through the gateway. For example, in this example (linked from SpringDoc documentation), the swagger ui address is 158.101.191.70 while the request is being made to 172.17.0.9.
Isn't an important point of using swagger to let API users know what APIs we have and be able to test them? Thus, shouldn't the requests be made through the gateway and not directly? Maybe, they don't even have access to the services directly. Is there a solution?

Blazor Web Assembly connecting to OAuth via Implicit Flow

In my blazor web assembly project, I have to connect to a Web API that doesn't implement OIDC.
I read on the aspnetcore github thet they made the choice to implement only OIDC connections...
I think I have to write a custom implementation of RemoteAuthenticationService and add it via the builder.Services.AddRemoteAuthentication method, but can't understand how to do this.
Reading the current implementation of RemoteAuthenticationService doesn't help.
The only thing I have to do to connect the Web API is to call this URI :
https://<webapi>/oauth/Authorize?client_id=<MyClientId>&state=<State>&scope=read&response_type=token&redirect_uri=<RedirectUri>
The user fill in the form and get redirected in my blazor app via the RedirectUri, having the accessToken in url parameters.
Then I have to add the accessToken in the headers of all Web API Requests, but I found how to do it via AuthorizationMessageHandler.
How can I implement this flow with Blazor Web Assembly ? Do I search in wrong direction ?

OData as API-Gateway in MicroService architect

I want to use OData as API-Gateway. Is it possible? Is there any example of OData that get rest request and use another service instead of entity framework provider?
I have some service that provide data and my services are using deferent type of databases SQL and NO-SQL. I want to use OData as a service provider of my architecture which my clients only see one endpoint and send OData requests then I can manage which service must response the request.
I searched and found there is some way to create custom provider for OData. Is there a way to use OData as API-Gateway?

SAPUI5 OData 401 (Unauthorized) + No Access-Control-Allow-Origin Header

I work in SAP Web IDE to develop an SAPUI5 application which uses OData Service CUAN_IMPORT_SRV.
I start by defining the OData Model this way:
var oModel = new sap.ui.model.odata.v2.ODataModel("https://host:port/sap/opu/odata/sap/CUAN_IMPORT_SRV/", true, "UNAME", "PASSWORD");
Username and Password can access the data and do read + create operations on Hybris Marketing. This is tested with Postman.
However, when I try to test my application with Test Fiori Launchpad, I get this error message when executing the OData call:
Concering this topic, I read some other posts and tried to edit the URL to
proxy/https/host:port/sap/opu/odata/sap/CUAN_IMPORT_SRV/
...but this results in 404 Not Found.
Since I use Chrome as Browser, I disabled web security as I read in other posts. This did not work. That's why I tried this Chrome AddOn. As a result, I got this error log:
What more can I try to solve this issue?
Thank you for any advice!
Tried configuring destination in Cloud Platform:
Web IDE does not allow Cross Origin access.
In order access your ODATA service from Web IDE, you have to use Cloud Connector.
Cloud connector will create a ternel between AP Cloud platform and your ODATA Service Gateway System.
Follow these steps:
https://blogs.sap.com/2014/06/22/how-to-configure-an-external-gw-system-with-sap-river-rde/

WSO2 API Manager WSDL Endpoint

I am trying to Expose a WSDL in WSO2 API Manager, by selecting WSDL Endpoint in the Implementation tab.
And providing the service name and Port respectively.
But while testing the same, from Api Store, the response is 0 - No response body. Also the WSDL is not being invoked.
Please help with this.
I have checked many blogs and videos, but can't find exact solution.
Ex WSDL that I am using is: https://ws.cdyne.com/phoneverify/phoneverify.asmx?wsdl
Used the same wsdl and expose the service using api manager and got the response from the web server. But as per the query posted above you are testing the soap service using api store. There may be mismatch the param you are posting to web service. Therefore use tool like soapUI to test the web service.
User the followings while exposing the SOAP Service
SOAP WSDL - https://ws.cdyne.com/phoneverify/phoneverify.asmx?wsdl
SOAP Endpoint - https://ws.cdyne.com/phoneverify/phoneverify.asmx
Reference -
[1] http://blog.rajkumarr.com/2015/08/how-to-expose-soap-services-as-soap-services-via-wso2-api-manager.html
[2] http://www.vitharana.org/2015/01/soap-web-service-as-rest-api-using-wso2.html
[3] https://docs.wso2.com/display/AM191/Invoke+an+API+using+a+SOAP+Client

Resources