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

The combination of impl.widget and binding.jsonrpc deployed in a webapp doesn't work as expected in some cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Java-SCA-2.0-Beta1
    • Java-SCA-2.x
    • None
    • None
    • All

    Description

      Given a composite....

      <component name="ComponentA">
      <implementation.java class="ComponentAImpl"/>
      <service name="ComponentAService">
      <t:binding.jsonrpc name="catalogJSON"/>
      </service>
      </component>

      <component name="ComponentAUI">
      <t:implementation.widget location="ComponentAUI.html"/>
      <service name="Widget">
      <t:binding.http uri="/MyApp"/>
      </service>
      <reference name="compA" target="ComponentA"/>
      </component>

      There seem to be a couple of issues.

      1/ The widget implementation exposes certain artifacts and it always seems to expose them at the default port regardless of what port the webapp container is using.
      e.g. you see URL like "http://localhost:8080/MyApp/tuscany" even with the container set to 8085. The result is that the HTML page can't find the scripts required to create SCA references

      2/ The root context gets reuse by accident
      e.g. in this case the widget is registered as something like http://localhost:8080/MyApp/* while the JSONRPC binding based endpoint is registered as something like http://localhost:8080/MyApp/ComponentA/ComponentAService/catalogJSON/*. Given the wildcards a message sent to the JSONRPC endpoint matches the widget endpoint first and the request gets sent to the HTTP binding provider which doesn't know what to do with it.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: