POST
|
Nobody? Mapserver has this answer even in the documentation...
... View more
02-16-2017
02:26 AM
|
0
|
0
|
445
|
POST
|
To define a stored query you have to create a XML file with the query definition. An example from ESRI looks like this: <?xml version="1.0" encoding="utf-8" ?>
<wfs:StoredQueryList xmlns:ogc="http://www.opengis.net/ogc"
xmlns:wfs="http://www.opengis.net/wfs" xmlns:fes="http://www.opengis.net/fes/2.0"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:myns="http://www.someserver.com/myns"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd"
service="WFS" version="2.0.0">
<wfs:StoredQueryDefinition id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
<wfs:Title>urn:ogc:def:query:OGC-WFS::GetFeatureById predefined stored query</wfs:Title>
<wfs:Abstract>This query support all layers in the map</wfs:Abstract>
<wfs:QueryExpressionText returnFeatureTypes="myns:Cities,myns:Continent,myns:World"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="false">
<wfs:Query typeName="myns:Cities">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Literal>OBJECTID</ogc:Literal>
<ogc:Literal>${ID}</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:StoredQueryDefinition>
</wfs:StoredQueryList> The disadvantage of this is, that you have to define it for each and every typeName - everytime a new type is added, you have to add it to the Query. I would like to have a typename="*" or typename="?" - I want to remove the typename. Is this possible? If not - I still have to add the typename or featureId parameter from the GetFeature request (even so i added the StoredQuery_id=...) otherwise there is an exception. Here is the request: ...- server - name - usw.... /WFSServer?service=WFS&REQUEST=GetFeature&STOREDQUERY_ID=urn:ogc:def:query:OGC-WFS::GetFeatureById&ID=52&typename=layer_name Is there any possiblity to use this layer_name in the typename in the wfs:Query?
... View more
02-08-2017
04:44 AM
|
0
|
1
|
1045
|
POST
|
yes - of course. because the script failed before and didn't execute the following steps. Which are as far as I know: arcpy.StageService_server and arcpy.UploadServiceDefinition_server To call StageService_server I would need an existing sddraft - so, as long as the function CreateMapSDDraft fails, I am stuck there.
... View more
01-13-2017
03:53 AM
|
0
|
0
|
504
|
POST
|
map_document = arcpy.mapping.MapDocument("PATH\\TO_MXD_FILE")
... View more
01-13-2017
02:42 AM
|
0
|
2
|
504
|
POST
|
Hello, I want to publish a mxd file via arcpy. I checked the examples in the documentation - unfortunately it is not working. the code is: sd_draft = arcpy.mapping.CreateMapSDDraft(map_document, sd_draft_file, service_name, "FROM_CONNECTION_FILE", connection_file, True, None, summary, tags)
if sd_draft["errors"] == {}:
arcpy.StageService_server(sd_draft_file, sd_file)
arcpy.UploadServiceDefinition_server(sd_file, connection_file)
at CreateMapSDDraft the following error occurs: File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\mapping.py", line 398, in CreateMapSDDraft
return convertArcObjectToPythonObject(arcgisscripting._createMapSDDraft(*gp_fixargs([map_document, out_sddraft, service_name, server_type, connection_file_path, copy_data_to_server, folder_name, summary, tags], True, False)))
Error Info:
The system cannot locate the object specified. I checked - the paths to the connection file and the mxd file are correct. We are also running on the latest Version. But I cant find any sd files on the server for existing services. Any idea, why I cant find those files? Any help, very welcome.
... View more
01-13-2017
02:23 AM
|
0
|
5
|
1614
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|