Technical Articles
SOAP web service using SAP Cloud Connector with SAP Cloud Platform
Optimizing your business with embedded intelligence, extending your processes with guided outcomes, or break new ground with open innovation by leveraging intelligent technologies Like SAP Cloud Platform, SAP Web IDE and SAP UI5 to transform processes and business models to deliver the outcomes that you and your customers need.
As one of the requirement now a days are to scaling up/expose your on premise legacy server and use it as it is sitting on the internet. It is somehow not feasible for one organization to migrate to new server in short span of time.
To address the above requirement, this time I have tried to expose on premise server with SOAP web service that is widely used in different SAP modules (like SAP MII, SAP PI, SAP ABAP and many more) along with SAP Cloud Connector, SAP Cloud Platform, SAP Web IDE and SAP UI5.
Please note that I have not explained SAP Cloud Connector, SAP Cloud Platform, SAP Web IDE and SAP UI5 in this blog as these are already explained in my previous blog.
REST web service using SAP Cloud Connector, SAP Cloud Platform, SAP web IDE and SAP UI5.
Below is the architecture of application.
Application Architecture:
Image: Cloud Connector Architecture
Below is brief explanation of the newly added components in this architecture.
On Premise Server: in this application, Java server is used as on premise server. In real time scenario, any other legacy server (SAP ABAP, SAP HANA, SAP NW as java) as well as 3rd party server can replace this java server. On this server, One SOAP web service application is running.
SOAP Web Service: SOAP stands for Simple Object Access Protocol. It is XML-based protocol for accessing web services. It is platform and language independent.
In industry, SOAP consider more secure than other web services as we can add extra security header in SOAP for authentication.
SOAP is a format for sending and receiving messages. By using SOAP, we can interact with other programming language applications.
SOAPUI Testing Tool: For Testing SOAP web services and generating request and response out of the WSDL (Web Service Definition Language) created by the application we use SOAPUI tool.
For more knowledge of SOAPUI tool, please follow the below link:
https://www.soapui.org/soap-and-wsdl/getting-started.html
SAP Cloud Platform Configuration:
Image: Destination Configuration in SAP Cloud Platform
Sample UI Form: Sample UI form is desinged in SAP Web IDE using SAP UI5.
Image: Sample UI Form
Add Name Using SOAP request:
Image: Add name button pressed
Request Payload:
Server Response:
Request/Response Header in Developer tools (Chrome):
Get All Names Button pressed:
Image: Get All Names button pressed
Request Payload:
Server Response:
Request/Response Header in developer tools:
That is all from my side. Hope you have enjoyed this blog while reading. If you have any comments, Query or suggestion please write those down in the comment section. Till then….
Happy Reading ??
Hi Ankit,
thank you for sharing this interesting concept with us.
Can you please give an example of how you make the call to the SOAP service inside the controller of your SAPUI5 app.
Thank you,
Todor
Hi Todor,
That is really a nice question. I will explain it what I tried for calling this web service in controller
You can find plenty of example on internet how you can call webservice using jQuery.
You can use this link as reference.
https://stackoverflow.com/questions/12796941/how-to-call-soap-ws-from-javascript-jquery
Hi Ankit,
First of all, great blog. Second, I've some question because I've to mount a similar scenario.
1. In your wsdl, the service URL aim to Cloud Connector virtual host or On Premise?
2. Where did you consume the wsdl? Via url, xml file, or didn't you use it?
Kind regards!
Lucas
Hi Lucas,
Thanks for the feedback. For your questions, I will try to answer them one by one…
Question: In your wsdl, the service URL aim to Cloud Connector virtual host or On Premise,
Answer: it aims to the destination configured in the SAP Cloud Platform that is virtual host defined in the SAP cloud connector.
Question: Where did you consume the wsdl?
Answer: we don’t consume the whole wsdl in application. We make request and response from the wsdl using the different tools like SOAPUI. But sometimes servers already create the request for the user. That request (generated out of the wsdl) is used to call the different methods in the application to process the data accordingly.
If you see request payload in the application, I have highlighted the method names. That already defined what function needs to be called by the request.
Question: Via URL, xml file, or didn’t you use it?
Answer: I have used the wsdl endpoint URL to consume the wsdl methods.
Let me know if this helps.
Regards,
Ankit Gupta
Hello Ankit,
Have you tried async SOAP service integration in SCP?
Regards,
Allen
Hi Allen,
This application was developed to send the sync SOAP request over the internet.
But i like the idea of sending the async SOAP request.
So can i borrow your suggestion and try it?
Regards,
Ankit Gupta
Hi Ankit,
Informative documents . Keep it up.
Regards,
Vivek
Hi Vivek,
Thanks for your feedback.
Regards,
Ankit Gupta