Forum Discussion

Raj's avatar
Raj
New Contributor II
8 years ago

Calling a script in another server from snaplogic?

I would like call a shell script in another server within snaplogic. How can i do it?

Thanks.

3 Replies

  • ptaylor's avatar
    ptaylor
    Employee

    Change HTTP entity from $entity to JSON.stringify($entity).

    • ariana's avatar
      ariana
      New Contributor

      Hi ptaylor, thank you for the addition. Do I need to change any other settings if doing that? I am not getting output still ☹️

      This is the preview I get when I hover over stringify- is that what I would want?

    • ariana's avatar
      ariana
      New Contributor

      Apologies, I started a new snap to try out your method and it was Execute only. Now I am getting an error. I think that is an improvement over nothing, but need to figure it out.

      • ptaylor's avatar
        ptaylor
        Employee

        Ok, the default Snap Execution of Execute Only explains why you weren’t getting any output when validating. Actually, I don’t think the JSON.stringify($entity) is really necessary, since $entity in this context will implicitly convert the input data to a JSON string.

        It looks like the web service you’re invoking needs some authentication, and there are different ways of handling that. Please check the docs for the target web service regarding the required authentication.