Integrate SuccessFactors and S4HANA using S4 SDK - sap-cloud-platform

Currently we are referring https://blogs.sap.com/2017/05/10/first-steps-with-sap-s4hana-cloud-sdk/ blogs for our side by side extensibility use cases.
We are trying to create a scenario for Building a side by side extensibility application to integrate successfactor and S/4 hana system using S4 SDK.
We couldn't find any blogs, sample code implementation to integrate successfactors and hana system.We found the below relevant blog.
https://github.com/SAP/cloud-s4-sdk-examples/tree/master/Employee-Browser-Neo
But we couldn't understand the detailed scenario and output of this GitHub sample code.
It would be great if someone help us with blogs/urls/code.

currently, there is no dedicated material for SuccessFactors. However, I recommend the following blog post:
https://blogs.sap.com/2018/04/30/deep-dive-10-with-sap-s4hana-cloud-sdk-generating-java-vdm-for-s4hana-custom-odata-service/
It describes how to generate the virtual data model for a custom OData service.
You can use the same approach to connect to SuccessFactors.
As input for the generator, you would use the metadata file provided by SuccessFactors. You can for example access the $metadata path of the OData service.
Afterwards, can can use the generated Java classes to access the SuccessFactors API.
To connect to SuccessFactors, create a destination for your SuccessFactors system, e.g. called SuccessFactorsODataEndpoint. That works locally as environment variable or in the destination service on SAP Cloud Platform as explained here: https://blogs.sap.com/2017/05/21/step-4-with-sap-s4hana-cloud-sdk-calling-an-odata-service/
In the execute method in the virtual data model you can define which destination to use:
.execute(new ErpConfigContext("SuccessFactorsODataEndpoint"))

Related

Want to use swaggerCodeGen or OpenApi clients to create Java Clients for thirdparty Rest APIs from bill.com or quickbooks. How to?

Trying to figure how to use Codegens like Swagger or OpenAPI to quickly generate client code for Bill.com, Quickbooks or other third party APIs which I wish to conume to create my app. Most help with creating API first wherein I host the API and publish the client code as well. But how do I generate clients for 3rd party APIs
Wish to have tools that help me generate a YAML or utilities that can give YAML from the URIs I wish to consume. Then create the COdeGen to create the entire documentation and API testing or integration client stub.

MarkLogic Customized REST API Creation without Gradle or Roxy Framework

I want to create a brand new REST API using MarkLogic 9.x.x but without using Roxy or Gradle. I want to point to a file which has list of customized endpoints in basic MarkLogic setup and then keep my customized logic in those modules.
I've gone through the REST API documentation to create one by using CURL so that we can use default APIs provided by MarkLogic.
Any detailed explanation is appreciated.
Management REST api is really your best friend here, it is designed for this purpose. However, creating scripts that make the appropriate REST calls can be cumbersome. ml-gradle can support you with that though. It can generate a shell-script with all curl-statements for you, which you could run as-is, or use as starting point to build out your own set of deploy scripts. For details see:
https://github.com/marklogic-community/ml-gradle/wiki/Generating-a-shell-script
HTH!
Have you considered using XQRS ?, you can create custom REST endpoints with ease using intuitive Function Annotations much like one would do with JAX-RS or Java Spring REST Services. It can be installed and used with or with-out Gradle.
You can keep your custom logic either in these REST functions, or you could write your custom logic in JavaScript code that you then import/invoke from these functions. XQRS provides you with total flexibility. You can make beautiful REST APIs with Human-Friendly URLs that sit directly on MarkLogic, taking complete control of the URL Path. It's solid as a rock and unit tested to death. It scales with MarkLogic - i.e. you add more MarkLogic e-nodes and you automatically scale your REST servers, it's totally free and open source. The project is actively maintained and support is available on GitHub. If you've got a Swagger/OpenAPI interface file, you can generate a MarkLogic Stub too which could save you a lot of time.
Functions simply become available as REST Services based on the Annotations you place on them - and you can pass query/form parameters, cookies and the request body via the Annotations. Check out this snippet for a sample flavour.
declare
%rest:path("/factory/warehouse/wheel/{$wheel-id}")
%rest:GET
function get-wheel($wheel-id as xs:string) {
fn:doc($wheel-id)
};
declare
%rest:path("/factory/warehouse/wheel/{$wheel-id}")
%rest:PUT("{$doc}")
%xdmp:update
function put-wheel($wheel-id as xs:string, $doc as document-node(element())) {
xdmp:document-insert($wheel-id, $doc, map:entry("collections", "wheels"))
};
declare
%rest:path("/factory/warehouse/wheel")
function list-wheels() {
<wheels>{
fn:collection("wheels")
}</wheels>
};
Both responses to date are correct and accurate and help, however the original question is self-answered.
I've gone through the REST API documentation to create one by using
CURL so that we can use default APIs provided by MarkLogic.
That is in fact the answer to your question as stated.
To manually deploy ML rest API, please follow below steps
Create Module DB
Create App Server
Provide details for Module DB, database, port, URL rewriter
Deploy xquery, xsl using qConsole
let URI = path of file
let path = xdmp:document-get($FilePath)
xdmp:document-insert($URI,$path,(), ())
where endpoints.xqy will contains defined custom endpoint for your rest API and internally you can call search:search function to call data from MarkLogic
module namespace endpoints="urn:overstory:rest:modules:endpoints";
declare namespace rest="http://marklogic.com/appservices/rest";
(: ---------------------------------------------------------------------- :)
declare private variable $endpoints as element(rest:options) :=
<request uri="^/getcontent$" endpoint="<xqy file" user-params="allow">
<http method="GET"/>
</request>
Hope this will help

