Hi Guys,
I am using geotoolkit (maven) version 3.21
<dependency>
<groupId>org.geotoolkit.pending</groupId>
<artifactId>geotk-client-csw</artifactId>
<version>3.21</version>
</dependency>
I came across a very atypical issue with DefaultTemporalExtent class.
When trying to create a record using CSW, this JAVA client having
DefaultTemporalExtent with just begin date and without end date fails with
error.
Details of the generated the XML are:
<gmd:extent>
<gmd:EX_Extent>
<gmd:temporalElement>
<gmd:EX_TemporalExtent>
<gmd:extent>
<gml:TimeInstant gml:id="extent" *
gml:id=""*>
<gml:timePosition>2013-07-01</gml:timePosition>
</gml:TimeInstant>
</gmd:extent>
</gmd:EX_TemporalExtent>
</gmd:temporalElement>
</gmd:EX_Extent>
</gmd:extent>
With 2 gml:id's and this gets thrown at GEONETWORK with 400 error as bad
request.
Caused by: org.xml.sax.SAXParseException; lineNumber: 196; columnNumber:
60; Attribute "id" bound to namespace "http://www.opengis.net/gml" was
already specified for element "gml:TimeInstant".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
But the same code works fine with standalone java program but not from web
application.
Please any help would be greatly appreciated.
--
Thanks
Manjunath
+61424472153