-
1. Re: <component... but not <sca:component... with scanner
dward Aug 13, 2013 10:55 AM (in response to jaehui)No, as long as there is the correct xmlns defined. For example, this:
<switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912">
<sca:composite>
</sca:composite>
</switchyard>
is the same thing as this:
<switchyard xmlns="urn:switchyard-config:switchyard:1.0">
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
</composite>
</switchyard>
(I used the composite element instead of the component element in my example, but xml and namespaces work the same way no matter.)
-
2. Re: <component... but not <sca:component... with scanner
jaehui Aug 13, 2013 11:57 AM (in response to dward)Thank you very much. That makes sense.
Your answer is intriguing. Then perhaps I have an interesting observation. The scanner does not not seem to conform to whatever is set up as a namespace if a file pre-exists. If, for instance, in a project, you start with the visual tool and later create services via the annotation route, a conflict arises. The visual tool appears to prepend sca: by default, and the scanner does not.
-
3. Re: <component... but not <sca:component... with scanner
dward Aug 13, 2013 12:09 PM (in response to jaehui)You can mix and match xml, some with the namespace prefix, and some with locally defined namespaces. It doesn't matter, as long as it's all copesetic.
I will say that the Best Practice is to use the Eclipse tooling. The java annotations which exist to generate switchyard.xml were an early innovation which might not last long-term as a supported configuration method.
That said, if you find that there is a bug, where something doesn't work, please file an issue in JIRA.
-
4. Re: <component... but not <sca:component... with scanner
jaehui Aug 14, 2013 3:31 AM (in response to dward)Thanks David. It is too early to file a bug yet ... I need to gather more information.
But don't get rid of the annotations. They were a very happy spot in the tooling and a welcome relief/alternative from/to the visual tool. Certainly for me.
-
5. Re: <component... but not <sca:component... with scanner
jeanniesorenson Aug 19, 2013 7:50 AM (in response to jaehui)Is it correct that the scanner is tied to the compile lifecycle event? When I compile from the command line in maven it looks like the file is not getting updated in the target directory. Am I missing something?
-
6. Re: <component... but not <sca:component... with scanner
dward Aug 19, 2013 9:49 AM (in response to jeanniesorenson)The "configure" goal (which runs the scanners) is backed by the ConfigureMojo, whose default lifecycle phase is "process-classes". If you've overridden this in your pom.xml, I could see that being a problem.