Forum Discussion

Vishnu24's avatar
Vishnu24
New Contributor
8 years ago

SOAP webservice

Can anyone please tell me how we can create a SOAP web service in snaplogic designer and expose the integration pipeline which we have created to an external applications

Thanks in advance 🙂

5 Replies

  • mbowen's avatar
    mbowen
    Employee

    @PulseAmit

    The account is optional for the REST POST snap which is probably why the wizard doesn’t prompt for it.

    An expression library may help us here. The thinking is that we’ll define the REST account, Service URL, X API key, and whatever other common properties in this library (ex: env.expr)

    You’ll see an Expression Library section in the pipeline parameters dialog. That’s where we’ll attach the expression lib.

    We can then reference these expressions in the snap. Specifically, we can update the REST POST snap Service URL, HTTP Header, and Account reference to refer to these expressions.

    As long as the relative path-ing to the expression library is the same across environments (orgs), I think this will work.

    This is new to me too, so others who have deep kung-fu with this, please don’t hesitate to chime in. Here’s a link to our documentation of this:

    https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438110/Expression+Libraries

    Thank you for creating a Support ticket for this. That actually will ensure more support cycles are devoted to this issue. Community has a weaker SLA.

    I should be able to prepare an example later today, tomorrow for sure (Wed, 8/18).

    • mbowen's avatar
      mbowen
      Employee

      @PulseAmit

      Below is my experiment with expression libraries which seems hopeful. Honestly though, this seems a pretty common problem, and maybe our support team can reach out to other teams which have experience migrating assets from one org to another. There must be some canned solutions out there. I haven’t tried using the migration pipeline in the article I linked to, but that seems pretty helpful too.

      Here is my project structure:

      Organization: PROD
      
        + ProjectSpace1
          + shared
              basic-auth-rest-account1 (REST Basic Auth Account)
      
          + conf
              env.expr
      
          + Project1
              rest post pipeline
      
      Organization: DEV
      
        + ProjectSpaceDev
          + shared
              (no REST account defined)
      
          + conf
              env.expr
      
          + ProjectDev
              rest post pipeline
      

      Here are the definitions of the expression libs (env.expr)

      PROD (env.expr):
        {
          "serviceUrl": "http://127.0.0.1:8001/prod",
      
          "accounts": {
            "RestAccount": x => "../shared/basic-auth-rest-account1"
          }
        }
      
      DEV (env.expr):
        {
          "serviceUrl": "http://127.0.0.1:8001/test",
      
          "accounts": {
            "RestAccount": x => ""
          }
        }
      

      Pipeline is just a single REST POST snap defining the Service URL and Account Reference via expressions. Observe how the expression library is attached in the pipeline parameters dialog with an alias (“env”). The PROD lib defines a REST account whereas DEV doesn’t, but it could.

      With this configuration, I was able to export/import my pipeline from one org to another, and have it run in the target org using the expression values for that environment/organization.

      The cool thing is that I didn’t have to modify the REST POST snap. However, you can see the configuration is somewhat fragile and depends on common configuration patterns (ex: relative pathing, etc). I’m not sure of your organization project workspace structure, but maybe you can leverage some of this with other community inputs, plus help from support.