[Bots Open Source EDI Translator] Communication Software

2,799 views
Skip to first unread message

Akhilesh Kumar

unread,
Jan 7, 2012, 1:39:13 PM1/7/12
to bots...@googlegroups.com
Hello Henk Jan,

We are looking to use our own communication tool. Just wanted to check upto what extent Bots can do the communication to send and receive the files without using any third party tool via ftp / http/ https/ VAN/ AS2 / any other? Do we have any plugin etc for this?

Any help in this would be appreciated.

Thanks,
Akhilesh

BikeMike

unread,
Jan 7, 2012, 6:48:55 PM1/7/12
to Bots Open Source EDI Translator
Hi Akhilesh,
Bots does have a number of communication methods, including ftp. But
http/https/AS2 are not directly supported, these could probably be
added using a communicationscript. I have added a simple example to
the wiki that sends bots output directly to a windows printer (we use
this for producing labels on Zebra printers).
http://code.google.com/p/bots/wiki/CommunicationScriptsExample

"VAN" is not really a communication method as such, most VANs would
offer various options, and we use ftp to connect with with several
VANs here in Australia and New Zealand. If the VAN requires that you
use a specific client program, again you can probably script calls to
that program.

Kind Regards,
Mike

Akhilesh Kumar

unread,
Jan 10, 2012, 1:14:27 PM1/10/12
to bots...@googlegroups.com
Hi Mike,

I was able to test ftp, that's cool.

Could you please guide me how to handle the sftp connection. One of our client is using sftp.

As always, appreciate your quick responses.

Thanks so much.

Regards,
Akhilesh

BikeMike

unread,
Jan 10, 2012, 4:34:57 PM1/10/12
to Bots Open Source EDI Translator
Hi Akhilesh
sftp has been added in the latest version of bots (2.1.0).
It is set up the same way as ftp, just select sftp instead as the
channel type.
Also it adds a couple of dependencies to other python libraries,
pycrypto and paramiko, so you need to install those too.

If you can't upgrade to 2.1.0 yet, it could be back-ported to 2.0, the
changes are only in communication.py and models.py. (but I would
recommend upgrading)
http://groups.google.com/group/botsmail/browse_thread/thread/36980d0a25bd6906/55215908a5c7e081?lnk=gst&q=sftp#55215908a5c7e081

Kind Regards,
Mike

Akhilesh Kumar

unread,
Jan 15, 2012, 3:19:09 PM1/15/12
to bots...@googlegroups.com
Hi Mike,

Thanks so much for your guidance.

Next I'm stuck up with AS2 connection. I did see Henk's comments on discussion forum about mendelson AS2 solution. Trying to work with it. However, if you or Henk or anyone can let me know of any other AS2 solution.

Regards,
Akhilesh

Jean-François Van Snick

unread,
Jan 15, 2012, 3:26:26 PM1/15/12
to bots...@googlegroups.com

Hi Akhilesh,
We do work with AS2 Hermes2 from a Hong Kong University (CCEID if I remember well). We're exchanging 6000 messages a day now, both with and without SSL.
I can give you more info about this tool if you're interested . They have a discussion group in Google.
Very easy to setup and configure.

Akhilesh Kumar

unread,
Jan 15, 2012, 3:37:09 PM1/15/12
to bots...@googlegroups.com
Hi Jean,

I really appreciate this group... So quick responses from all directions. 
Please do send me the details. All solutions are welcome, then we will see which one suits best for us.

Thanks so much.

Regards,
Akhilesh

Jean-François

unread,
Jan 15, 2012, 3:54:47 PM1/15/12
to Bots Open Source EDI Translator
Akhilesh,

CECID and not CCEID :-). Anywat, here are the links:

Link for Hermes2 Google Group:

http://groups.google.com/group/cecid-hermes2?hl=en

Link for the tool:

http://www.cecid.hku.hk/hermes.php

Download:

http://community.cecid.hku.hk/index.php/product/download/download_h2o/

Kind regards,
JF

