if ( body.getSubscribe( ).getDelivery( ).getMode( ) != null )
{
delivery = new java.net.URI( body.getSubscribe( ).getDelivery( ).getMode( ) );
}
Subscription subscription = sH.create( filter, expires, delivery );
subscription.setNotificationConsumer( new ForwardConsumer( notifyto ) );
subscription.setSubscriptionEndConsumer( new ForwardEndConsumer( endto ) );
//check if topic expression
// if(filter instanceof TopicFilter == true){
// Collection collection = evaluateTopicExpression((TopicFilter)filter);
// SimpleSubscriptionTopicListener simpleSubscriptionTopicListener = new SimpleSubscriptionTopicListener(subscription);
//add listeners
// for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
// Topic topic = (Topic) iterator.next();
// topic.addTopicListener(simpleSubscriptionTopicListener);
// }
// }
//build response
SubscribeResponseDocument responseDom =
SubscribeResponseDocument.Factory.newInstance( );
SubscribeResponseDocument.SubscribeResponse response = responseDom.addNewSubscribeResponse( );
response.setSubscriptionManager( (EndpointReferenceType) ( (XmlObjectWrapper) subscription
.getEndpointReference( ) ).getXmlObject( ) );
//TODO why not ExpirationType???
response.setExpires( new org.apache.xmlbeans.XmlCalendar( subscription.getTerminationTime( ).getTime( ) ) );
return responseDom;
}
catch ( Exception e )
{