12 Replies Latest reply on Jul 28, 2011 3:57 PM by dward

    Namespaces in SwitchYard

    mageshbk

      Currently the merged configuration generator (ConfigMojo) does not seem to set the actual targetNamespace declared in the provided configuration. Say for e.g.,

      <switchyard xmlns="urn:switchyard-config:switchyard:1.0"
                  xmlns:swyd="urn:switchyard-config:switchyard:1.0"
                  xmlns:trfm="urn:switchyard-config:transform:1.0"
                  xmlns:bean="urn:switchyard-component-bean:config:1.0"
                  xmlns:soap="urn:switchyard-component-soap:config:1.0"
                  xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
                  targetNamespace="urn:switchyard-quickstart-demo:orders:0.1.0-SNAPSHOT"
                  name="orders">
      

       

      gets generated as

      <switchyard xmlns="urn:switchyard-config:switchyard:1.0">
          <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="orders">
      ...
              <component name="OrderService">
                  <service name="OrderService">
      

       

      Notice all the names are not type qualified ie., they are not generated with a namespace or the targetNamespace is not included in switchyard Element.

       

      Thinking along these lines further, say if I do not have any configuration, just the @Service annotated beans,

      1. Which namespace would these be generated? Java Package based?
      2. If I want my OrderService in a different namespace, than my InventoryService, how would I achieve that?

       

      Some more thoughts:

       

      Say we provide an expansion in our annotation like this:

      @Service(value=OrderService.class, namespace="urn:something")
      public class OrderServiceBean implements OrderService
      

       

      How will we get the namespace for @Reference, because that annotation will have an interface. Should we annotate the interface too?

       

      @Service(namespace="urn:something")
      public interface InventoryService
      

       

       

      How will the other service implementations (like Camel for e.g.,) be confined to a namespace?