|
From: Bernd W. <be...@wi...> - 2005-02-09 19:31:10
|
Lucia Melotti wrote: > 1- LoopBack is a client application for Hermes. Is it only for test > installation or can I use it as my client application? I mean, have I > to develop a new client application to exchamnge messages with > another Hermes MSH ? You can use it as some kind of skeleton for a "real" client application if you extend it in some way. To initiate a sending procedure, it may look like this (without error handling): ######################################### // Setting Application Context String cpaID = "CPA_whatever"; String conversationID = "Item_No_128"; String service = "uri:enterprise.com/procurement"; String action = "POTransfer"; ApplicationContext ac = new ApplicationContext(cpaID, conversationID, service, action); String transportType = "HTTP"; // Target-MSH. In my scenario, there are two MSHs on one computer, // at localhost:8080/msh (receiving) and localhost:8081/msh (sending). // The local MSH must be configured in the msh_client.properties String toMshUrl = "http://localhost:8080/msh"; // Registration without listener Request mshReq = new Request(ac, new URL(toMshUrl), null, transportType); // Preparing payload (in this case a sample UBL payload) AttachmentDataSource ads = new AttachmentDataSource( "data/xml/UBL-Order-1.0-Office-Example.xml", "text/xml"); DataHandler dataHandler = new DataHandler(ads); EbxmlMessage message = new EbxmlMessage(); // ebXML MessageHeader MessageHeader header = message.addMessageHeader(); header.addFromPartyId("here.com", "domainname"); //...whatever header.addToPartyId("there.com", "domainname"); header.setCpaId(cpaID); header.setConversationId(conversationID); header.setService(service); header.setAction(action); header.setTimestamp(Utility.toUTCString(new Date())); String messageId = Utility.generateMessageId(new Date(), message); header.setMessageId(messageId); // Attaching payload message.addPayloadContainer(dataHandler, "contentId", "description"); message.saveChanges(); mshReq.sendReliably(message, false); ################################################ > 2- RunMonitor start only a GUI for sending messages (based on > LoopBack) or is an Hermes client application? and can be used aside > from LoopBack? I thought it would have nothing to do with LoopBack. It's rather a GUI for exchanging messages which is also offering some tools for testing different aspects of Hermes functionality (signature handling, attachments and so on). > 3- If two persons dislocated in different positions want exchange > messages, both have to own a client application and the MSH servlet > ?? If each party wants to interact with the other one, then yes. But in a not very realistic scenario where a party doesn't need to react to incoming messages at all (because it just accepts them, storing the messages MSH-internally), it may be enough to set up Application A, MSH A, MSH B. (I skipped question 4 because at the moment I don't remember how the Monitor worked in detail...) > 5- If I send a message to myself it's all good. But Tomcat stdout.log > contains 2 WARN about Database. I use PostrgreSQL. This is the log: > [...] > What can I do?? What's the problem? I just saw two warnings referring to Log4J misconfiguration. But that doesn't affect Hermes as far as its functionality is concerned. Sorry that I cannot help more at the moment, just a little busy. Furthermore, I didn't think about my answers very... intensively ;) In addition to that, I'm probably some kind of "advanced newbie" at maximum as well... Bye and good luck with Hermes Bernd Winter |