"Expected element" error for InsertSensor

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

"Expected element" error for InsertSensor

Derek Hohls
Hi

I am trying to create a new procedure and get the following back from the POST request (via the web client):

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsAll.xsd">
  <ows:Exception exceptionCode="InvalidRequest" locator="Expected element 'InsertionMetadata@http://www.opengis.net/swes/2.0' instead of 'SosInsertionMetadata@htp://www.opengis.net/sos/2.0' here in element metadata@http://www.opengis.net/swes/2.0">
    <ows:ExceptionText>[XmlBeans validation error:] Expected element 'InsertionMetadata@http://www.opengis.net/swes/2.0' instead of 'SosInsertionMetadata@htp://www.opengis.net/sos/2.0' here in element metadata@http://www.opengis.net/swes/2.0</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

How do I go about debugging this - ie finding which item triggers the actual error?

Thanks
Derek


This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

Please consider the environment before printing this email.
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: "Expected element" error for InsertSensor

Eike Hinderk Jürrens
Hi Derek!


Am 13.09.2017 um 16:02 schrieb Derek Hohls:
Hi

I am trying to create a new procedure and get the following back from the POST request (via the web client):

[...]

You might send a link to any pastebin service with your request. Don't forget to remove any confidential information beforehand.



How do I go about debugging this - ie finding which item triggers the actual error?

