Rest Service problem

4095
7
Jump to solution
03-19-2015 02:53 AM
KK2014
by
New Contributor III

I have Rest Service and I can see that service in browser . But when I want to use in QT/QML application in "ArcGISTiledMapServiceLayer"  object ,give an error like below.How can I solve this problem or how can I use rest services like (..../MapServer or /FeatureServer). Example services are in arcgisonline like (http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer) for example I want to use my own services , how can I use my own services in application without arcgisonline?

Thanks

RestService.JPG

MapServerError.JPG

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

KK-

ArcGISDynamicMapServiceLayer isn't the layer you want for editing. This type of layer is for retrieving images from a server, similar to ArcGISTiledMapServiceLayer. The difference between these 2 is that the dynamic layer can be dynamically changed on the server, whereas the tiled layer has pre-generated tiles stored on the server.

If you are editing, you want to use the FeatureLayer and the GeodatabaseFeatureServiceTable/GeodatabaseFeatureTable. In MVC speak, the GeodatabaseFeatureTable is your model and the FeatureLayer is your view. In order to switch from online to offline, switch the feature table on the FeatureLayer from the GeodatabaseFeatureServiceTable to GeodatabaseFeatureTable. The "Local geodatabase editing" sample should show this concept.

Thanks,

Luke

View solution in original post

0 Kudos
7 Replies
LucasDanzinger
Esri Frequent Contributor