On 15 jan, 21:37, Akhilesh Kumar <k.akhil...@gmail.com> wrote:
> Hi Jean,
>
> I really appreciate this group... So quick responses from all directions.
> Please do send me the details. All solutions are welcome, then we will see
> which one suits best for us.
>
> Thanks so much.
>
> Regards,
> Akhilesh
>
> On Sun, Jan 15, 2012 at 3:26 PM, Jean-François Van Snick <
>
>
>
>
>
>
>
> jf.vansn...@gmail.com> wrote:
> > Hi Akhilesh,
> > We do work with AS2 Hermes2 from a Hong Kong University (CCEID if I
> > remember well). We're exchanging 6000 messages a day now, both with and
> > without SSL.
> > I can give you more info about this tool if you're interested . They have
> > a discussion group in Google.
> > Very easy to setup and configure.
> > Le 15 janv. 2012 21:19, "Akhilesh Kumar" <k.akhil...@gmail.com> a écrit :
>
> > Hi Mike,
>
> >> Thanks so much for your guidance.
>
> >> Next I'm stuck up with AS2 connection. I did see Henk's comments on
> >> discussion forum about mendelson AS2 solution. Trying to work with it.
> >> However, if you or Henk or anyone can let me know of any other AS2 solution.
>
> >> Regards,
> >> Akhilesh
>
> >> On Tue, Jan 10, 2012 at 4:34 PM, BikeMike <mjg1...@gmail.com> wrote:
>
> >>> Hi  Akhilesh
> >>> sftp has been added in the latest version of bots (2.1.0).
> >>> It is set up the same way as ftp, just select sftp instead as the
> >>> channel type.
> >>> Also it adds a couple of dependencies to other python libraries,
> >>> pycrypto and paramiko, so you need to install those too.
>
> >>> If you can't upgrade to 2.1.0 yet, it could be back-ported to 2.0, the
> >>> changes are only in communication.py and models.py. (but I would
> >>> recommend upgrading)
>
> >>>http://groups.google.com/group/botsmail/browse_thread/thread/36980d0a...
>
> >>> Kind Regards,
> >>> Mike

Akhilesh Kumar

unread,
Jan 16, 2012, 11:09:59 AM1/16/12
to bots...@googlegroups.com
Thanks JF.

Since AS2 is not in Bots channel configuration, how do I integrate Bots with any of these AS2 solutions. How will the file from Bots  be sent and received on AS2.

Regards,
Akhilesh

Jean-François

unread,
Jan 16, 2012, 11:30:25 AM1/16/12
to Bots Open Source EDI Translator
Akhilesh,

I'm using CommunicationScripts in Bots. Gathering all information
needed from within the message to be sent (sender/receiver/...) and
composing a name.
Then simply putting this file into the "as2-outgoing-repository" of
Hermes2.
We also developed various Python routines based on pyinotify (http://
pyinotify.sourceforge.net/) to route incoming messages from our 2
Hermes2 Servers to the right Bots Server (as we are running 3 servers
in parallel).
Just scanning the as2-incoming-repository, analysing the received file
and transferring to the right Bots server.

In Hermes2, you only need to have a filename composed this way:
"[AS2_ID_Sender].[AS2_ID_Receiver].[FileName].extension" > the message
is sent to the right counterparty.
Reverse, you receive a message with the same filename structure > with
some EDI/XML parsing if necessary > you can route this to the final
Bots destination

Hope this helps.

JF


On 16 jan, 17:09, Akhilesh Kumar <k.akhil...@gmail.com> wrote:
> Thanks JF.
>
> Since AS2 is not in Bots channel configuration, how do I integrate Bots
> with any of these AS2 solutions. How will the file from Bots  be sent and
> received on AS2.
>
> Regards,
> Akhilesh
>

Alex Befu

unread,
Jan 16, 2012, 3:39:49 PM1/16/12
to Bots Open Source EDI Translator
Hi Akhilesh,

We have been working with OpenAS2 in conjunction with OpenSSL for
certificate creation, both are open source and have worked well so
far. Since the projects are open source I was able to edit some of the
java files of OpenAS2 to call the BOTs engine whenever a file was
received and just pointed the infile of bots to the correct file in
OpenAS2. If that is something you would like to look into I could
provide more details as to how I modified the OpenAS2 code to work
with BOTs. (or for anyone else who is interested in OpenAS2)

Kind Regards,
Alex

Akhilesh Kumar

unread,
Jan 16, 2012, 3:50:11 PM1/16/12
to bots...@googlegroups.com
Hi Alex,

If something you claim is working good at your end, I would definitely say yes to it. 
Please shoot me the details. 

I think we will have a collection of some good options for these solutions. 
Later we can have them added to wiki and people can chose whatever suits them.

Thanks,

Regards,
Akhilesh

Akhilesh Kumar

unread,
Jan 17, 2012, 12:18:06 PM1/17/12
to bots...@googlegroups.com
Hi Alex,

Please send me the details. The main thing that I see I'm getting stuck up is the integration with Bots.
Would appreciate yr quick help.

Regards,
Akhilesh

On Mon, Jan 16, 2012 at 3:39 PM, Alex Befu <alex...@gmail.com> wrote:

Akhilesh Kumar

unread,
Jan 19, 2012, 9:38:26 AM1/19/12
to bots...@googlegroups.com
Hi Alex,

Not sure if you got my previous email.
It would be great if you could let me know how did you modify the java files of OpenAS2 for inbound files to be sent to bots and how to install. In fact if you can send the details of complete setup and if possible attach the files, that would be great.

