You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Bogdan Solomon <bs...@ncct.uottawa.ca> on 2007/08/08 21:21:50 UTC

Subscribe and SubscribeResponse

I have found something a bit odd while looking at the source code for
Subscribe and SubscribeResponse.

The Subscribe class does something like this in it's toXML(Document doc)
method

EndpointReference consumer = getConsumerReference();
XmlUtils.setElement(root, WsnConstants.CONSUMER_QNAME, consumer);

while SubscribeResponse is doing something like this (in the same method)
        
Element eprXML = getSubscriptionReference().toXML();
XmlUtils.setElement(root, WsnConstants.SUBSCRIPTION_EPR_QNAME, eprXML);


I wanted to know if there is some reason for which SubscribeResponse does
not just get the subscription epr and set it as the element and instead gets
the XML representation of the epr. This is causing me some issues with
serialization, as I have modified XmlUtils a bit in order to serialize
EndpointReferences correctly.
-- 
View this message in context: http://www.nabble.com/Subscribe-and-SubscribeResponse-tf4238546.html#a12060177
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: Subscribe and SubscribeResponse

Posted by Daniel Jemiolo <da...@us.ibm.com>.

The inconsistency is probably just an accident - I haven't looked at the
SVN history, but usually my style would be like that of the Subscribe
class. The SubscribeResponse code may reflect a time when
XmlUtils.setElement() did not set support Object values (just Node).

Dan



Bogdan Solomon <bs...@ncct.uottawa.ca> wrote on 08/08/2007 03:21:50 PM:

>
> I have found something a bit odd while looking at the source code for
> Subscribe and SubscribeResponse.
>
> The Subscribe class does something like this in it's toXML(Document doc)
> method
>
> EndpointReference consumer = getConsumerReference();
> XmlUtils.setElement(root, WsnConstants.CONSUMER_QNAME, consumer);
>
> while SubscribeResponse is doing something like this (in the same method)
>
> Element eprXML = getSubscriptionReference().toXML();
> XmlUtils.setElement(root, WsnConstants.SUBSCRIPTION_EPR_QNAME, eprXML);
>
>
> I wanted to know if there is some reason for which SubscribeResponse does
> not just get the subscription epr and set it as the element and instead
gets
> the XML representation of the epr. This is causing me some issues with
> serialization, as I have modified XmlUtils a bit in order to serialize
> EndpointReferences correctly.
> --
> View this message in context: http://www.nabble.com/Subscribe-and-
> SubscribeResponse-tf4238546.html#a12060177
> Sent from the Muse User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>