-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Description
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:
import {Jsonix as jsonix} from 'jsonix';
import {XLink_1_0 as xLink} from 'w3c-schemas';
import * as ogcSchemas from 'ogc-schemas';
const ANY_MODULE = {
name: 'anyModule',
typeInfos: [{
type: 'classInfo',
localName: 'AnyElementType',
propertyInfos: [{
type: 'anyElement',
name: 'any',
collection: true,
allowDom: true,
}],
}],
elementInfos: [{
elementName: 'WMS_Capabilities',
typeInfo: 'anyModule.AnyElementType',
}],
};
export const WMS_CONTEXT = new jsonix.Context([
ANY_MODULE,
xLink,
ogcSchemas.SMIL_2_0,
ogcSchemas.SMIL_2_0_Language,
ogcSchemas.GML_2_1_2,
ogcSchemas.GML_3_1_1,
ogcSchemas.Filter_1_0_0,
ogcSchemas.Filter_1_1_0,
ogcSchemas.SE_1_1_0,
ogcSchemas.OWS_1_0_0,
ogcSchemas.OWS_1_1_0,
ogcSchemas.WMS_1_0_0,
ogcSchemas.WMS_1_1_0,
ogcSchemas.WMS_1_1_1,
ogcSchemas.WMS_1_3_0,
ogcSchemas.WMS_1_3_0_Exceptions,
ogcSchemas.SLD_1_0_0,
ogcSchemas.SLD_1_0_0_GeoServer,
ogcSchemas.SLD_1_1_0,
]);
Metadata
Metadata
Assignees
Labels
No labels