private XmlObject wrapMessageWithNotify( XmlObject msg )
{
NotifyDocument notifyDoc = NotifyDocument.Factory.newInstance( );
NotifyDocument.Notify notify = notifyDoc.addNewNotify( );
NotificationMessageHolderType notifMsgHolder = notify.addNewNotificationMessage( );
notifMsgHolder.setMessage( msg );
EndpointReference producerEPR =
m_subscription.getProducerResource( ).getEndpointReference( );
XmlBeansEndpointReference xBeansProducerEPR = ( (XmlBeansEndpointReference) producerEPR );
notifMsgHolder.setProducerReference( (EndpointReferenceType) xBeansProducerEPR.getXmlObject( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) );
TopicExpressionType topicExpr =
(TopicExpressionType) ( (XmlObjectWrapper) m_subscription.getTopicExpression( ) ).getXmlObject( );
notifMsgHolder.setTopic( topicExpr );
return notifyDoc;
}