Consuming NetSuite SOAP Webservice in .Net Core

I am having a bit of an issue with integrating with NetSuite API on .Net Core using VS2017 and it has no option to add Web Service. When I consumed their web service using add connected services some objects and classes are missing.
In .Net 4.5, the classes and object are available. My manager wants me to write the API in .Net Core.
I took the sample code from NetSuite and the very first thing is class NetSuiteService which has important Passport property for login.
Anyone had a solution to this?
It's fairly easy to integrate SuiteTalk with Dot NetCore, all you need to do is import the WSDL into .NetCore project via adding it as ConnectedService reference and it will set you up with WCF.
The DEMO code that NetSuite people have provided will not match the code generated on your machine. I would recommend you using TBA instead of other authentications.
(just copy paste the code provided by NetSuite's folks for authentication as that is the convention, you can change the crypt algorithm if you want to, just generate the Keys, put them in your configs and you're good to go)
Class "NetSuitePortTypeClient" will contain your endpoints for all types of communication to NetSuite web services.
Read the first 50-100 pages of the documentation manual that NetSuite provides for learning the conventions to be used throughout your journey.
Hope this will give you a headstart.

Working with softlayer instances and images using powershell

I am new to this powershell scripting and also to the IBM's softlayer. Can anyone provide me the exact guide for connecting to the softlayer using powershell scripts and working with them like creating devices, starting and stopping e.t.c.
Neeli, a good point of start is the following https://sldn.softlayer.com/article/Softlayer-API-Overview.
And currently SoftLayer API provides support for SOAP!, XML-RPC or REST protocols.
Besides SoftLayer API can be used many programming language that support the previous mentioned protocols, please review the following link https://sldn.softlayer.com/ to know more about each one of them and all the information about what IBM SoftLayer API provides.
Here you can see an example about how to use powershell and softlayer:
https://softlayer.github.io/tags/powershell/
The example is just performing REST calls to the Softlayer API, so you just need to know how to permor those REST calls.
In documentation you can see how to create a virtual guest or bare metal server using simple Rest calls:
http://sldn.softlayer.com/reference/services/SoftLayer_Hardware_server/createObject
http://sldn.softlayer.com/reference/services/SoftLayer_Hardware_server/createObject
In https://stackoverflow.com/questions/tagged/softlayer you can find many questions about how to use more Softlayer API methods. You just need to know how to do it using REST calls and just write that call to your powershell script.

PowerShell CRUD with WCF Data Services (OData)?

I am trying to perform CRUD against WCF Data Services (OData). The Read portion is pretty well documented across the web… it’s the Create, Update and Delete that I am having trouble with.
As for the documentation, have you looked at odata.org: http://www.odata.org/developers/protocols/operations#CreatingnewEntries
It has a description and samples of all the common CRUD operations against an OData services.
You can also write a sample client application using any OData client (for example the .NET one) and use something like fiddler to see what requests are being made against the service, if you need to see the exact payload shape for your particular service.
You can try this REST PowerShell module that Jaykul wrote.