Forum Discussion

shaqirah's avatar
shaqirah
New Contributor II
4 years ago

How to expose pipeline as an interface for external client to call?

Hi, I have requirement to create a simple SOAP web service in snaplogic designer and expose the pipeline to external (eg:- Postman).
Which Snaps that I can use in the pipeline in order to receive the value from Postman?
Any suggestion or sample pipeline that I can use is appreciated.

Thanks in advance

8 Replies

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:cus="urn:ws.solvedirect.com/webservices/custom"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <SOAP-ENV:Body>
            <HelloWorldReq>
                <FileName>TestFile</FileName>
                <Status>Fail</Status>
            </HelloWorldReq>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    
  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    @shaqirah

    You can expose the pipeline as a REST API by creating a triggered task. Please refer to the documentation:
    https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/993296413/Creating+Triggered+Tasks

    Simplest way, in order to receive and check what request is sent from Postman, the pipeline can only have one snap Record Replay, which will store the request into the SLDB in the same place/project where pipeline is created.

    See the attached sample pipeline:

    SP_2022_01_25.slp (2.2 KB)

    Regards,
    Spiro Taleski

  • shaqirah's avatar
    shaqirah
    New Contributor II

    After creating the task, I able to expose the pipeline for external call.
    Currently external is sending XML payload, is there any Snaps that can be use in order to receive the payload and payload can be read for further process?

    Thanks in advance

      • shaqirah's avatar
        shaqirah
        New Contributor II

        Below is the XML payload from external

        Is there any way to pass the value of these two element which is Filename and Status to the below response?

        Not sure how take input and pass to the response payload.

        Thanks in advance for your kind assistance.

    • shaqirah's avatar
      shaqirah
      New Contributor II

      @Spiro_Taleski May I know how the structure of the XML payload looks like? I have tested the sample pipeline, but getting error.