This is what matches my requirements.
Thanks in advance. Waiting for your reply.

Regards,
Akhilesh

On Mon, Jan 16, 2012 at 3:39 PM, Alex Befu <alex...@gmail.com> wrote:

Alex Befu

unread,
Jan 19, 2012, 3:41:16 PM1/19/12
to Bots Open Source EDI Translator
Hi Akhilesh,

Sorry for the late reply, but here it is:
The first thing you need to do is download OpenAS2 here is the link:
http://sourceforge.net/projects/openas2/files/
You need java installed for OpenAS2 to work (I am using Java SE 6
Update 30 with it *JDK not the JRE although I think both work) here is
the link for that:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
So once you have java installed you will need to download the updated
Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction
Policy Files 6 (you can download that from the same link as the Java
SE 6, it is near the bottom of that same page). This comes with a few
files but the important ones that you will need are the
local_policy.jar and the US_export_policy.jar (I believe you need to
be in the United States to legally use these, so I hope you are over
here or this solution may not work for you) Anyways, you need to
replace the local policy and export policy .jar files that came with
your Java SE 6 download. So find where you installed java and navigate
to jre -> lib -> security and replace your old local_policy.jar and
US_export_policy.jar with the ones that you downloaded in the
Unlimited Strength file.

Next you can install OpenAS2 (and by install I just mean unzip because
I believe there is no "installation" necessary)
Now the OpenAS2 wiki has some very brief articles about getting
OpenAS2 working so here is the link to their wiki:
http://sourceforge.net/apps/mediawiki/openas2/index.php?title=Main_Page
At this point after following my previous instructions you will have
just completed step 5 in their "Install HOWTO" guide.

After you have OpenAS2 unzipped you should see 2 files OpenAS2_A and
OpenAS2_B. These two files are sample partners (I thought of it as my
company was OpenAS2_A and my trading partner company was OpenAS2_B) so
you will need to open up both of these files (in 2 separate windows)
and edit both of the start-openas2.bat files to be pointing at your
java installation. Once both folders are pointing at the correct java
installation then you can run the .bat files (so you will run the
start-openas2.bat file in the OpenAS2_A/bin folder and ALSO the
OpenAS2_B/bin folder (because this represents both you and your
partner having your OpenAS2 connections open at the same time) after
running the .bat files you should find that in your OpenAS2_A/config
and B/config folder there are some new files that got created
(toOpenAS2A and toOpenAS2B) so you can test that you have everything
set up correctly by going into your OpenAS2_A/config/toOpenAS2B folder
and putting a test .txt file to see if it gets placed into your
OpenAS2_B/config/inbox folder.

If that was set up correctly and everything went fine then you can
start to edit the OpenAS2 source files. I imported the entire OpenAS2
project into eclipse so that I could rebuild the project into .jar
files after editing them to fit my needs.

This is getting to be extremely long so I will continue my explanation
in a second post in a moment.

-Alex

Akhilesh Kumar

unread,
Jan 19, 2012, 4:01:06 PM1/19/12
to bots...@googlegroups.com
Hi Alex,

Thanks so much for the detailed email. Let me try to follow and do this. 
I will let you know in case I see any issues.

Thank you once again.

Regards,
Akhilesh

Akhilesh Kumar

unread,
Jan 19, 2012, 4:20:01 PM1/19/12
to bots...@googlegroups.com
Yes I'm in US...

Please take a breath before you can send the  remaining part of your email :)

Alex Befu

unread,
Jan 19, 2012, 4:32:08 PM1/19/12
to Bots Open Source EDI Translator
One thing to note about OpenAS2 is that it uses public and private
certificates to encrypt the data being sent, and to allow for easy
testing they packaged a private and public key with OpenAS2 to make it
easier for you, however now that this private key is known by anyone
who downloads OpenAS2 you will need to substitute your own private/
public keystore before you go into production mode with this but as
long as you are just testing in-house then using these keys is fine. I
will explain how to do that once I have explained how to set every
thing else up including the code edits to OpenAS2.

Ok so as you can probably tell, the fact that Bots can refer to files
for input/output is perfect for using OpenAS2 since all you need to do
is have the OpenAS2 server running and then you can just drop files
into the folders for the right partner, and OpenAS2 will detect that a
new file is waiting to be sent and it will automatically send it off
to the corresponding partner.

