Hi,
I tried to retrieve the JMS Property using wsContext.getMessageContext().get("org.glassfish.openesb.jms.userproperties.MsgSource"); where MsgSource is the User Property Name.
It is retuning null.But I can see the User Property when the message is available in the JMS queue.
Please find the code snippet below:
package WSDLs;
import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.jws.WebService;
import javax.xml.ws.WebServiceContext;
import org.netbeans.j2ee.wsdl.z_jmsreceive1.jmsreceive.JMSInPortType;
@WebService(serviceName = "JMSInService", portName = "JMSReceive_InPort", endpointInterface = "org.netbeans.j2ee.wsdl.z_jmsreceive1.jmsreceive.JMSInPortType", targetNamespace = "
http://j2ee.netbeans.org/wsdl/Z_JMSReceive1/JMSReceive", wsdlLocation = "META-INF/wsdl/WSJMSReceiver/JMSReceive.wsdl")
@Stateless
public class WSJMSReceiver implements JMSInPortType {
@Resource
WebServiceContext wsContext;
public void jmsInOperation(java.lang.String part1) {
String msgSource = (String) wsContext.getMessageContext().get("org.glassfish.openesb.jms.userproperties.MsgSource");
System.out.println(">>>>>>>> Payload <<<<<"+part1);
System.out.println(">>>>>>>> MsgSource <<<<<"+msgSource);
System.out.println(">>>>>>>>>> Destination <<<<<<"+wsContext.getMessageContext().get("org.glassfish.openesb.jms.inbound.destination"));
}
}
It prints the Destination and MsgSource as null.Appreciate any help in this regard.
Thanks,
Nag
nag_sbyn wrote:
Hi Sujit,
Please let me know how to get webServiceContext and BTW is this applicable for JCAPS6 ?
-Thanks,
Nag
SujitBiswas wrote:
use,
webServiceContext.getMessageContext().get("org.glassfish.openesb.jms.userproperties.ABC"))
, where ABC is the name of the userproperty.
-Sujit
nag_sbyn wrote:
> Hi,
>
> I would like to know how to get JMS User Properties in JavaEE SE in
> Glassfishesb V2 / Jcaps6.
> I tried to create a JMS Binding for Receive and created a JavaEE WebService
> using the JMS binding WSDL but could not find a way to get to the User
> Properties.
>
> Any help is appreciated.
>
> Thanks,
> nag
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@open-esb.dev.java.net
For additional commands, e-mail: users-help@open-esb.dev.java.net