Partnership example

99 views
Skip to first unread message

iland

unread,
May 29, 2006, 1:05:40 PM5/29/06
to Hermes 2.0 Discussion List
Hello everyone,
I was wondering if anyone has an example of a partnership, since I
don't know that well how I have to do that..
thanx a lot
tc iland

Ronnie Kwok

unread,
May 29, 2006, 11:46:35 PM5/29/06
to Hermes 2.0 Discussion List
What kind of example are you looking for? Put it this way, in the
loopback test program, it comes with a java main program to create
partnership according to settings in the XML file. You can find these
XML files inside the "data" folder. The settings are aimed to create
partnership for loopback purpose so you can find the messages are sent
back to itself.

You can change those setting and create your own partnership. If you
want to know more on the meaning of the setting, you might need to
refer to the corresponding messaging specification.

ronnie

iland

unread,
Jun 1, 2006, 11:20:03 AM6/1/06
to Hermes 2.0 Discussion List
Hello Ronnie,
thanx for your reply, once again..The issue is that I don't quite
understand when I need to create a partnership. I've done the
loopbacktest and it's all working fine. In the loopback I didn't create
any partnership, I think because it was sending the msgs to itslef.

Now what I need to do is to send messages from one server to another.
I'm trying to understand thru the source code how the messages are sent
and I understand that the TestSender creates the payload that it will
be attached to the actual message, is this correct? Then I also checked
the EbmsMessageSenderService and these are the steps I think it
follows:

create a partnership
create a ebXML message
add a message header to the ebXML message
generate a messageID and add it to the message header
set the other elements of the message header (cpaID, timestamp,
conversationID, action, service)
get attachments
construct a ebMS request and pass it to the Message Service Handler
listener

is this it to send a message?or am I missing something here?

Another issue I've got is that in order to send msgs to other server,
had to change the ebxml.properties.xml and added the account name of
the email of the sender.. but where do I indicate the recipient of the
message?

is there any site I can check to know more info? I've downloaded
whatever pdf's I've found about it, but there isn't any that gives me a
good insight on it.

Could you give me some help on these issues.
Thanx a lot for the help so far.
take care

iland

Ronnie Kwok

unread,
Jun 2, 2006, 3:18:13 PM6/2/06
to Hermes 2.0 Discussion List
The procedures listed out is pretty close, but it can be simplifed as
like,

1. Create partnership, which acts as like a profile for message
delivery.
2. Construct SOAP message and attach payload as attachment
3. Invoke endpoint of Hermes 2 (i.e. send out the SOAP message u
created in step 2)
4. Receive message id from SOAP response

Something to note, the partnership is like a "profile" you define for
message delivery (both send and receive). It contains the parameter
needed for the particular message format which include the receipient
address.

In the loopback test, it was created in each iteration because we want
to delete everything and have it executed in a clean state.

Thus, to send messages among 2 servers, you will need to setup a
partnership on each side and as long as the recipient address is
defined properly, your messages should be able to send over.

If you need in depth details on Hermes 2, I am afraid you will need to
subscribe the professional service. My advise is, try to send the
simpliest message, i.e. without message signing and acknowledgement.
Which you will have fewer item to bother with.

Good luck!

iland

unread,
Jun 5, 2006, 4:43:29 AM6/5/06
to Hermes 2.0 Discussion List
Hello Ronnie,
thank you a lot for the reply. I will try the steps you have mentioned
and will let you know how it went.
Thank you
iland

iland

unread,
Jun 6, 2006, 9:46:56 AM6/6/06
to Hermes 2.0 Discussion List
Hello,
I've tried to send a message to other server and this is the message
error from ebms.log:

2006-06-06 13:57:52 [Thread-39 ] <ERROR> <cecid.ebms.spa> <Cannot
send the message>
hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send
HTTP SOAP request
by com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize
message
by com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid
Content-Type:text/html. Is this an error message instead of a SOAP
response?
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: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to
internalize message
at
com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:232)
at
com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:43)
at
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:32)
at
hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:101)
... 4 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid
Content-Type:text/html. Is this an error message instead of a SOAP
response?
at
com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:296)
at
com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:146)
... 7 more
2006-06-06 13:57:52 [Thread-39 ] <INFO > <cecid.ebms.spa> <Mark as
failed (Message id: 20060606-1...@194.117.30.202)>
2006-06-06 13:57:52 [Thread-39 ] <INFO > <cecid.ebms.spa> <Generate
delivery failure error message>
2006-06-06 13:57:52 [Thread-39 ] <ERROR> <cecid.ebms.spa> <Error in
outbox task>
hk.hku.cecid.ebms.spa.task.DeliveryException:
hk.hku.cecid.ebms.spa.task.DeliveryException: Cannot send the message
by hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send
HTTP SOAP request
by com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize
message
by com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid
Content-Type:text/html. Is this an error message instead of a SOAP
response?
by hk.hku.cecid.ebms.spa.task.DeliveryException: Cannot send the
message
by hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send
HTTP SOAP request
by com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize
message
by com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid
Content-Type:text/html. Is this an error message instead of a SOAP
response?
at hk.hku.cecid.ebms.spa.task.OutboxTask.execute(OutboxTask.java:221)
at
hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90)
at java.lang.Thread.run(Thread.java:534)

Does anyone know how can I fix this? Thank you
iland

Kenny Base

unread,
Jun 6, 2006, 10:11:38 PM6/6/06
to cecid-...@googlegroups.com
On 6/6/06, iland <ruteseabr...@gmail.com> wrote:

Hello,
I've tried to send a message to other server and this is the message
error from ebms.log:

2006-06-06 13:57:52 [Thread-39   ] <ERROR> <cecid.ebms.spa> <Cannot
send the message>
hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send
HTTP SOAP request
       by com.sun.xml.messaging.saaj.SOAPExceptionImpl : Unable to internalize
message
       by com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid
Content-Type:text/html. Is this an error message instead of a SOAP
response?
       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: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to
internalize message
       at
com.sun.xml.messaging.saaj.soap.MessageImpl .<init>(MessageImpl.java:232)

       at
com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:43)
       at
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage (SOAPMessageFactory1_1Impl.java:32)

       at
hk.hku.cecid.piazza.commons.soap.SOAPHttpConnector.send(SOAPHttpConnector.java:101)
       ... 4 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid
Content-Type:text/html. Is this an error message instead of a SOAP
response?
       at
com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:296)
       at
com.sun.xml.messaging.saaj.soap.MessageImpl .<init>(MessageImpl.java:146)
       at hk.hku.cecid.ebms.spa.task.OutboxTask.execute (OutboxTask.java:221)

       at
hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90)
       at java.lang.Thread.run(Thread.java:534)

Does anyone know how can I fix this? Thank you
iland


 
Hi Ilan,
I've encountered the save problem as your before. This has something to do with your axis library. you may try to update to axis 1.3.  but make to backup your original library just in case this does not work for you. good luck
 

 

iland

unread,
Jun 7, 2006, 10:16:28 AM6/7/06
to Hermes 2.0 Discussion List
Hi Kenny,
Thanks a lot for your answer. I downloaded the axis library v 1.3 and
replaced the jars. But when I did that I came across this error:

- Module 'Corvus Partnership' initialized successfully.
Start sending ebMS loopback test case.
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (404)/ebms/sender
faultActor:
faultNode:
faultDetail:
{}string: return code: 404
&lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/5.0.28 - Error
report&lt;/tit
le&gt;&lt;style&gt;&lt;!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;ba
ckground-color:#525D76;font-size:22px;} H2
{font-family:Tahoma,Arial,sans-serif;
color:white;background-color:#525D76;font-size:16px;} H3
{font-family:Tahoma,Ari
al,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-f
amily:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-famil
y:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:
Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color :
black;}A.name {color : black;}HR {color : #525D76;}--&gt;&lt;/style&gt;
&lt;/hea
d&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 404 -
/ebms/sender&lt;/h1&gt;&lt;HR size=
&quot;1&quot;
noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; St
atus report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt;
&lt;u&gt;/ebms/sender&l
t;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt; &lt;u&gt;The
requested
resource (/ebms/sender) is not available.&lt;/u&gt;&lt;/p&gt;&lt;HR
size=&quot;
1&quot; noshade=&quot;noshade&quot;&gt;&lt;h3&gt;Apache
Tomcat/5.0.28&lt;/h3&gt;
&lt;/body&gt;&lt;/html&gt;

(404)/ebms/sender
at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.j
ava:630)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)