Before I get into the code editing bits for OpenAS2 I wanted to go
over the reasons for the changes that I did. So first of all I needed
a way for bots to know that a file had been delivered by OpenAS2 to be
processed. So since OpenAS2 is written in java, I found where the code
was handling incoming files and after the file was processed and
verified as being fully delivered, I added in a bit of code that just
launched a console window and ran the bots engine, the reason this is
so easy is because as long as the route on bots is active, then by
running the engine it will automatically check for available files to
run and process them. But this lead to another problem, bots will run
any file that it finds in the correct directory as long as it fits the
correct file name as described when setting up the bots "channels". To
solve this I had to have the bots route delete the file once it was
processed, but then if bots deleted the file, then there would be no
archive of that file and there wouldn't be a way to check for errors
or mistakes after bots ran the file. So I added another bit of code
into OpenAS2 that changed how the file was stored. My code allowed the
file to be saved correctly in the index folder, but then the code will
create an archive file and place a copy of the received file in there.
This allowed me to let bots delete the file once it was processed (the
in folder to the bots "Channel" was set to be the inbox folder, NOT
the archive folder, as these files should not be looked at/touched by
bots) and also keep a copy for later reference. OK so now onto the
actual code bits.

The first edit was to org/openas2/processor/receiver/
AS2ReceiverHandler.java in the public void handle(NetModule owner,
Socket s) { ... } function. (line 61 in my code)
at the end of this function, after these lines (148 - 153):

} catch (DispositionException de) {
sendMDN(s, msg, de.getDisposition(), de.getText());
getModule().handleError(msg, de);
} catch (OpenAS2Exception oae) {
getModule().handleError(msg, oae);
}

I added my code block that will invoke the bots engine after the file
is received (lines 155 -171) :

try
{
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("cmd /c F:\\Python27\\Scripts\
\bots-engine.py");
InputStream stderr = proc.getErrorStream();
InputStreamReader isr = new InputStreamReader(stderr);
BufferedReader br = new BufferedReader(isr);
String line = null;
System.out.println("<ERROR>");
while ( (line = br.readLine()) != null)
System.out.println(line);
System.out.println("</ERROR>");
int exitVal = proc.waitFor();
System.out.println("Process exitValue: " + exitVal);
} catch (Throwable t) {
t.printStackTrace();
}

Of course you will need to change the F:\\Python27\\Scripts\\bots-
engine.py to the path of your bots-engine.py.

The second code edit that I made to allow an archive file was in org/
openas2/processor/storage/MessageFileModule.java in the function
public void handle(String action, Message msg, Map options) throws
OpenAS2Exception { ... } (starting on line 31)

Right under line 36 (shown below)
logger.info("stored message to " + msgFile.getAbsolutePath()
+msg.getLoggingText());

I added my own code (lines 38-45):
String fileParent = msgFile.getParent();
String childFilename = msgFile.getName();
String archiveString = fileParent + "\\archive\\";
File archiveDirectory = new File(archiveString);
archiveDirectory.mkdirs();
File archiveFile = new File(archiveDirectory,
childFilename);
writeStream(msg.getData().getInputStream(), archiveFile);
logger.info("archived message to " +
archiveFile.getAbsolutePath());

Ok so now that the code is edited, try it out for yourself make sure
it still works (you can run bots inside eclipse)

Ok I will stop there and continue in the next post.

~Alex

On Jan 19, 1:01 pm, Akhilesh Kumar <k.akhil...@gmail.com> wrote:
> Hi Alex,
>

Alex Befu

