public Element toXML(Document doc)
{
Element root = XmlUtils.createElement(doc, WsnConstants.SUBSCRIBE_QNAME);
EndpointReference sub = getWsResource().getEndpointReference();
EndpointReference consumer = getConsumerReference();
EndpointReference producer = getProducerReference();
Filter filter = getFilter();
XmlUtils.setElement(root, WsnConstants.SUBSCRIPTION_EPR_QNAME, sub);
XmlUtils.setElement(root, WsnConstants.CONSUMER_QNAME, consumer);
XmlUtils.setElement(root, WsnConstants.PRODUCER_QNAME, producer);