at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at
hk.hku.cecid.edi.ebms.service.EbmsSoapHttpSendStub.request(EbmsSoapHt
tpSendStub.java:110)
at
hk.hku.cecid.corvus.test.EbmsLoopBackTest.send(EbmsLoopBackTest.java:
87)
at
hk.hku.cecid.corvus.test.EbmsLoopBackTest.main(EbmsLoopBackTest.java:
44)

So while I read about the axis library I found that I need to copy the
\axis\webapps\axis content to the webapps folder on the tomcat. I came
across this pdf but I'm not sure if this is what I need to do to stop
getting those SOAP exceptions.

http://ws.apache.org/axis/java/install.pdf
Did you have to follow these steps mentioned in the pdf or you just
replaced the jars? Thanks a lot for your help
iland

iland

unread,
Jun 7, 2006, 12:23:48 PM6/7/06
to Hermes 2.0 Discussion List
Hello again,

it really doesn't seem to be working when I replace the axis library
with that version, unless I'm not including it in the right place. So I
was wondering where did you include those jars?
Without replacing those jars the tom cat does work, but when I try to
send a message to the other server this message still shows up in the
ebms.log:

hk.hku.cecid.piazza.commons.net.ConnectionException: Unable to send
HTTP SOAP request

by java.net.ConnectException: Connection timed out: connect
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.net.ConnectException: Connection timed out: connect

etc..
Thank you
iland

Kenny Base

unread,
Jun 7, 2006, 9:01:36 PM6/7/06
to cecid-...@googlegroups.com
Hi Iland,
 
Below is the list of jar files on my client apps library (c:\apps\lib) as downloaded from cecid. Maybe to can compare them with what you have. try to compare the file size and date. On my tomcat, i just used the defualt Library.  Using j2sdk1.4.2_10.
 
11/11/2005  03:48 PM           110,360 activation.jar
11/11/2005  03:48 PM         1,235,721 axis.jar
03/31/2006  09:47 AM           112,869 bcmail-jdk13-115.jar
11/11/2005  03:48 PM           114,417 bcmail-jdk14-125.jar
11/11/2005  03:48 PM           936,631 bcprov-jdk14-125.jar
11/11/2005  03:48 PM           559,366 commons-collections-3.1.jar
11/11/2005  03:48 PM           107,631 commons-dbcp-1.2.1.jar
11/11/2005  03:48 PM            71,442 commons-discovery.jar
11/11/2005  03:48 PM            38,015 commons-logging.jar
11/11/2005  03:48 PM            42,492 commons-pool-1.2.jar
11/11/2005  03:48 PM            83,485 corvus-as2-core.jar
11/11/2005  03:48 PM           101,597 corvus-ebms-core.jar
11/11/2005  03:48 PM            65,665 corvus-loopback-test.jar
11/11/2005  03:48 PM           486,522 dom4j-1.4.jar
11/11/2005  03:48 PM            35,759 jaxrpc.jar
11/11/2005  03:48 PM           352,668 log4j-1.2.8.jar
11/11/2005  03:48 PM           347,137 mail.jar
11/11/2005  03:48 PM           197,772 piazza-commons.jar
11/11/2005  03:48 PM           358,427 postgresql-8.0-313.jdbc3.jar
11/11/2005  03:48 PM            35,799 saaj-api.jar
11/11/2005  03:48 PM           382,026 saaj-impl.jar
11/11/2005  03:48 PM            18,501 saaj.jar
11/11/2005  03:48 PM            23,563 saxpath.jar
11/11/2005  03:48 PM           113,853 wsdl4j.jar
11/11/2005  03:48 PM         7,615,865 xalan.jar
11/11/2005  03:48 PM         3,263,291 xercesImpl.jar
11/11/2005  03:48 PM           124,724 xmlParserAPIs.jar
11/11/2005  03:48 PM           363,304 xmlsec.jar
 
I forgot to tell you that I did used the Axis 1.3 when I recompile the loopback test as "Dynamic Web Project" on Eclipse IDE 3.1. I used the above library when i recompile the loopback as J2EE application.
 
Hope this help.
 


 
org.apache.axis.client.AxisClient.invoke (AxisClient.java:180)

Ronnie Kwok

unread,
Jun 11, 2006, 11:57:47 PM6/11/06
to Hermes 2.0 Discussion List
I am just curious on how you define the target endpoint of the
recipient, besides, are you writing your own client or using the
loopback test?

FYI, the target end point of the recipient should be something like
http://<ip>/corvus/httpd/ebms/inbound.

Reply all
Reply to author
Forward
0 new messages