Hi, again I have been getting problems with posting gml to retrieve features
Types
when I send a GML http POST query (using WebServiceForm widget) I get this
exception from my geoserver local.

<ows:ExceptionReport version="1.0.0"

  xsi:schemaLocation="http://www.opengis.net/ows
http://10.90.0.192:11080/geoserver/schemas/ows/1.0.0

/owsExceptionReport.xsd"

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:ows="http://www.opengis.net/ows";>

  <ows:Exception exceptionCode="MissingParameterValue" locator="request">

    <ows:ExceptionText>Could not determine geoserver request

      from http request
[EMAIL PROTECTED]</ows:ExceptionText>

  </ows:Exception>

</ows:ExceptionReport>

To determine the problem I followed this steps
1- download the mapbuilder
2-Create a dynamic Web Project with eclipse (moving source and content to
webContent folder)
3- Deployed in tomcat and start it in debug mode.
While Debugging my app aplication I found this in ProxyRedirector class

*line 147* httppost.setRequestBody(body);
*line 148* if (0 == httppost.getParameters().length &&
!hasXmlContentType(request)){
            log.debug("No Name/Value pairs found ... pushing as
raw_post_data");
            httppost.setParameter("raw_post_data", body);
        }

In my app I have WebServiceForm widget with a wfs_GetFeature.xsl that
generate post data without http Parameters
so lines 147 and 148 are executed. So the body request (GML sepecifing a
query) is duplicated in body and as a parameter in the httpPost,method.
To solve the problem I have modified the code as following

*line 148*    if (0 == httppost.getParameters().length && *
!hasXmlContentType(request)*){
            log.debug("No Name/Value pairs found ... pushing as
raw_post_data");
            httppost.setParameter("raw_post_data", body);
        }

private boolean *hasXmlContentType(HttpServletRequest request)* {
    // TODO Auto-generated method stub
    String [] splitted = request.getHeader("content-type").split("xml");
    return splitted!=null && splitted.length>0;
}

I ask if the body has a xml request if so, I didn't duplicate it in a the
raw_data parameter request.
I have attached the new file, and hope have fixed a new bug :D.

Regards
Nacho
PD:Sorry about my horrible english :D

Attachment: ProxyRedirect.java
Description: Binary data

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users

Reply via email to