publisher.publish(logMsg);
}
// create & publish publishURl message
{
// create publish URL message
PublishURLDocument pubMsg = PublishURLDocument.Factory.newInstance();
PublishURLDocument.PublishURL pub = pubMsg.addNewPublishURL();
// add timestamp
final Calendar cal = new GregorianCalendar();
cal.setTime(new Date());
pub.setTimestamp(cal);
// add notification source
BaseIDType baseID = BaseIDType.Factory.newInstance();
baseID.setServiceID("http://tempuri.org/test_service");
pub.addNewNotificationSource().set(baseID);
pub.setTitle("Some URL's Title");
pub.setLocation("http://tempuri.org/published_url");
// publish message as XML string
publisher.publish(pubMsg.xmlText());
}
}