NEXUSe2e - comet

General Usage Notes

The purpose of this utility is to provide a simple way to send test messages to your NEXUSe2e instances.

Every parameter has a standard value which is taken from the default partner of a NEXUSe2e installation. These values will be used if the parameter is not delivered by the initial tool invocation. SSL will not work by default it is not enabled out of the box for the default partner - see below for further information.

If given no parameters at all, comet will show the parameter help, hence you will need to provide at least one parameter even if all defaults would work for your installation.

Acknowledgements and Messaging

Reliable Messaging

comet does not support reliable messaging yet and cannot accept acknowledgements NEXUSe2e sends in reply to a test message.

What does this mean for my test?
If reliable messaging is activated, an acknowledgement will be send to the connection configured for the used partner. In case of default partner "Xioma" it will be send to http://localhost:8080/NEXUSe2e by default. Be careful while testing with a custom partner configuration. NEXUSe2e could send an acknowledgement - generated by a message from comet - to a live or test system to the used partner.

Be careful while testing with an existing partner configured by your own, NEXUSe2e could send an acknowledgement - generated by a message from comet - to a live or test system to the used partner.

If you send test messages to a NEXUSe2e with reliable messaging enabled you'll find following log entries in your transaction log or tomcat log files.

These log entries are from a Tomcat with NEXUSe2e deployed.
    The message comet has send was successfully received by NEXUSe2e:

[INFO ] 2014-10-20 13:23:39,148 org.nexuse2e.messaging.FrontendInboundDispatcher.processMessage( - d7a640e0-189b-40bc-a17b-0a4d0179d6ca/6cf986f3-dd87-4be5-a3fe-8300a29c31cc(GenericFile->SendFile): Received normal (6cf986f3-dd87-4be5-a3fe-8300a29c31cc) from Xioma for GenericFile/SendFile

    NEXUSe2e tries to send an acknowledgement to the connection of the configured partner:

[INFO ] 2014-10-20 13:23:39,220 org.nexuse2e.messaging.FrontendOutboundDispatcher.processMessage( - d7a640e0-189b-40bc-a17b-0a4d0179d6ca/6effb26a-6172-4f85-a8fc-f59496757f84 (GenericFile->SendFile): Sending Acknowledgement message (6effb26a-6172-4f85-a8fc-f59496757f84) to Xioma for GenericFile/SendFile

    The acknowledge couldn't be send because the connection didn't exist or wasn't reachable:

[WARN ] 2014-10-20 13:23:43,239 org.nexuse2e.service.http.HttpSenderService.sendMessage( - d7a640e0-189b-40bc-a17b-0a4d0179d6ca/6effb26a-6172-4f85-a8fc-f59496757f84 (GenericFile->SendFile): Message submission failed: Exception: Connection refused: connect Connection refused: connect

Despite the warning or error messages in the log files, this test was a success as you can see in the first log entry shown. This NEXUSe2e instance was able to receive a message sent by comet.

Success Message from comet

If the message was send successfully - which does not necessarily mean it was processed by NEXUSe2e - it will look like this in your command line:

[DEBUG] 2014-10-20 14:13:13,038 - HTTP/1.1 200 OK

Above this message you'll see the content related information.

Parameter description

-a,--action <Action> (Optional) Set Action Identity. Default: (SendFile)
-c,--choreography <Choreography>                          (Optional) Set Choreography Identity. Default: (GenericFile)
-f,--file <File> (Optional) Path of Payloadfile. comet ships with an internal payload for test purpose.
-h,--help Shows Parameter Description
-ha,--handler [ebxml20|httpplain] (Optional) Set Handler to use - ebXML2.0 and httpplain are supported. Default: (ebxml20)
-r,--receiver <Receiver> (Optional) Set NEXUSe2e Server Identity. Default: (localhost)
-p,--partner <Partner> (Optional) Set Remote Participant (comet) Identity. Default: (Xioma)
-u,--url <NEXUSe2e Server URL> (Optional) Set Server URL. Default: (http://localhost:8080/NEXUSe2e/)
Parameters especially used for SSL Messaging  
-kp,--keystorepassword <Keystorepassword> (Optional) Password for custom Keystorefile.
-ks,--keystore <Keystore> (Optional) Path to custom Keystorefile.
-tp,--truststorepassword <Truststorepassword> (Optional) Password to custom Truststorefile.
-ts,--truststore <Truststore> (Optional) Path to custom Truststorefile.
-dc,--displaycert (Optional) Will display the servers certificate chain. No Parameter needed.
-pw,--privatepassword Password for private key. Mandatory if custom keystore-file and displaycert is used.

Parameter Example

Provide NEXUSe2e URL only:

java -jar nexuse2e-comet-1.1.jar -u

If there are blanks in the directory path please add quotes to the string:

java -jar nexuse2e-comet-1.1.jar -f "c:\temp files\message.txt"

All important message parameters:

java -jar nexuse2e-comet-1.1.jar -p ExamplePartner -c genericChoreo -a sendAction -u http:\\\ExampleNEXUSe2e\ -ha ebxml20 -f c:\temp\message.txt

SSL Messaging

If you want to test SSL messaging with the default certificates you need to import the nexuse2e_comet_public.cer for the partner in your NEXUSe2e instance
that you want to test with. You should also add the nexuse2e_server.jks to your Tomcat configuration file and enable a SSL connector.
The keystores will be loaded in comet despite using SSL or not, so you do not need any additional parameter. These inbuilt certificates are only meant for a rough test or playing around with the function.

To use your own keystore/truststore make sure they are delivered as jks format to comet.

Tomcat Server Config example for SSL Connector:

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
               clientAuth="true" sslProtocol="TLS"
               keystorePass="nexuse2e" keystoreType="jks"
               truststoreType="JKS" truststorePass="nexuse2e"

Show Server Certificate Chain

If you want to verify the certification chain of your NEXUSe2e Tomcat server you can use comets -dc "displaycert" parameter. This parameter does not require an argument but needs the additional parameter -pw "Privatepassword" in case you use your own keystore-file.


java -jar nexuse2e-comet1.1.jar -u -ks "c:\myKestore.jks" -kp "myKestorePassword" -dc -pw "PrivateCertPassword"