{
try
{
// append message correlation headers
AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(
EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
);
requestProps.setMessageID(AddressingClientUtil.createMessageID());
setRequestProperties((BindingProvider) eventSourcePort, requestProps);
// subscription
Subscribe request = new Subscribe();
DeliveryType delivery = getDefaultDelivery();
request.setDelivery(delivery);
request.setEndTo(delivery.getNotifyTo());
request.setFilter(getDefaultFilter());
//request.setExpires(new Date());
SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
assertNotNull(subscribeResponse);
AddressingProperties responseProps = getResponseProperties((BindingProvider)eventSourcePort);
assertEquals(EventingConstants.SUBSCRIBE_RESPONSE_ACTION, responseProps.getAction().getURI().toString());
return subscribeResponse;
}
catch (Exception e)
{