unread,
Jan 19, 2012, 5:18:58 PM1/19/12
to Bots Open Source EDI Translator
So now that you have edited all of the OpenAS2 code to your liking,
you will need to place all of this code in a new .jar file and put
that into your OpenAS2_A and B files. To do this open up a command
window and navigate to eclipse/openAS2(or whatever you named your
eclipse project/target/classes and you should see an org file here if
you type dir in your command line. Here is a link to a guide on making
jar files:
http://docs.oracle.com/javase/tutorial/deployment/jar/build.html

Now make a jar file from the org file and name it OpenAS2.jar and
replace the old OpenAS2.jar file (OpenAS2/OpenAS2_A/lib and also in
OpenAS2_B/lib) with this one, and re-run your start-openAS2.bat file
and make sure everything works and test that when OpenAS2 receives a
file that the bots engine runs also.

Once you have made sure that everything has been changed over to your
new version of OpenAS2 correctly I want to point out that you can
change how OpenAS2 stores your incoming files. Instead of dumping all
of your incoming files into your inbox folder, I changed OpenAS2's
config.xml file to store the incoming files in inbox/sender files
because OpenAS2 knows who the sender of the file is so you can filter
the messages that way. To get this functionality open up OpenAS2_A/
config/config.xml in a text editor, and find the line:
<module classname="org.openas2.processor.storage.MessageFileModule"
filename="%home%\inbox\$msg.sender.as2_id$-$msg.receiver.as2_id$-
$msg.headers.message-id$"
the filename is where the incoming messages will be stored. If you
change the filename to this:
filename="%home%\inbox\$msg.sender.as2_id$\$msg.receiver.as2_id$-
$msg.headers.message-id$"
(notice the "\" between $msg.sender.as2_id$ and $msg.receiver.as2_id$)
now your incoming files will be stored in a subdirectory of inbox so
that you can have all of your files neatly separated by sender.

Now the last thing to do is to download OpenSSL so that you can create
your own security certificates. (since the one you are still using
from OpenAS2 has been compromised due to its public availability) Now
go download OpenSSL from this link:
http://www.openssl.org/source/
(I downloaded the 1.0.0g version marked as latest as of this posting)
Once you download that and un-tar it you will find a file called
INSTALL.w32 open it in a text editor and scroll down to the GNU C
(Cygwin) part and follow those instructions for how to install cygwin
and openssl. Once everything is installed you can follow the
instructions on the OpenAS2 wiki here is a link for you:
http://sourceforge.net/apps/mediawiki/openas2/index.php?title=PKCS12_HOWTO
(these commands will need to be executed in cygwin)
While creating my new certificates I did not enter anything for the
passwords which is relatively secure as long as no one un-authorized
has access to your .p12 file.
Now that PKCS12_HOWTO wiki article seems to have been written out of
order, but need to follow the numbered instructions first to create
your new .p12 file (and other related files) and then you need to
follow the non numbered instructions at the top about replacing the
old .p12 file and editing your config.xml file. If you need any help
let me know and I will try my best to answer your questions.

~Alex
> ...
>
> read more »

BikeMike

unread,
Jan 20, 2012, 12:35:09 AM1/20/12
to Bots Open Source EDI Translator
Looks like this would make a good article for the wiki :-)

Akhilesh Kumar

unread,
Jan 20, 2012, 11:42:13 AM1/20/12
to bots...@googlegroups.com
Hi Alex,

Thanks for so detailed emails on this. Let me follow the steps and get it setup. Once I'm successful I will document this (including my comments, if any) and send it to you for review.

This should be a great help.

Regards,
Akhilesh

Akhilesh Kumar

unread,
Jan 20, 2012, 11:46:44 AM1/20/12
to bots...@googlegroups.com
Hi JF,

You must have seen detailed emails from Alex on AS2 setup. Let me work on that for now and see how good I can work on that.
Thought to ask you, if you could also document similar for your AS2 setup with Hermes2 then that will also be additional documentation to be shared.

Regards,
Akhilesh

Akhilesh Kumar

unread,
Jan 20, 2012, 2:07:33 PM1/20/12
to bots...@googlegroups.com
Hi Alex,

I followed your instructions to download OpenAS2 (I used version OpenAS2_20090910.zip) and installed Java, local_policy.jar etc as mentioned.
But after unzipping OpenAS2 I could not find the 2 files OpenAS2_A and OpenAS2_B directories / files. I did find only one file start-openas2.bat under OpenAS2/bin and I think this is for my company so that I can start AS2 server in my machine.
pointed to java @ "C:\Program Files\Java\jdk1.6.0_30\bin\"java to run .bat file

I created the jar file based on your intructruction after updating the codes and ran the binstart-openas2.bat file but got the following:

C:\Users\nomaniy\workspace\OpenAs2\binstart-openas2.bat
C:\Users\nomaniy\workspace\OpenAs2\binrem !\bin\sh
C:\Users\nomaniy\workspace\OpenAs2\binrem purpose: runs the OpenAS2 application
C:\Users\nomaniy\workspace\OpenAs2\binset JAVA_EXE="C:\Program Files\Java\jdk1.
6.0_30\bin\java"
C:\Users\nomaniy\workspace\OpenAs2\binrem
C:\Users\nomaniy\workspace\OpenAs2\binrem remove -Dorg.apache.commons.logging.L
og=org.openas2.logging.Log if using another logging package
C:\Users\nomaniy\workspace\OpenAs2\binrem
C:\Users\nomaniy\workspace\OpenAs2\bin"C:\Program Files\Java\jdk1.6.0_30\bin\"j
ava -Xms32m -Xmx384m -Dorg.apache.commons.logging.Log=org.openas2.logging.Log -
cp .;..\lib\activation.jar;..\lib\mail.jar;..\lib\bcprov-jdk14-125.jar;..\lib\bc
mail-jdk14-125.jar;..\lib\OpenAS2.jar;..\lib\openas2-lib.jar org.openas2.app.Ope
nAS2Server ..\config\config.xml
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.openas2.app.OpenAS2Server.start(Unknown Source)
at org.openas2.app.OpenAS2Server.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 2 more
OpenAS2 has shut down

C:\Users\nomaniy\workspace\OpenAs2\bin >


Please let me know what went wrong.

Regards,
Akhilesh

Alex Befu

unread,
Jan 20, 2012, 5:31:12 PM1/20/12
to Bots Open Source EDI Translator
It seems you downloaded the previous version of OpenAS2, you specified
OpenAS2_20090910.zip but there is a newer one (that I am currently
using)
here is a link to the most updated one:
http://sourceforge.net/projects/openas2/files/OpenAS2_20100816.zip/download
notice the date seems to be August 16 2010 where as the one you
downloaded was September 10 2009. Try the newest version of bots and
see if that fixes the problem.

On Jan 20, 11:07 am, Akhilesh Kumar <k.akhil...@gmail.com> wrote:
> Hi Alex,
>
> I followed your instructions to download OpenAS2 (I used version
> OpenAS2_20090910.zip) and installed Java, local_policy.jar etc as mentioned.
> But after unzipping OpenAS2 I *could not find* the 2 files OpenAS2_A and
> On Fri, Jan 20, 2012 at 11:42 AM, Akhilesh Kumar <k.akhil...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi Alex,
>
> > Thanks for so detailed emails on this. Let me follow the steps and get it
> > setup. Once I'm successful I will document this (including my comments, if
> > any) and send it to you for review.
>
> > This should be a great help.
>
> > Regards,
> > Akhilesh
>
> >>http://sourceforge.net/apps/mediawiki/openas2/index.php?title=PKCS12_...
> ...
>
> read more »

