ThinkGeo.com    |     Documentation    |     Premium Support

WFS with POST dos not work

Hi,

i have a WFS running on an Oracle Weblogic-server using the sdows-deployment from Oracle.

There are several Features configured. For all Features the DescribeFeatureType-Request and the GetFeature-Request are only allowed with POST-method (not with GET). Whe i try to Access such a feature using a WfsFeatureLayer, i can see that the webRequests are sent (using the SentWebRequest Event), but they are all sent using GET and this request then doesn’t return any Features, but an error-xml. In result, i see no Features in my map.

What am i doing wrong?

Regards,
Andreas

Hi Andreas,

At first I think you can view the error-xml to make sure what’s the detail error information return from server side.

And then if that’s require “POST”, you should want to modify the sending request to change the WebRequest from “GET” to “POST”, you should want to create a new WebRequest based on original url and assign the “POST” like this:

request.Method = “POST”;

Because by default all of our request from WfsFeaturelayer is set equal “GET”.

Wish that’s helpful.

Regards,

Don

Hi Don,

unfortunately it’snot that easy. Just changing the request-method wll not work, as the whole request has to be formed as an XML-document which is passed along with the POST-request.

And, the DescribeFeatureType-request isalso send via GET and does not return anthing useful, as it also has to be send by POST.

So changing the GET to POST includes a lot of work with detailed knowlegde about the WFS-specification.

The getCapability of the WFS states that there is no GET available for the WFS, so using a GET in any case seems to me as a bug or at least as a incomplete implementation.

Regards,
Andreas

Hi Andreas,

Yes our logic only support GET for now, so I think we can follow two ways to handle this problem.

  1. Could you please sent us a test server url? Our developer will did some test based on that and evaluate whether we will did the enhancement for WFSFeatureLayer now.

  2. Still modify the code in SendingRequest event, in fact you can rebuild the entire WebRequest and make that works for your server, because even we enhancement this layer in future, we still need POST via WebRequest, so you can do anything you want based on it.

Wish that’s helpful.

Regards,

Don

Hi Don,

  1. I can’t give you a testserver-url, because all the Oracle-WFS-instances we use run in our internal network.
    What you Need to reproduce is an Oracle weblogic-server, an Oracle 12 database and a deployment of the latest Oracle spatial webservices deplioyment (sdows)

  2. Is there an Event where i can see the arguments passed to the wfs-server without having to parse the URL of the webrequest?

Regards,
Andreas

Hi Andreas,

Thanks to let us know the detail information about that. It looks our developer had append this requirement to our pending list, they will did more detail research then decided whether it need be implemented and integrated in future.

The event SendingRequest should be the best one, it contains all information you need, because the WebRequest instance takes all the information we sent to server, so you can modify everything and implement the custom logic.

Regards,

Don

Ok, i will try it out.

Regards,
Andreas

Hi Andreas,

OK, please feel free let’s know if there any issue after tested that.

Thanks,
Bill