You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Element [ ] could not be unmarshalled as is not known in this context #182
I'm trying to unmarshal this WMS_Capabilities XML, but I'm getting this error: Element [{http://mapserver.gis.umn.edu/mapserver}ms:GetStyles] could not be unmarshalled as is not known in this context and the property does not allow DOM content.
I've tried to add a mapping with the anyElement property to deal with it but I can't figure out how to get it to work. Is there a way to completely ignore elements that aren't known in the context?
Here is my code for my module and the context I'm using:
WMS 1.3.0 allows for extensions via wms:_ExtendedOperation. So basically you need a mapping which would define ms:GetStyles as a substitution for wms:_ExtendedOperation.
I've tried compiling that schema with java -jar node_modules/jsonix/lib/jsonix-schema-compiler-full.jar -d jsonix/mappings -p GetStyles jsonix/schema/getstyles.xsd
But I get a few errors and it fails:
[ERROR] Property "Title" is already defined. Use <jaxb:property> to resolve this conflict.
line 232 of http://www.w3.org/1999/xlink.xsd
[ERROR] The following location is relevant to the above error
line 219 of http://www.w3.org/1999/xlink.xsd
[ERROR] Property "Title" is already defined. Use <jaxb:property> to resolve this conflict.
line 261 of http://www.w3.org/1999/xlink.xsd
[ERROR] The following location is relevant to the above error
line 246 of http://www.w3.org/1999/xlink.xsd
[ERROR] org.hisrc.jsonix.execution.JsonixInvoker - The model is null, there was probably a problem parsing schemas.
Activity
highsource commentedon Sep 1, 2017
WMS 1.3.0 allows for extensions via
wms:_ExtendedOperation. So basically you need a mapping which would definems:GetStylesas a substitution forwms:_ExtendedOperation.Actually the easiest would be simply compiling this schema:
http://ogc.bgs.ac.uk/cgi-bin/exemplars/BGS_Bedrock_and_Superficial_Geology/ows?language=eng&service=WMS&version=1.3.0&request=GetSchemaExtension
Otherwise check SLD_1_1_0.js for how
GetLegendGraphicis defined.NickMackz commentedon Sep 1, 2017
Thanks for the quick response.
I've tried compiling that schema with
java -jar node_modules/jsonix/lib/jsonix-schema-compiler-full.jar -d jsonix/mappings -p GetStyles jsonix/schema/getstyles.xsdBut I get a few errors and it fails:
highsource commentedon Sep 3, 2017
Yes, OGC schemas are a bit hard to compile. It will be probably easier if you just write mappings manually. Probably something like:
No guarantees, but you get the idea.
NickMackz commentedon Sep 5, 2017
Thanks. I've got it working now by writing the mappings manually and compiling inspire_common.
In case they are useful to anyone else: