partnerships with services implementing generic contracts
I have the following service partner declaration in my code for service Foo:
[Partner("Camera", Contract = webcam.Contract.Identifier,
CreationPolicy = PartnerCreationPolicy.UsePartnerListEntry)]
webcam.WebCamOperations _camPort = new webcam.WebCamOperations();
Here, webcam is the generic webcam contract in Microsoft.Robotics.Services.WebCam.Proxy.
I have another service, Bar, that implements the generic webcam as an alternate contract. My question is, how do I write the Foo/Bar partnership into my manifest? The following manifest returns 'partner enumeration failed' when creating Foo:
<?xml version="1.0" ?>
<Manifest
xmlns="http://schemas.microsoft.com/xw/2004/10/manifest.html"
xmlns:dssp="http://schemas.microsoft.com/xw/2004/10/dssp.html"
>
<CreateServiceList>
<ServiceRecordType>
<dssp:Contract>http://www.volts-iq.com/2007/06/Bar.html</dssp:Contract>
<dssp:Service>http://localhost/bar</dssp:Service>
<Name>ImplementsWebCam</Name>
</ServiceRecordType>
<ServiceRecordType>
<dssp:Contract>http://www.volts-iq.com/2007/06/Foo.html</dssp:Contract>
<dssp:PartnerList>
<dssp:Partner>
<dssp:Name>ImplementsWebCam</dssp:Name>
</dssp:Partner>
</dssp:PartnerList>
</ServiceRecordType>
</CreateServiceList>
</Manifest>
Foo is looking for something that implements the webcam contract and it doesn't seem to figure out that Bar provides this contract as an alternate.
Bonus points if you can also explain how I can do this programmatically (ie, how do I define the PartnerType that I'd pass to CreateService.
thanks,
R