You can increase the log level of the service via the admin interface: Admin -> Settings -> Logging (e.g. http://localhost:8080/52n-sos-webapp/admin/logging). After some time, send your request again and check the log files of the service.

Kind regards!

Eike


-- 
Eike Hinderk Jürrens
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 Münster, Germany
E-Mail: [hidden email]
Fon: +49-(0)-251–396371-33
Fax: +49-(0)-251–396371-11
http://52north.org/
Twitter: @FiveTwoN
General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849

_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: "Expected element" error for InsertSensor

Derek Hohls
Thanks Eike

I turned on DEBUG in logging; unfortunately there were no more details in the log file than before.

I have created a pastebin as suggested:

https://pastebin.com/tguCn23m  [Expires 2018]

I also tried changing the namespace:
<sos:SosInsertionMetadata>
to
<swes:InsertionMetadata>
and got the same error ....  so not sure.

Thanks
Derek

PS It seems one way to help overcome this type of problem would be to run the geenrated XML against a schema --- is this possible?
 

>>> Eike Hinderk Jürrens <[hidden email]> 09/14/17 9:43 AM >>>
Hi Derek!


Am 13.09.2017 um 16:02 schrieb Derek Hohls:
Hi

I am trying to create a new procedure and get the following back from the POST request (via the web client):

You might send a link to any pastebin service with your request. Don't forget to remove any confidential information beforehand.

How do I go about debugging this - ie finding which item triggers the actual error?

You can increase the log level of the service via the admin interface: Admin -> Settings -> Logging (e.g. http://localhost:8080/52n-sos-webapp/admin/logging). After some time, send your request again and check the log files of the service.

Kind regards!

Eike


-- Eike Hinderk Jürrens52°North Initiative for Geospatial Open Source Software GmbHMartin-Luther-King-Weg 2448155 Münster, GermanyE-Mail: [hidden email]Fon: +49-(0)-251–396371-33Fax: +49-(0)-251–396371-11http://52north.org/Twitter: @FiveTwoNGeneral Managers: Dr. Albert Remke, Dr. Andreas WytziskLocal Court Muenster HRB 10849

This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

Please consider the environment before printing this email.
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: "Expected element" error for InsertSensor

Derek Hohls
One update:

If I change the namespace, the log file looks different:

2017-09-14 09:40:30,246 DEBUG [http-apr-8080-exec-9] [SwesDecoderv20.java:131] REQUESTTYPE:class net.opengis.swes.x20.impl.InsertSensorDocumentImpl
2017-09-14 09:40:30,248 DEBUG [http-apr-8080-exec-9] [SosService.java:100] Outgoing response for request No. 25 is committed = false (took 14ms)
2017-09-14 09:40:37,998 DEBUG [C3P0PooledConnectionPoolManager[identityToken->1br435v9qct2chn1xsukko|68a5c403]-AdminTaskTimer] [ThreadPoolAsynchronousRunner.java:730] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@4e4b54ba -- Running DeadlockDetector[Exiting. No pending tasks.]
2017-09-14 09:40:38,297 DEBUG [http-apr-8080-exec-8] [LogBackLoggingConfigurator.java:692] Logfile: /usr/local/tomcat/logs/52n-sos-webapp.log

But the front end still reports a 500 Internal Server error.
Not sure if this helps with sourcing the error or not?


>>> "Derek Hohls" <[hidden email]> 09/14/17 11:05 AM >>>
Thanks Eike

I turned on DEBUG in logging; unfortunately there were no more details in the log file than before.

I have created a pastebin as suggested:

https://pastebin.com/tguCn23m  [Expires 2018]

I also tried changing the namespace:
<sos:SosInsertionMetadata>
to
<swes:InsertionMetadata>
and got the same error ....  so not sure.

Thanks
Derek

PS It seems one way to help overcome this type of problem would be to run the geenrated XML against a schema --- is this possible?
 

>>> Eike Hinderk Jürrens <[hidden email]> 09/14/17 9:43 AM >>>
Hi Derek!


Am 13.09.2017 um 16:02 schrieb Derek Hohls:
Hi

I am trying to create a new procedure and get the following back from the POST request (via the web client):

You might send a link to any pastebin service with your request. Don't forget to remove any confidential information beforehand.

How do I go about debugging this - ie finding which item triggers the actual error?

You can increase the log level of the service via the admin interface: Admin -> Settings -> Logging (e.g. http://localhost:8080/52n-sos-webapp/admin/logging). After some time, send your request again and check the log files of the service.

Kind regards!

Eike


-- Eike Hinderk Jürrens52°North Initiative for Geospatial Open Source Software GmbHMartin-Luther-King-Weg 2448155 Münster, GermanyE-Mail: [hidden email]Fon: +49-(0)-251–396371-33Fax: +49-(0)-251–396371-11http://52north.org/Twitter: @FiveTwoNGeneral Managers: Dr. Albert Remke, Dr. Andreas WytziskLocal Court Muenster HRB 10849

This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

Please consider the environment before printing this email.

This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

Please consider the environment before printing this email.
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: "Expected element" error for InsertSensor

Eike Hinderk Jürrens
Hi Derek,
thank you for your additional information. I could verify the issue but
could not find the cause. I think that we have to wait for Carsten
coming back to office next Monday.
Is this fast enough for you?
Kind regards,
Eike

--
Eike Hinderk Jürrens
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 Münster, Germany
E-Mail: [hidden email]
Fon: +49-(0)-251–396371-33
Fax: +49-(0)-251–396371-11
http://52north.org/
Twitter: @FiveTwoN
General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849

_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: "Expected element" error for InsertSensor

Derek Hohls
Hi Eike

I think the problem has been with some of the "wrapper" top-level elements in my sensor definition.  I am changing those to try and match the example supplied with the 52N SOS. At present, its now giving me errors about my units definition, which is a big step forward.  If successful, I will add the final XML to another pastebin; if Carsten can compare both and provide comments that will help going forwards.
 
Thanks,
Derek


>>> Eike Hinderk Jürrens <[hidden email]> 09/14/17 1:34 PM >>>
Hi Derek,
thank you for your additional information. I could verify the issue but
could not find the cause. I think that we have to wait for Carsten
coming back to office next Monday.
Is this fast enough for you?
Kind regards,
Eike

--
Eike Hinderk Jürrens
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 Münster, Germany
E-Mail: [hidden email]
Fon: +49-(0)-251–396371-33
Fax: +49-(0)-251–396371-11
http://52north.org/
Twitter: @FiveTwoN
General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849

_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines

This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

Please consider the environment before printing this email.
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: "Expected element" error for InsertSensor

Carsten Hollmann
Hi Derek,

the sos XML-namespace declaration is not correct, it is
"htp://www.opengis.net/sos/2.0" instead of "http://www.opengis.net/sos/2.0".

On the other hand, the different SensorML formats are mixed.
You define the swe XML-namespace to SensorML 2.0 but the
procedureDescriptionFormat is SensorML 1.0.1 and procedureDescription
contains SensorML 1.0.1 elements (SensorML, System).

Best,
Carsten
_______________________________________________
SWE mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/swe
http://sensorweb.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines