do not the methods getFrom and getTo on the Call interface conform to your requirements?
The To field will give you details of the destination.
The From (or maybe ReplyTo) field will help identify the sender.
you are correct, getFrom and getTo is giving jms queue information, but not the senders information.
************ call.getFrom()>>>>>>>>>JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/simplewsconsumer1_esb/>,
************ call.getTo()>>>>>>>>>JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/simplewsconsumer1_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>,
<wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>....
Like above i am getting JMSEpr information, how can i get the actual senders information?
Are you looking for the userid that was authenticated against the resource in order for them to write to the queue originally?
What is the sender? If the message has come from outside of the ESB (i.e., via a gateway) then the From field is probably not set.
Here sender is a native webservice,
i.e, i am invoking the esb from the webservice running in the same jbossAs 4.2.1.
that code i have written in the webservice is like this:-
// Create the delivery adapter for the target service (cache it)
ServiceInvoker deliveryAdapter = new ServiceInvoker("MySimpleServiceCategory1","SimpleserviceConsumer1");
// Create and populate the request message...
Message requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
// Deliver the request message synchronously - timeout after 20
Message replyMessage = deliveryAdapter.deliverSync(requestMessage, 20000);
and jboss-esb.xml has the following tags:
< service category="MySimpleServiceCategory1" name="SimpleserviceConsumer1" description="Simple Webservice Consumer1" >
< listeners >
< jms-listener name="JMS-ESBListener1"busidref="quickstartEsbChannel1" maxThreads="1" / >
< /service >
Just to be clear: the sender is a vanilla SOAP client? Which SOAP stack?
I am invoking ServiceInvoker to call the esb, and MessageType.JBOSS_XML message format soap stack i am using for serialization and deserialization.
one more query i have is message.getproperties.addPropery() useful for sending senders information,or any other way to send the senders information.
I would like to know a few things I am listing below
1. How did I intercept the messages to/from ESB ? Is it using Custom Filters or Actions?
2. How you captured the sender/receiver application name/details wrt each ESB message interrupted?
It would be of great help if you can help us in this..
The sender address information should be all available in the message header. What other sender information do you want?
You can intercept all messages to, from, and within the ESB using filters.