Friday
Dec012006
The “Partnership” in Hermes

Let's talk about "Partnership", one of the term you should know well in using Hermes.
After finishing this episode, you will know on how to create a partnership and can deliver messages to my testing server.
So, what is partnership?
Take an analogy, when you go to order a pizza, the waiter will ask you a couple of questions. What is your favorite topping? What size do you want? Do you want extra cheese?
Right, partnership is your decision on how the messages should be transmitted.
Partnership is an "agreement", in between you and the people who gonna receive your message (let's call them a "partner"). This "agreement" defines on how the message will be sent, e.g. should the partner reply with a note upon receiving a message.
In the Hermes 2 packages, you can find execution script called "partnership.sh" (or partnership.bat), the script will invoke a java class that helps to create the partnership. The program gather the partnership values from the xml file, which can be found from the "data" directory.
The XML file contains all the major configuration that you can find from the message specification, and the default value are configured to create partnership for loopback test. You should be able to spot the meaning of each of them by the name of each element and configure the partnership as desired.
Thus, to create the partnership, all you need to do is,
One thing to note is, the script will assume the username and password for the database to be those defined in the installation guide. If not, you will need to change the value in the file "conf/partnership.module.core.xml"
So, you might want to talk to someone else other than yourself. Don't worry, I have setup a testing server. But PLEASE be gentle, don't try to stress test my server. :D
Visit this page and look for the message id you get in the previous step.
Found it? Congratulation, you have sent your first ebms message over the internet.
What you can do next is to play around with the rest of the setting, like enabling the receive of acknowledgement, setup your own pair of server and try to exchange messages (make sure the partnership setting aligns between the server).
Once you are familiar with this, you can go live to exchange electronic messages with your business partner. Have fun!
After finishing this episode, you will know on how to create a partnership and can deliver messages to my testing server.
A large Hawaii pizza with extra cheese, please!
So, what is partnership?
Take an analogy, when you go to order a pizza, the waiter will ask you a couple of questions. What is your favorite topping? What size do you want? Do you want extra cheese?
Right, partnership is your decision on how the messages should be transmitted.
Partnership is an "agreement", in between you and the people who gonna receive your message (let's call them a "partner"). This "agreement" defines on how the message will be sent, e.g. should the partner reply with a note upon receiving a message.
Ok, how could I place my order?
In the Hermes 2 packages, you can find execution script called "partnership.sh" (or partnership.bat), the script will invoke a java class that helps to create the partnership. The program gather the partnership values from the xml file, which can be found from the "data" directory.
The XML file contains all the major configuration that you can find from the message specification, and the default value are configured to create partnership for loopback test. You should be able to spot the meaning of each of them by the name of each element and configure the partnership as desired.
Thus, to create the partnership, all you need to do is,
- Modify the xml file, e.g. if you want to create a partnership to send ebms message, you should edit the file "ebms.xml"
- Execute the batch script "sh partnership.sh ebms -a data/ebms.xml"
One thing to note is, the script will assume the username and password for the database to be those defined in the installation guide. If not, you will need to change the value in the file "conf/partnership.module.core.xml"
Who else can take my order?
So, you might want to talk to someone else other than yourself. Don't worry, I have setup a testing server. But PLEASE be gentle, don't try to stress test my server. :D
- Open "data/ebms.xml"
- Modify the following line from
<transportEndpoint>
http://127.0.0.1:8080/corvus/httpd/ebms/inbound
</transportEndpoint>
to
<transportEndpoint>
http://images.vsmile.com:8080/corvus/httpd/ebms/inbound
</transportEndpoint> - Execute the shell script,
sh loopback.sh ebms - All should goes well like in the loopback test, mark down the message id for the next step.
How would I know if my order has been placed?
Visit this page and look for the message id you get in the previous step.
Found it? Congratulation, you have sent your first ebms message over the internet.
What you can do next is to play around with the rest of the setting, like enabling the receive of acknowledgement, setup your own pair of server and try to exchange messages (make sure the partnership setting aligns between the server).
Once you are familiar with this, you can go live to exchange electronic messages with your business partner. Have fun!


in
XML

Reader Comments (18)
Hello,
you know as the ebmail is also used? I need urgent aid
Thank you very much.
What kind of aid do you need for ebMail? I have used it before with Hermes 1 but no experience in using it with Hermes 2. Maybe you can describe the issue you are encountering in details and see if I can help. BTW, you are aware that there is a mailing list for ebMail?
I am using hermes2 and ebmail 1.1 me podrias to pass msh.properties.xml that you used? I send messages affluent but not as I can take them with the Hermes and command postgresql,some guide of user who explains an example well? pardon by the English I am Spanish, thank you very much.
alberto_lopez_gonzalez@hotmail.com
it also tell me that direction is the one of the BTW mailing list?
ebmail use SMTP/POP to deliver ebXML messages, but it is disabled in Hermes 2 by default. You will need to enable the support by changing the setting from the XML files stored inside the folder plugins/hk.hku.cecid.ebms
Also, you can find the ebmail project from sourceforge.
http://sourceforge.net/projects/ebmail
Good luck!
ebmail project from sourceforge I have it unloaded, but that archives I must change? there isn`t folder that is called plugins/hk.hku.cecid.ebms
If you are following the installation guide for Hermes 2, the "plugins" folder should be located under "C:/corvus/plugins". From there, you should be able to locate the folder "hk.hku.cecid.ebms".
I imagine that it must change just ebms.properties.xml, I see that you know much of this subject, there is some guide of user or some example in which I can find out better ?
Yes, you should only need to change the ebms.properties.xml. But does it solve the problem you are facing?
I am sorry that the documentation is only available through the consultancy service which you can find the details from our website.
yo pienso que voy a tener que cambiar tambien los DAO*.xml
you have thought to remove to a guide from ebmail and hermes2? it is very important for my
Hi,
Just wondering if you knew the default port that Hermes 2 listens on? i.e. if i was sending an ebXML message on my local machine were should I address it to. Or another way of putting it what is the endpoint address for Hermes/corvus
Thanks
Gary
The port to send to depends on your application server. Say, if you are using tomcat, the listening port will be 8080.
And the endpoint address for each protocol will be different but all falls into the pattern as
For instance, the endpoint in receiving ebMS message for my server is,
http://images.vsmile.com:8080/corvus/httpd/ebms/inbound
hi Ronnie,
I performed steps you have listed but when i had serched for my message at you site it gives me "No message Found"
My message id is : 20070309-041034-60906@192.168.1.104
Please reply
I've just checked the log and find an error message as below.
2007-03-09 05:08:11 [-Processor19]
hk.hku.cecid.piazza.commons.soap.SOAPFaultException: Invalid SOAP message: Absent Content-Type
Are you using the library provided in the original package?
I have changed nothing, I have just changed
http://127.0.0.1:8080/corvus/httpd/ebms/inbound
to
http://images.vsmile.com:8080/corvus/httpd/ebms/inbound
in data/ebms.xml file,as you have told. No other change.
yes, i am using the same library the original package has provide,
i am getting this error in my ebms.log file :
2007-03-09 05:13:46 [-Processor25]
2007-03-09 05:13:46 [-Processor25]
2007-03-09 05:13:47 [-Processor25]
2007-03-09 05:13:47 [-Processor25]
2007-03-09 05:13:50 [Thread-38 ]
2007-03-09 05:14:47 [-Processor24]
2007-03-09 05:19:17 [Thread-38 ]
hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send HTTP SOAP request
by java.io.IOException
by java.net.SocketTimeoutException: Read timed out
at hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:108)
at hk.hku.cecid.ebms.spa.task.OutboxTask.sendMsgByHttp(OutboxTask.java:304)
at hk.hku.cecid.ebms.spa.task.OutboxTask.execute(OutboxTask.java:194)
at hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.IOException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:602)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:272)
at hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:90)
... 4 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:760)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:711)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:635)
at hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:87)
... 4 more
2007-03-09 05:19:17 [Thread-38 ]
2007-03-09 05:19:17 [Thread-38 ]
hk.hku.cecid.ebms.spa.task.MessageValidationException: Cannot reconstruct the message 20070309-051346-68700@192.168.1.104 from repository
by java.lang.NullPointerException
at hk.hku.cecid.ebms.spa.handler.EbxmlMessageDAOConvertor.getEbxmlMessage(EbxmlMessageDAOConvertor.java:368)
at hk.hku.cecid.ebms.spa.task.OutboxTask.generateErrorMessage(OutboxTask.java:491)
at hk.hku.cecid.ebms.spa.task.OutboxTask.execute(OutboxTask.java:215)
at hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NullPointerException
at java.io.ByteArrayInputStream.(ByteArrayInputStream.java:89)
at hk.hku.cecid.ebms.spa.handler.EbxmlMessageDAOConvertor.getEbxmlMessage(EbxmlMessageDAOConvertor.java:362)
... 4 more
2007-03-09 05:19:17 [Thread-38 ]
2007-03-09 05:19:17 [Thread-38 ]
java.util.NoSuchElementException
at java.util.AbstractList$Itr.next(AbstractList.java:426)
at hk.hku.cecid.ebms.spa.handler.SignalMessageGenerator.generateResponseMessageBySender(SignalMessageGenerator.java:142)
at hk.hku.cecid.ebms.spa.handler.SignalMessageGenerator.generateErrorMessageBySender(SignalMessageGenerator.java:301)
at hk.hku.cecid.ebms.spa.task.OutboxTask.generateErrorMessage(OutboxTask.java:519)
at hk.hku.cecid.ebms.spa.task.OutboxTask.execute(OutboxTask.java:215)
at hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90)
at java.lang.Thread.run(Thread.java:534)
2007-03-09 05:19:47 [Thread-38 ]
hk.hku.cecid.ebms.spa.task.MessageValidationException: Cannot reconstruct the message 20070309-051346-68700@192.168.1.104 from repository
by java.lang.NullPointerException
at hk.hku.cecid.ebms.spa.handler.EbxmlMessageDAOConvertor.getEbxmlMessage(EbxmlMessageDAOConvertor.java:368)
at hk.hku.cecid.ebms.spa.task.OutboxTask.execute(OutboxTask.java:144)
at hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NullPointerException
at java.io.ByteArrayInputStream.(ByteArrayInputStream.java:89)
at hk.hku.cecid.ebms.spa.handler.EbxmlMessageDAOConvertor.getEbxmlMessage(EbxmlMessageDAOConvertor.java:362)
... 3 more
maybe my tomcat has died. I have it restarted and can you try again?
It's working !!!
Now i see my message at your site. :-)
Thanks. Very useful blog. Thank you Ronnie.