How to call Soap webservice in Sap Cloud Sdk for javacript project - sap-cloud-sdk

As the title mentioned, do I have any way to call soap service in a SAP Cloud SDK for JavaScript project?
In the feature matrix at sap.github.io as the picture shows, SOAP is not supported in the Cloud SDK for JavaScript. Is there a way to call a SOAP webservice in this scenario?

The SAP Cloud SDK for JavaScript doesn't support SOAP and there are no plans for it. As you can see from the feature matrix we suggest using node-soap. Another option would be switching to Java where we provide full SOAP support.
The SOAP is infrequently requested for the JS ecosystem. That's the reason the SDK can't allocate resources there.

Related

Issue while accessing SAP S/4HANA Cloud API using SDK or Rest OData

I am trying to consume the SAP S/4HANA APIs from outside SAP (Postman or Java)
I found a couple of options to access it
Using Cloud SDK
Using Rest OData endpoints
https://api.sap.com/package/SAPS4HANACloud
I observed that we can use the Cloud SDK only for the application which is deployed in SAP BTP Cloud foundry.
For Rest OData endpoints, couldn't figure out the settings for authentication for Production URL for SAP S/4HANA Cloud instance
Does anyone know if we can use the Cloud SDK or REST OData endpoints externally from local machine or from Postman?
Note: I am trying these things using a Trial account.
Disclaimer: I'm one of the developers working in the SAP Cloud SDK.
The SAP Cloud SDK for Java is a Java library for developing cloud native applications mostly within the SAP ecosystem.
As such, it is of course very important to ensure that applications can be tested in different environments (e.g. CI/CD pipelines, and also local developer machines).
Hence, the SAP Cloud SDK can be used to connect to remote cloud services from the local machine.
Please note that the SAP Cloud SDK must be included into a Java application, which then needs to be executed - it cannot be run standalone and also has nothing to do with Postman (although it also provides a REST client).
To get started with the SAP Cloud SDK, you may want to have a look at this tutorial: https://developers.sap.com/group.s4sdk-cloud-foundry.html.
It explains how to easily create a new Java application that includes the SAP Cloud SDK and how to consume an OData SAP cloud service from the SAP API Business Hub. The tutorial even explains how to get all of this working with a trial service and from your local machine!

Azure Function to Receive SOAP Requests

We have a legacy SOAP webservice that is called by multiple clients.
We'd like to host a copy of the service in Azure PAAS. There should be no changes required from the clients, other than a change to the URL they call.
API Management is not an option at present. I looked into creating a custom logic app connector and got as far as consuming the WSDL but then received an error message stating that one-way operations are not supported.
What are the alternatives? Are there any example of achieving this using an HTTP Triggered Azure Function?
Assuming you're creating a new implementation for the service contract, the right way to do this is with a .NET Framework WCF service hosted in Azure App Service.
Azure Functions are .NET Core and .NET Core doesn't have an official WCF service implementation, and Azure Functions doesn't help you in any way to create SOAP endpoints. So it would actually be much harder than using an Asp.Net project with first-class WCF tooling in Visual Studio.
svcutil.exe can generate the code to implement the service from the wsdl.

SDK Support for Document Service

I would like to connect the Document Service from Java (Spring Boot application deployed in SAP BTP Cloud Foundry environment with multitenancy) and I am wondering about the intended way to connect the document service in a multitenant szenario.
Does SAP cloud sdk helps with connectivity?
If we're talking about consuming the service on the SAP Business Technology platform - then yes. Check the multi-tenancy docs.
The SAP Cloud SDK is a framework for consuming services and usually not the best choice for publishing them. You can use it as a proxy or data adapter, of course, if that's what you need.
For service publishing with multi-tenancy, I'd recommend looking into the direction of the Cloud Application Programming model (CAP)
Are you building OData, OpenAPI or generic REST enabled service? The SAP Cloud SDK can help to consume your service with multi-tenancy out of the box using our OData or OpenAPI code generators and type-safe clients. You can also use the SDK for testing. Please, check the details in our docs.
I'd also recommend checking if the service you're building already exists or you can adapt some other service with help of the SDK.

Google Cloud Endpoints client library NodeJS

We have a Google Cloud Endpoints backend written in java. We generate the client library to use in other Java applications with the command
gradlew endpointsClientLibs
Is it possible to generate a NodeJS client library from the same Java backend. We winsh to write some of out applications in NodeJS
This is not currently possible. We (the Endpoints team) are aware that users would like more client language options.
I use Google's Discovery API to generate a client library which is based on the open API spec file in Python for my cloud endpoints api. I assume the same can be done for node.js.
Google's node.js Client Library - https://github.com/googleapis/google-api-nodejs-client#google-apis
Google's Discovery API - https://developers.google.com/discovery/v1/using

How to use JSON instead of XML in Acumatica Web Services

I understand that Acumatica Web services uses XML and SOAP, but our project requires JSON format to and fro integrating with a Ruby-based web service. How can we use JSON?
In 6.0 version (coming soon) will be added rest interface to web service API. You should wait.

Resources