Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: UDIG 1.2.1
-
Fix Version/s: UDIG 1.2.1
-
Component/s: webservices
-
Labels:None
Description
Walkthrough 2 is unable to edit GeoServer WFS-T as reported on email:
java.io.IOException: srsName required for MultiPoint
at org.geotools.xml.gml.GMLComplexTypes.encode(GMLComplexTypes.java:361)
at org.geotools.xml.gml.GMLComplexTypes.encode(GMLComplexTypes.java:150)
at org.geotools.xml.gml.GMLComplexTypes$AbstractGeometryType.encode(GMLComplexTypes.java:976)
at org.geotools.xml.wfs.WFSTransactionComplexTypes$PropertyType.encode(WFSTransactionComplexTypes.java:1460)
at org.geotools.xml.wfs.WFSTransactionComplexTypes$UpdateElementType.encode(WFSTransactionComplexTypes.java:1078)
at org.geotools.xml.wfs.WFSTransactionComplexTypes$TransactionType.encode(WFSTransactionComplexTypes.java:311)
at org.geotools.xml.DocumentWriter.writeFragment(DocumentWriter.java:316)
at org.geotools.xml.DocumentWriter.writeDocument(DocumentWriter.java:214)
at org.geotools.data.wfs.v1_0_0.WFSTransactionState.commitPost(WFSTransactionState.java:291)
at org.geotools.data.wfs.v1_0_0.WFSTransactionState.commit(WFSTransactionState.java:152)
at org.geotools.data.DefaultTransaction.commit(DefaultTransaction.java:182)
at net.refractions.udig.project.internal.impl.UDIGTransaction.commitInternal(UDIGTransaction.java:49)
Looking at the GeoTools code in question:
AttributesImpl ai = new AttributesImpl();
// no GID
if (g.getUserData() != null) {
ai.addAttribute("", "srsName", "", "anyURI",
g.getUserData().toString());
} else {
if (g.getSRID() != 0) {
// deprecated version
ai.addAttribute("", "srsName", "", "anyURI", "" + g.getSRID());
} else {
throw new IOException("srsName required for MultiPoint "+(e==null?"":e.getName()));
}
}
So the assumption here is we need to fill in an srsName or SRID value prior to submitting to the WFS? I think this is a consequence of one of the AppSchema encoding changes a while back on GeoTools.