Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

REST and SOAP Web Services Invocation from AEM

Avatar

Level 10

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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.