Hello abin, My guess is you are violating XML escaping. See e.g. https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents
XML has escaping rules, e.g., if you want the character & in your XML, you should escape it as & In your long schemalocation line, I see …fs&request… and …1.1.0&typename These have ampersands and should be escaped, e.g. …fs&request=… The root cause of this trouble is that you are generating XML by concatenating strings together. That makes you responsible for following all kinds of XML rules. I’d advise you to find an XML (or SOAP?) library for your programming language(Java?), and let it write/send the correct XML for you. While this is more effort short term, you’ll quickly gain it back by not worrying about this, with an additional bonus of security . For example, some trouble you’ll have to tackle in the near future: 1. you need to escape the variables too: gml3, area and name_house 2. You are manually handling namespaces and prefixes, which can get very complicated. Hans Yperman IT staff Department IT [cid:image001.png@01D8D264.3FB86000] Vlaams Instituut voor de Zee vzw InnovOcean Campus, Jacobsenstraat 1 8400 Oostende, België T +32 (0) / M +32 (0) www.vliz.be<http://www.vliz.be> From: abin prajapati <abinprajap...@gmail.com> Sent: dinsdag 27 september 2022 10:45 To: geoserver-users@lists.sourceforge.net Subject: [Geoserver-users] No applicable Code Error in Geoserver Hello all, I am inserting a polygon to my database using Geoserver Transaction Insert. My code is: '<wfs:Transaction service="WFS" version="1.1.0"\n' + 'xmlns:housenumber="http://www.openplans.org/housenumber"\n' + 'xmlns:ogc="http://www.opengis.net/ogc"\n' + 'xmlns:wfs="http://www.opengis.net/wfs"\n' + 'xmlns:gml="http://www.opengis.net/gml"\n' + 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n' + 'xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd http://www.openplans.org/housenumber http://localhost:8080/geoserver/wfs/?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=housenumber:housetry">\n' + '<wfs:Insert>\n' + '<housenumber:housetry>\n' + '<housenumber:geom>\n' + gml3 + '\n' + '</housenumber:geom>\n' + '<housenumber:area>' + area + '</housenumber:area>\n' + '<housenumber:name_house>' + name_house + '</housenumber:name_house>\n' + '</housenumber:housetry>\n' + '</wfs:Insert>\n' + '</wfs:Transaction>\n'; I got this error: <?xml version="1.0" encoding="UTF-8"?><ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"> <ows:Exception exceptionCode="NoApplicableCode"> <ows:ExceptionText>org.xmlpull.v1.XmlPullParserException: entity reference name can not contain character =' (position: START_DOCUMENT seen ...senumber http://localhost:8080/geoserver/wfs/?service=wfs&request=... @7:199) entity reference name can not contain character =' (position: START_DOCUMENT seen ...senumber http://localhost:8080/geoserver/wfs/?service=wfs&request=... @7:199) </ows:ExceptionText> </ows:Exception> </ows:ExceptionReport> Could anybody help me in this regards? I have no idea with this error encountered.
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users