The code seems to look fine. Can you copy in the output from the console please? The only other things I noticed were you are still using 10.3 Beta, but we recommend using 10.2.5, which is a final release with the same capabilities. Also, you set up an extent. To simplify it (and make sure there aren't extent or spatial reference issues), can you make it so there is just a map with a tiled service in it, and nothing else?

0 Kudos
KK2014
by
New Contributor III

Here is my extend  in browser servis below:

extend.JPG

And here is my output from the console :

Starting C:\Users\tkoka\Documents\build-MapServer-Desktop_Qt_5_4_1_MSVC2013_OpenGL_64bit-Debug\debug\MapServer.exe...

QML debugging is enabled. Only use this in a safe environment.

Initializing application

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::registerTypes(const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeLicense(void) Invalid clientId QVariant(QString, "") status 1

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) Setting global image provider QVariant(void*, 0x522f100)

Rendering engine : OpenGL

ArcGIS.Runtime.Map: void __cdecl QmlMap::classBegin(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void) Adding 1 declared layer(s)

int __cdecl main(int,char *[]) ApplicationWindow_QMLTYPE_12(0x5785f70)

qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method

qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method

qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method

qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method

qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto

qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb

qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated

0 Kudos
JeanneTrieu
Occasional Contributor

Hi KK,

Do you still have an issue after moving 10.2.5? Did you try to run your application in release?

You will need to refactor your code in order to work with the latest release.

Regards,

Jen Trieu | Product Eng.

0 Kudos
KK2014
by
New Contributor III

Yes I have still an issue after moving 10.2.5

Here is my application below:

error110.25.JPG

Here is my error below:

error10.25.JPG

And my output console :

Starting C:\Users\tkoka\Documents\build-MAPServerApp-Desktop_Qt_5_4_0_MSVC2013_OpenGL_64bit-Debug\debug\MAPServerApp.exe...

QML debugging is enabled. Only use this in a safe environment.

Initializing application

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::registerTypes(const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeLicense(void) Invalid clientId QVariant(QString, "") status 1

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) Setting global image provider QVariant(void*, 0x51d22b0)

Rendering engine : OpenGL

ArcGIS.Runtime.Map: void __cdecl QmlMap::classBegin(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void) Adding 1 declared layer(s)

int __cdecl main(int,char *[]) ApplicationWindow_QMLTYPE_12(0x5a28830)

QSslSocket: cannot resolve TLSv1_1_client_method

QSslSocket: cannot resolve TLSv1_2_client_method

QSslSocket: cannot resolve TLSv1_1_server_method

QSslSocket: cannot resolve TLSv1_2_server_method

QSslSocket: cannot resolve SSL_select_next_proto

QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb

QSslSocket: cannot resolve SSL_get0_next_proto_negotiated

<RTC_ASSERTION>

Runtimecore Assertion Failed!

Condition: lods_size > 0C:\daily_d\rtc\runtimecore\map_renderer\include\map_renderer/tile_layer.h(87)

</RTC_ASSERTION>

The program has unexpectedly finished.

C:\Users\tkoka\Documents\build-MAPServerApp-Desktop_Qt_5_4_0_MSVC2013_OpenGL_64bit-Debug\debug\MAPServerApp.exe crashed

Starting C:\Users\tkoka\Documents\build-MAPServerApp-Desktop_Qt_5_4_0_MSVC2013_OpenGL_64bit-Debug\debug\MAPServerApp.exe...

QML debugging is enabled. Only use this in a safe environment.

Initializing application

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::registerTypes(const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeLicense(void) Invalid clientId QVariant(QString, "") status 1

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) Setting global image provider QVariant(void*, 0x4968180)

Rendering engine : OpenGL

ArcGIS.Runtime.Map: void __cdecl QmlMap::classBegin(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void) Adding 1 declared layer(s)

int __cdecl main(int,char *[]) ApplicationWindow_QMLTYPE_12(0x4fd82d0)

QSslSocket: cannot resolve TLSv1_1_client_method

QSslSocket: cannot resolve TLSv1_2_client_method

QSslSocket: cannot resolve TLSv1_1_server_method

QSslSocket: cannot resolve TLSv1_2_server_method

QSslSocket: cannot resolve SSL_select_next_proto

QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb

QSslSocket: cannot resolve SSL_get0_next_proto_negotiated

<RTC_ASSERTION>

Runtimecore Assertion Failed!

Condition: lods_size > 0C:\daily_d\rtc\runtimecore\map_renderer\include\map_renderer/tile_layer.h(87)

</RTC_ASSERTION>

QWaitCondition: Destroyed while threads are still waiting

C:\Users\tkoka\Documents\build-MAPServerApp-Desktop_Qt_5_4_0_MSVC2013_OpenGL_64bit-Debug\debug\MAPServerApp.exe exited with code 3

Starting C:\Users\tkoka\Documents\build-MAPServerApp-Desktop_Qt_5_4_0_MSVC2013_OpenGL_64bit-Debug\debug\MAPServerApp.exe...

QML debugging is enabled. Only use this in a safe environment.

Initializing application

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::registerTypes(const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeLicense(void) Invalid clientId QVariant(QString, "") status 1

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) Setting global image provider QVariant(void*, 0x353d7f0)

Rendering engine : OpenGL

ArcGIS.Runtime.Map: void __cdecl QmlMap::classBegin(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void) Adding 1 declared layer(s)

int __cdecl main(int,char *[]) ApplicationWindow_QMLTYPE_12(0x3d47330)

QSslSocket: cannot resolve TLSv1_1_client_method

QSslSocket: cannot resolve TLSv1_2_client_method

QSslSocket: cannot resolve TLSv1_1_server_method

QSslSocket: cannot resolve TLSv1_2_server_method

QSslSocket: cannot resolve SSL_select_next_proto

QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb

QSslSocket: cannot resolve SSL_get0_next_proto_negotiated

<RTC_ASSERTION>

Runtimecore Assertion Failed!

Condition: lods_size > 0C:\daily_d\rtc\runtimecore\map_renderer\include\map_renderer/tile_layer.h(87)

</RTC_ASSERTION>

The program has unexpectedly finished.

C:\Users\tkoka\Documents\build-MAPServerApp-Desktop_Qt_5_4_0_MSVC2013_OpenGL_64bit-Debug\debug\MAPServerApp.exe crashed

Starting C:\Users\tkoka\Documents\build-MAPServerApp-Desktop_Qt_5_4_0_MSVC2013_OpenGL_64bit-Debug\debug\MAPServerApp.exe...

QML debugging is enabled. Only use this in a safe environment.

Initializing application

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::registerTypes(const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeLicense(void) Invalid clientId QVariant(QString, "") status 1

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) Setting global image provider QVariant(void*, 0x3714db0)

Rendering engine : OpenGL

ArcGIS.Runtime.Map: void __cdecl QmlMap::classBegin(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void)

ArcGIS.Runtime.Map: void __cdecl QmlMap::componentComplete(void) Adding 1 declared layer(s)

int __cdecl main(int,char *[]) ApplicationWindow_QMLTYPE_12(0x469f4a0)

QSslSocket: cannot resolve TLSv1_1_client_method

QSslSocket: cannot resolve TLSv1_2_client_method

QSslSocket: cannot resolve TLSv1_1_server_method

QSslSocket: cannot resolve TLSv1_2_server_method

QSslSocket: cannot resolve SSL_select_next_proto

QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb

QSslSocket: cannot resolve SSL_get0_next_proto_negotiated

<RTC_ASSERTION>

Runtimecore Assertion Failed!

Condition: lods_size > 0C:\daily_d\rtc\runtimecore\map_renderer\include\map_renderer/tile_layer.h(87)

</RTC_ASSERTION>

The program has unexpectedly finished.

C:\Users\tkoka\Documents\build-MAPServerApp-Desktop_Qt_5_4_0_MSVC2013_OpenGL_64bit-Debug\debug\MAPServerApp.exe crashed

Thanks

0 Kudos
LucasDanzinger
Esri Frequent Contributor

KK,

Is it possible to share your service with us? It looks like there is an assertion thrown relating to something in the Levels of detail in the service. If you cannot let us use the actual service, can you please send a screenshot of the TileInfo on your service?

Thanks,

Luke

0 Kudos
KK2014
by
New Contributor III

Lucas ,

The problem solved when I use url into "ArcGISDynamicMapServiceLayer" but I want to do offline editing using my service in "Local geodatabase editing" sample.Can I do with "ArcGISDynamicMapServiceLayer" ?

Thansk.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

KK-

ArcGISDynamicMapServiceLayer isn't the layer you want for editing. This type of layer is for retrieving images from a server, similar to ArcGISTiledMapServiceLayer. The difference between these 2 is that the dynamic layer can be dynamically changed on the server, whereas the tiled layer has pre-generated tiles stored on the server.

If you are editing, you want to use the FeatureLayer and the GeodatabaseFeatureServiceTable/GeodatabaseFeatureTable. In MVC speak, the GeodatabaseFeatureTable is your model and the FeatureLayer is your view. In order to switch from online to offline, switch the feature table on the FeatureLayer from the GeodatabaseFeatureServiceTable to GeodatabaseFeatureTable. The "Local geodatabase editing" sample should show this concept.

Thanks,

Luke

View solution in original post

0 Kudos