[Geoserver-devel] Local and default workspace name clash

Hey, quick question.

I’m experiencing local and default workspace name clashes, not sure if that’s a bug or a feature though, but seems more like a bug.

e.g.:

  • ws1 and ws1 both have a feature type called Forests (I’m actually reproducing in GetFeatureJoinTest),
  • ws1 is the default workspace

A request like /ws2/wfs?typeNames=Forests&… resolves to ws1:Forests instead of ws2:Forests (the one requested as the local workspace context).

Problem is at TypeNameKvpParser:

FeatureTypeInfo ftInfo = catalog.getFeatureTypeByName(token);
if (ftInfo == null) {
return new QName(null, token);
} else {
return new QName(ftInfo.getNamespace().getURI(), token);
}

Since catalog.getFeatureTypeByName(“Forests”) returns the one in the default workspace.

Am I right this is a bug so I can file an issue and a patch? (tricky cause it looks like the LocalWorkspace hasn’t been set by the time the KVP is parsed?)

Cheers,
Gabriel

···

Gabriel Roldán

I believe this is a bug, default namespace should not be considered when using wfs2/wfs?

···


Jody Garnett

Looks like a bug to me, the local catalog machinery should force the current workspace as the default (and only) one

Cheers
Andrea

···

== GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Okay, thanks for the confirmation.

I’m working on it then.

Cheers,
Gabriel

···

Gabriel Roldán