private XmlObject wrapMessageWithNotify( XmlObject msgXBean,
TopicExpression topicExpr )
{
// TODO (ips, 09/28/05): creation of Notify xbean should be spec-version-sensitive
NotifyDocument notifyDoc = NotifyDocument.Factory.newInstance( );
NotifyDocument.Notify notify = notifyDoc.addNewNotify( );
NotificationMessageHolderType notifMsgHolder = notify.addNewNotificationMessage( );
notifMsgHolder.setMessage( msgXBean );
EndpointReference producerEPR = m_producerResource.getEndpointReference( );
XmlBeansEndpointReference xBeansProducerEPR = ( (XmlBeansEndpointReference) producerEPR );
notifMsgHolder.setProducerReference( (EndpointReferenceType) xBeansProducerEPR.getXmlObject( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) );