Esri / resource-proxy

Proxy files for DotNet, Java and PHP.
Apache License 2.0
372 stars 321 forks source link

PHP v1.1.2 issue with OGC service #445

Closed lheberlie closed 3 years ago

lheberlie commented 6 years ago

The Java proxy v1.1.2 works with this sample, however when using PHP proxy v1.1.2 it did not.

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
  <title>WFS Layer</title>
  <link rel="stylesheet" href="https://js.arcgis.com/3.22/esri/css/esri.css">
  <style>
    html, body, #map {
      height: 100%;
      width: 100%;
      margin: 0;
      padding: 0;
    }
  </style>
  <script src="https://js.arcgis.com/3.22/"></script>
  <script>
    var map;

    require(["esri/map", "esri/InfoTemplate", "esri/layers/WFSLayer",
      "esri/config", "dojo/domReady!"
    ], function(Map, InfoTemplate, WFSLayer, esriConfig) {
      map = new Map("map", {
        basemap: "gray",
        center: [16.4, 48.2],
        zoom: 11
      });

      esriConfig.defaults.io.proxyUrl = "/proxy/";

      var url = "https://data.wien.gv.at/daten/geo";

      var opts = {
        "url": url,
        "version": "2.0.0",
        "name": "BEZIRKSGRENZEOGD",
        "wkid": 4326,
        "maxFeatures": 1000
      };
      var layer = new WFSLayer();

      layer.fromJson(opts);

      map.addLayer(layer);
    });    
  </script>
</head>

<body>
  <div id="map"></div>
</body>
</html>

cc: @jgravois @phpmaps

First request

https://ws.esri.com/proxy/?http://data.wien.gv.at/daten/geo/wfs?service=WFS&request=DescribeFeatureType&version=2.0.0&typeName=ogdwien:BEZIRKSGRENZEOGD&namespace=xmlns(ogdwien=http://www.wien.gv.at/ogdwien)

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ogdwien="http://www.wien.gv.at/ogdwien" xmlns:wfs="http://www.opengis.net/wfs/2.0" elementFormDefault="qualified" targetNamespace="http://www.wien.gv.at/ogdwien">
  <xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://data.wien.gv.at/daten/geo/schemas/gml/3.2.1/gml.xsd"/>
  <xsd:complexType name="BEZIRKSGRENZEOGDType">
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractFeatureType">
        <xsd:sequence>
          <xsd:element maxOccurs="1" minOccurs="0" name="SHAPE" nillable="true" type="gml:GeometryPropertyType"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="NAMEK" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="BEZNR" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="BEZ_RZ" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="NAMEK_NUM" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="NAMEK_RZ" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="NAMEG" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="LABEL" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="BEZ" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="DISTRICT_CODE" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="STATAUSTRIA_BEZ_CODE" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="STATAUSTRIA_GEM_CODE" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="FLAECHE" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="UMFANG" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="AKT_TIMESTAMP" nillable="true" type="xsd:date"/>
          <xsd:element maxOccurs="1" minOccurs="1" name="SE_SDO_ROWID" nillable="false" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="SE_ANNO_CAD_DATA" nillable="true" type="xsd:hexBinary"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="BEZIRKSGRENZEOGD" substitutionGroup="gml:AbstractFeature" type="ogdwien:BEZIRKSGRENZEOGDType"/>
</xsd:schema>

Second request

POST
https://ws.esri.com/proxy/?http://data.wien.gv.at/daten/geo/wfs

<?xml version='1.0' encoding='utf-8'?>
<GetFeature 
 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
 xmlns:gml='http://www.opengis.net/gml'
 xmlns:ogc='http://www.opengis.net/ogc'
 xmlns:wfs='http://www.opengis.net/wfs'
 xmlns='http://www.opengis.net/wfs/2.0'
 xmlns:ogdwien='http://www.wien.gv.at/ogdwien'
 version='2.0.0' service='WFS' count='1000'>
 <Query typeNames='ogdwien:BEZIRKSGRENZEOGD' srsName='EPSG:4326'>
 </Query>
</GetFeature>

<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://data.wien.gv.at/daten/geo/schemas/ows/1.1.0/owsAll.xsd">
<ows:Exception exceptionCode="MissingParameterValue" locator="request">
<ows:ExceptionText>Could not determine geoserver request from http request org.geoserver.platform.AdvancedDispatchFilter$AdvancedDispatchHttpRequest@476b1bec</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

Configuration details

Server version: Apache/2.4.25 (Unix)
PHP 5.6.30 (cli) (built: Feb  7 2017 16:18:37) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 3 years ago

This issue has been automatically closed due to inactivity.