can Rest tool can be communicated with SOAP tool?

Manikantahere
Tera Contributor

Lets consider I want to connect ServiceNow with 3rd party where I want to use rest in service now side and soap is 3rd party side can it be done?

1 ACCEPTED SOLUTION

Runjay Patel
Giga Sage

Hi @Manikantahere ,

 

Yes, REST call can communicate with a SOAP , as they are both web service protocols that allow systems to interact over HTTP or other transport mechanisms. However, since REST and SOAP use different standards and formats, some adjustments are necessary for seamless communication.

 

 

How REST and SOAP can communicate:

  1. SOAP over REST:
    - REST tools can send HTTP requests to SOAP endpoints.
    - The REST client must format the HTTP request body as an XML message adhering to the SOAP protocol, including the appropriate SOAP envelope, headers, and body.
  2. Using a Middleware or Gateway:
    - Middleware (like an API gateway or integration platform) can bridge REST and SOAP by translating RESTful JSON requests into SOAP XML requests and vice versa.
    - Tools like MuleSoft, Dell Boomi are commonly used for such translations.
  3. REST-to-SOAP Conversion:
    - A RESTful application can invoke a SOAP service by constructing the appropriate XML payload and sending it to the SOAP service URL.
    - The SOAP service responds with an XML payload, which can be parsed and converted to a REST-friendly format like JSON.
  4. SOAP-to-REST Conversion:
    - SOAP applications can invoke REST services by sending HTTP requests with headers and payloads as per the REST service specifications (usually JSON).
    - The SOAP service can process the RESTful response and wrap it in a SOAP response format.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

View solution in original post

1 REPLY 1

Runjay Patel
Giga Sage

Hi @Manikantahere ,

 

Yes, REST call can communicate with a SOAP , as they are both web service protocols that allow systems to interact over HTTP or other transport mechanisms. However, since REST and SOAP use different standards and formats, some adjustments are necessary for seamless communication.

 

 

How REST and SOAP can communicate:

  1. SOAP over REST:
    - REST tools can send HTTP requests to SOAP endpoints.
    - The REST client must format the HTTP request body as an XML message adhering to the SOAP protocol, including the appropriate SOAP envelope, headers, and body.
  2. Using a Middleware or Gateway:
    - Middleware (like an API gateway or integration platform) can bridge REST and SOAP by translating RESTful JSON requests into SOAP XML requests and vice versa.
    - Tools like MuleSoft, Dell Boomi are commonly used for such translations.
  3. REST-to-SOAP Conversion:
    - A RESTful application can invoke a SOAP service by constructing the appropriate XML payload and sending it to the SOAP service URL.
    - The SOAP service responds with an XML payload, which can be parsed and converted to a REST-friendly format like JSON.
  4. SOAP-to-REST Conversion:
    - SOAP applications can invoke REST services by sending HTTP requests with headers and payloads as per the REST service specifications (usually JSON).
    - The SOAP service can process the RESTful response and wrap it in a SOAP response format.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------