REST and SOAP Web Services Invocation from AEM | Community
Skip to main content
AEM_Forum
Level 10
January 12, 2023
Solved

REST and SOAP Web Services Invocation from AEM

  • January 12, 2023
  • 1 reply
  • 862 views

Hi all,

 

Kindly suggest REST and SOAP Web Services Invocation from AEM Sites code.

I am just looking for 4-5 high level steps for each.

SOAP involves creation of stubs and skeletons correct?

 

Highly appreciate all your responses.

 

Thanks,

Rama.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anmol_Bhardwaj

Hi,

Yes, SOAP will involve stubs & skeleton classes creation irrespective of any integration with AEM.

 

REST:

  • Create an HTTP request with the desired endpoint [Java Servlet in the core folder] and appropriate parameters.
  • Send the request to the server through JS in component clientlibs or any other way.
  • Parse the response from the server.
  • Use the data in the response to update the user interface or perform other actions in the AEM Sites code.

 

SOAP:

  • Create a SOAP message that adheres to the WSDL (Web Services Description Language) of the desired web service.
  • Create stubs and skeletons, which are Java classes that handle the communication with the web service.
  • Use the generated stubs and skeletons in your AEM Sites code to send the SOAP message and receive the response.
  • Parse the response and use the data in your code, similar to how you would with a REST service.

1 reply

Anmol_Bhardwaj
Community Advisor
Anmol_BhardwajCommunity AdvisorAccepted solution
Community Advisor
January 12, 2023

Hi,

Yes, SOAP will involve stubs & skeleton classes creation irrespective of any integration with AEM.

 

REST:

  • Create an HTTP request with the desired endpoint [Java Servlet in the core folder] and appropriate parameters.
  • Send the request to the server through JS in component clientlibs or any other way.
  • Parse the response from the server.
  • Use the data in the response to update the user interface or perform other actions in the AEM Sites code.

 

SOAP:

  • Create a SOAP message that adheres to the WSDL (Web Services Description Language) of the desired web service.
  • Create stubs and skeletons, which are Java classes that handle the communication with the web service.
  • Use the generated stubs and skeletons in your AEM Sites code to send the SOAP message and receive the response.
  • Parse the response and use the data in your code, similar to how you would with a REST service.