Alex Befu

unread,
Jan 20, 2012, 5:35:27 PM1/20/12
to Bots Open Source EDI Translator
I do have editing access to the wiki so once I get a bit more time
(and have successfully guided Akhilesh through the process) I will
make a wiki page so that anyone else interested in using bots with an
open source AS2 program will be able to.

~Alex

On Jan 20, 2:31 pm, Alex Befu <alexb...@gmail.com> wrote:
> It seems you downloaded the previous version of OpenAS2, you specified
> OpenAS2_20090910.zip but there is a newer one (that I am currently
> using)
> here is a link to the most updated one:http://sourceforge.net/projects/openas2/files/OpenAS2_20100816.zip/do...
> ...
>
> read more »

Kbsof edi engine WARE

unread,
Jan 20, 2012, 5:46:31 PM1/20/12
to bots...@googlegroups.com
Hello Alex,
 
I am working with Akhilesh to solve the installation problem for openas2 to integrate with BOTS.
I download the latest version as you mentioned, the file is OpenAS2_20100816.zip.
This file is still not showing 
 OpenAS2_A and
 OpenAS2_B directories / files after extracting.
Could you please help us to get the correct zip file?
Thanks,
Yasir

Alex Befu

unread,
Jan 20, 2012, 6:09:48 PM1/20/12
to Bots Open Source EDI Translator
OK it seems that I forgot that I was the one who created the A and B
folders sorry about that it has been a while since I started this
project. So you will have to copy your OpenAS2 folder so that you have
your own OpenAS2_A and _B folders. So you will need to go to this link
from IBM:
http://www.ibm.com/developerworks/websphere/library/techarticles/1101_barrus/1101_barrus.html?ca=drs-#download
And that helps explain how to set up two partners. That link is the
description of how it works, and this link is where you can download
the files they are talking about:
http://www.ibm.com/developerworks/apps/download/index.jsp?contentid=606146&filename=download.zip&method=http&locale=
So now instead of having OpenAS2_A and B you will have my company and
my partner files as described in that article.
On Jan 20, 2:46 pm, Kbsof edi engine WARE <kbsoft...@gmail.com> wrote:
> Hello Alex,
>
> I am working with Akhilesh to solve the installation problem for openas2 to
> integrate with BOTS.
> I download the latest version as you mentioned, the file is *
> OpenAS2_20100816.zip.*
> *This file is still not showing *

Alex Befu

unread,
Jan 20, 2012, 6:16:21 PM1/20/12
to Bots Open Source EDI Translator
Sorry that first link should be this:
http://www.ibm.com/developerworks/websphere/library/techarticles/1101_barrus/1101_barrus.html

On Jan 20, 3:09 pm, Alex Befu <alexb...@gmail.com> wrote:
> OK it seems that I forgot that I was the one who created the A and B
> folders sorry about that it has been a while since I started this
> project. So you will have to copy your OpenAS2 folder so that you have
> your own OpenAS2_A and _B folders. So you will need to go to this link
> from IBM:http://www.ibm.com/developerworks/websphere/library/techarticles/1101...
> And that helps explain how to set up two partners. That link is the
> description of how it works, and this link is where you can download
> the files they are talking about:http://www.ibm.com/developerworks/apps/download/index.jsp?contentid=6...
> ...
>
> read more »

Alex Befu

