Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-3873

Policy matching fails for reference with target specified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • Java-SCA-2.0-M5
    • Java-SCA-2.0
    • Java SCA Policy
    • None

    Description

      I'm putting a simple test together which has a composite which looks like:

      <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
      targetNamespace="http://www.tuscany.apache.org/itests/policy/interceptors"
      xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
      xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
      name="HelloWorld">

      <component name="HelloWorldClient">
      <implementation.java class="helloworld.HelloWorldClient"/>
      <reference name="helloWorldWS"
      target="HelloWorldService/HelloWorld/BindingWS"
      requires="tuscany:testIntent"/>
      </component>

      <component name="HelloWorldService">
      <implementation.java class="helloworld.HelloWorldService"/>
      <service name="HelloWorld" requires="tuscany:testIntent">
      <binding.ws name="BindingWS"/>
      </service>
      </component>

      </composite>

      And a definitions.xml file which looks like:

      <definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
      targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
      xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
      xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">

      <intent name="testIntent" constrains="sca:implementation sca:binding">
      <description>a test intent</description>
      </intent>

      <sca:policySet name="TestInteractonPolicySet"
      attachTo="//sca:binding.ws"
      provides="tuscany:testIntent"
      appliesTo="//sca:binding.ws">
      <tuscany:testPolicy testString="interaction"/>
      </sca:policySet>

      <sca:policySet name="TestImplementationPolicySet"
      attachTo="//sca:implementation.java"
      provides="tuscany:testIntent"
      appliesTo="//sca:implementation.java">
      <tuscany:testPolicy testString="implementation"/>
      </sca:policySet>

      </definitions>

      I had though when originally implementing the matching algorithm that the policy sets at the reference would include those from the service binding in this case where the reference doesn't specify a binding. This appears not to be the case at the moment.

      Attachments

        Activity

          People

            simonslaws Simon Laws
            simonslaws Simon Laws
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: