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 ) );
TopicExpressionType topicExprType =
(TopicExpressionType) TopicsTypeWriter.newInstance( TopicsConstants.NSURI_WSTOP_SCHEMA ).toXmlObject( topicExpr,
NotificationProducerPortType.PROP_QNAME_TOPIC );
notifMsgHolder.setTopic( topicExprType );
return notifyDoc;
}