unread,
Jan 20, 2012, 6:50:57 PM1/20/12
to Bots Open Source EDI Translator
To make this work you need to make sure that you change the .jar file
in /OpenAS2/lib/ from OpenAS2_20100816.jar to openas2-lib.jar to match
the file name specified in the IBM .cmd file. I would suggest getting
one file up and running before you try and get the two partners
sending files to each other. It has been a while since I had to go
through this but I will try and help you as much as I can.

~Alex

On Jan 20, 3:16 pm, Alex Befu <alexb...@gmail.com> wrote:
> Sorry that first link should be this:http://www.ibm.com/developerworks/websphere/library/techarticles/1101...
> ...
>
> read more »

Akhilesh Kumar

unread,
Jan 22, 2012, 2:12:17 PM1/22/12
to bots...@googlegroups.com
Hi Alex,

I made the required changes and was able to run the start-openas2.bat file from OpenAS2_A/bin.
I see that the test.txt file placed in OpenAS2_A\config\toOpenAS2B folder gets picked up but then it gets moved to OpenAS2_A\config\toOpenAS2B\error folder.

Till now I did not run the start-openas2.bat file from OpenAS2_B/bin. Now when I run start-openas2.bat from OpenAS2_B/bin I get errors and finally it says "OpenAS2 has shut down". I'm attaching 2 log files to show what happens when I run  start-openas2.bat file from OpenAS2_A and  OpenAS2_B.

Can you please tell what's going wrong.

Regards,
Akhilesh
OpenAS2_A_Log.txt
OpenAS2_B_Log.txt

Akhilesh Kumar

unread,
Jan 22, 2012, 5:23:47 PM1/22/12
to bots...@googlegroups.com
Hi Alex,

Made a little progress. Looks like there was issue with the JCE files, so I copied them again. I copied the test.txt file in  OpenAS2_A\config\toOpenAS2A folder (instead of OpenAS2_A\config\toOpenAS2B folder) and it gets picked up and I see mdn coming (attached). Also I see the file getting moved to OpenAS2_A\config\inbox\error folder. 

Akhilesh
20120122050812
OpenAS2B-OpenAS2A-_OPENAS2-22012012170802-0500-0740@OpenAS2B_OpenAS2A_

Jean-François Van Snick

unread,
Jan 22, 2012, 5:36:43 PM1/22/12
to bots...@googlegroups.com
Hi Akhilesh,

Ideed, and I'm also very interested by OpenAS2. I'm not sure the Bots group is the best place to talk about satellite AS2 programs, but of course, I'm sure it's really interesting to have one or two good AS2 solutions described, and how they interfere with Bots.

I'll prepare some documents about Hermes2, the way to install & configure it, and the way we are using Hermes with Bots.
As soon as I've some free time :-)

JF

Alex Befu

unread,
Jan 24, 2012, 1:37:20 PM1/24/12
to Bots Open Source EDI Translator
"The message sent to Recipient OpenAS2A on Sun, 22 Jan 2012 17:08:06
-0500 with Subject From OpenAS2B to OpenAS2A has been received, the
EDI Interchange was successfully decrypted and it's integrity was
verified. Authentication of the originator of the message failed."

It seems that the originator of the message failed, and I have a
feeling that may be because the certificates that were provided with
the IBM files has expired possibly. So you could try and create 2 new
sets of keys through openSSL. You will need 2 because you need 1
keystore for OpenAS2_A and one for _B (you will also need the
corresponding public key for each of the two private keys and
keystores that you create).

On Jan 22, 2:36 pm, Jean-François Van Snick <jf.vansn...@gmail.com>
wrote:
> Hi Akhilesh,
>
> Ideed, and I'm also very interested by OpenAS2. I'm not sure the Bots group is the best place to talk about satellite AS2 programs, but of course, I'm sure it's really interesting to have one or two good AS2 solutions described, and how they interfere with Bots.
>
> I'll prepare some documents about Hermes2, the way to install & configure it, and the way we are using Hermes with Bots.
> As soon as I've some free time :-)
>
> JF
>
> On 20 Jan 2012, at 17:46, Akhilesh Kumar wrote:
>
>
>
>
>
>
>
> > Hi JF,
>
> > You must have seen detailed emails from Alex on AS2 setup. Let me work on that for now and see how good I can work on that.
> > Thought to ask you, if you could also document similar for your AS2 setup with Hermes2 then that will also be additional documentation to be shared.
>
> > Regards,
> > Akhilesh
>
> > On Sun, Jan 15, 2012 at 3:26 PM, Jean-François Van Snick <jf.vansn...@gmail.com> wrote:
> > Hi Akhilesh,
> > We do work with AS2 Hermes2 from a Hong Kong University (CCEID if I remember well). We're exchanging 6000 messages a day now, both with and without SSL.
> > I can give you more info about this tool if you're interested . They have a discussion group in Google.
> > Very easy to setup and configure.
>
> > Le 15 janv. 2012 21:19, "Akhilesh Kumar" <k.akhil...@gmail.com> a écrit :
>
> > Hi Mike,
>
> > Thanks so much for your guidance.
>
> > Next I'm stuck up with AS2 connection. I did see Henk's comments on discussion forum about mendelson AS2 solution. Trying to work with it. However, if you or Henk or anyone can let me know of any other AS2 solution.
>
> > Regards,
> > Akhilesh
>
> > On Tue, Jan 10, 2012 at 4:34 PM, BikeMike <mjg1...@gmail.com> wrote:
> > Hi  Akhilesh
> > sftp has been added in the latest version of bots (2.1.0).
> > It is set up the same way as ftp, just select sftp instead as the
> > channel type.
> > Also it adds a couple of dependencies to other python libraries,
> > pycrypto and paramiko, so you need to install those too.
>
> > If you can't upgrade to 2.1.0 yet, it could be back-ported to 2.0, the
> > changes are only in communication.py and models.py. (but I would
> > recommend upgrading)
> >http://groups.google.com/group/botsmail/browse_thread/thread/36980d0a...
>
> > Kind Regards,
> > Mike

