Invoking an integration service from Linux

View and download documents on various topics e.g. Configuring Ebase Xi under different environmental setups

Moderators: Jon, Steve, Ian, Dave

Jon Moore
Ebase User
Posts: 9
Joined: Thu Dec 29, 2011 9:43 pm

Invoking an integration service from Linux

#1

Postby Jon Moore » Fri Jan 04, 2013 10:59 am

Just a quick note. I wanted to kick off some processing in Ebase from a Linux server (i) from a shell script, and (ii) with minimal need to deploy software to the server for the purpose. So no ebasetrigger scripts, etc.

The simplest solution I found depends on curl, which seems to be standard in most Linux distributions, and invokes a SOAP web service. It looks something like:

Code: Select all

WS_URL='http://localhost:3030/ufs/cxf/MY_FORM'
...
REQUEST=`tempfile`
RESPONSE=`tempfile`
cat > $REQUEST << EOT
<xml>
<soap>
     <soap>
           <message>
                <item>
                     <data1>$DATA1</data1>
                     <data2>$DATA2</data2>
                </item>
           </message>
     </soap>
</soap>
EOT
curl \
     -H "Content-Type&#58; text/xml;charset=utf-8" \
     -H "SOAPAction&#58;" \
     -d @$REQUEST \
     -X POST "$WS_URL" \
     > $RESPONSE
(Note: previewing this, the forum seems to remove the namespaces and prefixes from the above XML, but the principle should be obvious - I just copied the sample XML produced in the Xi designer for testing the web service and stuck in some shell variables where appropriate.)

Of course, depending on where the DATA1 and DATA2 variables come from, they may need to be XML encoded (untested):

Code: Select all

sed "s/\&/\&amp;/;s/>/\&gt;/;s/</\&lt;/;s/'/\&apos;/"
Also, I should apparently have provided a SOAPAction corresponding to the Integration Resource operation name, but I have only one operation (and it's the default), so maybe that doesn't matter.
0 x

Steve
Moderator
Moderator
Posts: 414
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#2

Postby Steve » Tue Jan 15, 2013 9:22 am

Hi Jon,

Thanks for the message. I have never tried this before from a shell script. It is an interesting idea for batch processing :D

The SOAP action, this is only required when there is more than one operation for the web service (Integration Service), as this is used as a routing mechanism to make sure the correct operation (Integration Resource) is invoked.

Kind regards

Steve
0 x

cathleenwitmer
Ebase User
Posts: 1
Joined: Thu Feb 19, 2015 3:38 am

#3

Postby cathleenwitmer » Sat Apr 11, 2015 4:42 am

Configure the Web Server to Redirect Requests to an Exact Destination (IIS 7)
0 x


Who is online

Users browsing this forum: No registered users and 3 guests