Hi,
in WCS I have the GetCapabilities element that does not refer
an explicitly defined GetCapabilitiesType element (it's an
anonymous complex type).
Soo... EMF does generate the GetCapabilitiesType class anyways,
and I've based my KVP reader on it.
Yet the binding generator does generate only a binding for
the element _GetCapabilitiesBinding, but does not do anything
for the type itself.
Am I correct in assuming that I have to create a GetCapabilitiesTypeBinding by hand and register it in the
xml configuration?
What about using the element instead of the type? Pros/cons?
Cheers
Andrea
Hi Andrea,
The "_GetCapabilitiesTypeBinding" is the binding for the anonymous
complex type, so if registered it should behave as a normal type
binding. However, I agree with you that it is probably easier to just
use an element binding for the "GetCapabilities" element, and forget
about the type. Its up to you.
Did i understand the issue correctly? To get the element binding you
need to set a flag on the binding generator to tell it to generate
bindings for elements, as well as for types.
-Justin
Andrea Aime wrote:
Hi,
in WCS I have the GetCapabilities element that does not refer
an explicitly defined GetCapabilitiesType element (it's an
anonymous complex type).
Soo... EMF does generate the GetCapabilitiesType class anyways,
and I've based my KVP reader on it.
Yet the binding generator does generate only a binding for
the element _GetCapabilitiesBinding, but does not do anything
for the type itself.
Am I correct in assuming that I have to create a
GetCapabilitiesTypeBinding by hand and register it in the
xml configuration?
What about using the element instead of the type? Pros/cons?
Cheers
Andrea
!DSPAM:4007,476818f9195451096210785!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
Justin Deoliveira ha scritto:
Hi Andrea,
The "_GetCapabilitiesTypeBinding" is the binding for the anonymous
complex type, so if registered it should behave as a normal type
binding.
It's not there, I only have _GetCapabilities. So I'm wondering if
I can make the binding or there is a specific reasong the binding
generator did not create _GetCapabilitiesTypeBinding.
However, I agree with you that it is probably easier to just
use an element binding for the "GetCapabilities" element, and forget
about the type. Its up to you.
Did i understand the issue correctly? To get the element binding you
need to set a flag on the binding generator to tell it to generate
bindings for elements, as well as for types.
I don't have the flag set right now, but it may be it was set
when I did generate. Can you have a look on trunk, wcs111 module
(community section).
Cheers
Andrea
The "_GetCapabilitiesTypeBinding" is the binding for the anonymous
complex type, so if registered it should behave as a normal type
binding.
It's not there, I only have _GetCapabilities. So I'm wondering if
I can make the binding or there is a specific reasong the binding
generator did not create _GetCapabilitiesTypeBinding.
Sorry, silly me, i phrased this wrong. I should have said
"_GetCapabilitiesBinding" *is* the binding for the type. There cannot be
any "GetCapabilitiesTypeBinding" because there is no type called
"GetCapabilitiesType" in the schema. The naming convention i adopted for
anonymous complex types is:
<name of containing type>_<name of the element>
When it is a top level element there is no containing type so you get it
starting with an underscore.
I could have perhaps adopted a convention of just appending "Type" after
checking that the name was not taken by an actual type... but this way
makes it explicit that it is an anonymous type binding.
Hope that makes sense.
I don't have the flag set right now, but it may be it was set
when I did generate. Can you have a look on trunk, wcs111 module
(community section).
It does not appear to have been set. If you want you can generate the
bindings again setting "generateTypeBindings" to false, and setting
"generateElementBindings" to true.
Cheers
Andrea
!DSPAM:4007,47684046270582143011171!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org