1

Closed

Checking Source URI validity

description

At least one of the parameters to the Subscription Service's Create operation, which creates a durable Subscription, has a very specific and critical form. And, if you do not get the form correct, the service will silently accept the incorrect form but not function properly.
 
In my case, instead of using the Identity2.Spaces property, which contains the correct form of the Source URI, I formed a Source URI by combining two strings- to form a Source URI that looked like this:
 
/GWS/Groove/2.0/Spaces/grooveIdentity://7746ttz47vtp5r3gha7hu5jv5wanax55@
 
Now, a Source URI in the correct form looks like this:
 
/GWS/Groove/2.0/Spaces/grooveIdentity/7746ttz47vtp5r3gha7hu5jv5wanax55@ 
 
This is a subtle but critical difference. When given a Source URI in the incorrect form to Create a Subscription, Groove accepts the Source URI in the incorrect form without expressing any error. But, subsequently, a subscription works until Groove is shutdown, and then never works (i.e., never produces an event) again.
 
Incidentally, another symptom of this problem is that the EventSource in the ReadExtendedResponse SOAP looks like this:
 
<EventSource>grooveIdentity:://</EventSource>
 
Instead of what it should look like, which is more like this:
 
<EventSource>grooveIdentity://7746ttz47vtp5r3gha7hu5jv5wanax55@</EventSource>
 
Paresh had a great idea - to put some code to check the form of the SourceURI into the helpers at the "choke point" (where the subscription Create operation is invoked) and to error out invalid forms of Source URI there.
 
There are other ways to screw up the SourceURI. For example, if you provide a valid form of the argument but an invalid value for the actual identity string, I think the same ill behavior results.
 
...Bob
Closed Apr 20, 2007 at 11:55 PM by BobNovas
Fixed in Release 3

comments

psuthar wrote Jan 11, 2007 at 6:09 PM

I think the best I can do is scan for a ':' character within the SourceURI and return an error if one is found. I welcome additional ideas on how to trap this condition.

wrote Feb 15, 2007 at 4:59 PM

wrote Feb 19, 2007 at 9:30 PM

wrote Apr 20, 2007 at 11:55 PM

wrote Feb 1, 2013 at 10:31 PM

wrote May 15, 2013 at 1:28 AM