Akhilesh Kumar

unread,
Jan 24, 2012, 2:22:54 PM1/24/12
to bots...@googlegroups.com
Hi Alex,

I tried doing the whole setup once again following the instructions given in the ibm site you mentioned. Both myCompany and myPartner servers (standalone.cmd) ran ok. As instructed when I drop (copy) a file in To_myCompany folder under myPartner, the file gets picked up and removed from this folder. However, instead of sending the file to inbox folder under myCompany I get an error log under myCompany\inbox\error folder (file attached). 

Following is what MDN says:

"The message sent to Recipient myCompany on Tue, 24 Jan 2012 13:40:17 -0500 with Subject From myPartner to myCompany has been received, the EDI Interchange was successfully decrypted and it's integrity was verified. Authentication of the originator of the message failed."

I note that the MDN file is under D:\OpenAS2_A\myCompany\mdn\2012\01 folder, should it not be under D:\OpenAS2_A\myPartner\mdn\2012\01 ?

I checked the differences shown on two servers after file transfer I DO NOT see the following that is shown in the ibm website documentation (marked in RED box):

(OpenAS2 with myPartner.xml - sender)
AS2SenderModule: received MDN

(OpenAS2 with myCompany.xml - receiver)
MessageFileModule: stored message

MessageFileModule: stored headers

Can you please help me understand what does this mean and where I may be making mistake.

On the other hand I again tried running the server you mentioned start-openas2.bat from OpenAS2_A/bin (or OpenAS2_B/bin) - it runs fine. But when I try to run another copy of server from OpenAS2_B/bin (or OpenAS2_A/bin) then it throws errors and shuts down:

Java.net.BindException: Address already in use: JVM_Bind
....
....
OpenAS2 has shut down

Looks like there is some small error that is stopping to move ahead.
Any help from you would be appreciated.

Regards,
Akhilesh
20120124014017
myPartner-myCompany-_OPENAS2-24012012134016-0500-1566@myPartner_myCompany_

Akhilesh Kumar

unread,
Jan 24, 2012, 3:04:08 PM1/24/12
to bots...@googlegroups.com
Missed seeing this email from you. Let me work on creating the keys through OpenSSL as per your instructions.
I will get back to you on any update from my side. 

Akhilesh Kumar

unread,
Feb 3, 2012, 5:50:05 PM2/3/12
to bots...@googlegroups.com
Hello Alex,

After several trials now I'm able to make AS2 work locally on my machine. I will document the steps (that I did).
Next step is to integrate it with Bots and then testing with external url.

I will get back on this soon. Thank you for all your help.

Regards,
Akhilesh

Alex Befu

unread,
Feb 10, 2012, 2:49:19 PM2/10/12
to Bots Open Source EDI Translator
Great glad to see you making progress. Once you have it all set up and
point out the steps that were misleading or wrong in my posts I will
go through it all and put this up on the wiki. And I check this group
regularly so feel free to ask questions, I am still here.

Regards,
Alex

On Feb 3, 2:50 pm, Akhilesh Kumar <k.akhil...@gmail.com> wrote:
> Hello Alex,
>
> After several trials now I'm able to make AS2 work locally on my machine. I
> will document the steps (that I did).
> Next step is to integrate it with Bots and then testing with external url.
>
> I will get back on this soon. Thank you for all your help.
>
> Regards,
> Akhilesh
>
> On Tue, Jan 24, 2012 at 3:04 PM, Akhilesh Kumar <k.akhil...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Missed seeing this email from you. Let me work on creating the keys
> > through OpenSSL as per your instructions.
> > I will get back to you on any update from my side.
>
Reply all
Reply to author
Forward
0 new messages