Select to view content in your preferred language

Custom SOE in ArcGIS Server 10 - REST API - InValid URL

5113
11
06-05-2011 02:15 PM
GovindarajanThillaividankan
Deactivated User
Hi

I am working on developing a Custom SOE using ArcGIS Server 10  SP 2 and .Net 3.5 Framework. This SOE is for performing Network Analysis on a Utility Network.

Issue: Clicking on the Custom SOE listed in the supported extensions in the services directory (in IE) displays Invalid URL

Description: I have developed the SOE using ESRI .Net REST Template in VS 2008 and registered it as per the instructions. The SOE has been enabled on a map service and the custom property page implemented for ArcCatalog using which I am able to assign the parameters. The values are properly getting stored in the MapService .cfg file. The SOE is also recorded in ServerTypesExt.dat file in the ArcGIS Server home server/system folder

But when i access the service URL in IE

http://127.0.0.1/ArcGIS/rest/services/CWTrace/MapServer/exts/TracingSOE_CleanWater

I get a message InValid URL.

After many attempts, I found this to be a bug identified in ArcGIS 10 pre-release i.e. 9.4 Beta 2.

ESRI Wikis - ArcGIS Server 10 PreRelease known issues:
NIM052845  Supported Extensions link in Services Directory should be shown only for Custom Server Object Extensions. Currently clicking on this link will return an "Invalid URL" error message.
Issue in:   9.4 Beta 2
But the status of this bug according to ESRI is closed as on Jan 2010.

Is anyone experiencing similar problems? pls let me know.

Secondly I used a simple .Net application to access the SOE using IServerObjectManager and i am able to access the SOE. This was used with IRESTRequestHandler interface to invoke the  GetSchema method which returns the values properly.

Inspite of these the problem continues and left clueless where it is going wrong.

Regards

Govindarajan
GIS Consultant
0 Kudos
11 Replies
RichardWatson
Deactivated User
0 Kudos
GovindarajanThillaividankan
Deactivated User
Dear All

I finally solved the problem. It was a problem relating to the SOE Name assigned in the SOE class.

public SOEClass()
        {
            soe_name =this.GetType().Name;  //Ensure that the name is same as SOE Name
            logger = new ServerLogger();
            reqHandler = new SoeRestImpl(soe_name, CreateRestSchema()) as IRESTRequestHandler;
        }

this.GetType().Name returns the assembly-qualified name of the type. If you are using this.GetType().Name ensure that u use the same thing everywhere.

There are three places where the SOE name should perfectly match.

a) The SOE name used in the SOE class consructor
b) The name used in the SOE Registration class
c) The name used in the Property page, if you are using ArcCatalog Property pages

Thanks to rlwatson for responding to my query.

Now i am able to work with the REST Requests.

Hope ESRI will update its training manual to add some checklists. The tutorial on REST API mentions only two of the above mentioned places in the code where care needs to be taken regarding the SOE Name

Regards

Govindarajan
GIS Consultant
0 Kudos
ChapalChoudhury
Emerging Contributor
Hi Govindarajan,

I've got exactly same error message (Invalid URL) for a SOE created for advanced Print (see another forum http://forums.arcgis.com/threads/24059-Java-Print-SOE-Advanced-print-solution?p=110774#post110774).

I wonder you might be able to point me to a right direction to fix this problem.

The PCHPrintSOE works perfectly on my staging environment, which runs on a single machine (SOC/SOM/Web Services) config. I can browse the REST map service down to the PCHPrintSOE property page.

However, when I deployed it to my Production Envrionment, which is a 2-machines configuration, I get the �??Invalid URL�?� message.

Machine1 (Win 2008 R2) running ArcGIS SOC/SOM (I copied and registered the PCHPrintSOE.jar on this machine)
Machine2 (Win 2008 R2) running IIS7 and ArcGIS Web Services

I can browse the REST map service down up to the Map Service, but cannot browse further to the PCHPrintSOE property page and it gives �??Invalid URL�?� message.

Do I need to do something special (any extra settings) to deploy this SOE on a 2-machine configuration?

Thank you in advanced for your help.

Chapal
0 Kudos
GovindarajanThillaividankan
Deactivated User
Mr.Chapal

First i have not done this using JAVA but i did the development using .Net. So i given the standard checklists for .Net based development. Not sure whether it is applicable for Java based app framework.

Since you had mentioned that it is working on the dev system, i assume that the coding has been done properly. Also i am assuming that you hae registered the SOE properly.

You had mentioned that it is relating to two machine configuration. Note that the MXD path being referred by the mapservice should be stored in a folder location on the individual SOCs and ArcSOC user account be given read-write privilege on this folder. Maintain the same folder structure in both the SOC systems.

Also check the logs in the ArcGISServerHome/server/user/log folders.

In the constructor event of SOE use try..catch and write a message to the logger. Then start the Mapservice. The SOE gets initialised. This is when the exceptions, if any, would be caught and written to the server logs. Of course set the Server log level to DETAILED INFO . Now stop the service and check the logs.

The parameters if any that u are passing to this using ArcCatalog property pages, if any shall be retrieved in the IObjectConstruct construct method. Check whether this one is working using logger. If all of these work well then i feel there shouldny be any problem.

Also check whether your app in the prod server is trying to access content behind any firewall.

Let me know if you face any problem

Regards

Govindarajan
0 Kudos
ChapalChoudhury
Emerging Contributor
Hi Govindarajan,

Although it's not fixed yet, we're now working with the Java developer and ESRI Support. Once we  get a fix, I'll update the forum, would it be relevant for others.

Thank you very much for your advise.

regards,

Chapal

Mr.Chapal

First i have not done this using JAVA but i did the development using .Net. So i given the standard checklists for .Net based development. Not sure whether it is applicable for Java based app framework.

Since you had mentioned that it is working on the dev system, i assume that the coding has been done properly. Also i am assuming that you hae registered the SOE properly.

You had mentioned that it is relating to two machine configuration. Note that the MXD path being referred by the mapservice should be stored in a folder location on the individual SOCs and ArcSOC user account be given read-write privilege on this folder. Maintain the same folder structure in both the SOC systems.

Also check the logs in the ArcGISServerHome/server/user/log folders.

In the constructor event of SOE use try..catch and write a message to the logger. Then start the Mapservice. The SOE gets initialised. This is when the exceptions, if any, would be caught and written to the server logs. Of course set the Server log level to DETAILED INFO . Now stop the service and check the logs.

The parameters if any that u are passing to this using ArcCatalog property pages, if any shall be retrieved in the IObjectConstruct construct method. Check whether this one is working using logger. If all of these work well then i feel there shouldny be any problem.

Also check whether your app in the prod server is trying to access content behind any firewall.

Let me know if you face any problem

Regards

Govindarajan
0 Kudos
KarenRobine
Frequent Contributor
Hi Govindarajan,

Although it's not fixed yet, we're now working with the Java developer and ESRI Support. Once we  get a fix, I'll update the forum, would it be relevant for others.

Thank you very much for your advise.

regards,

Chapal



Hello CoffeySpatial:
I am VERY INTERESTED in the results you received from ESRI Support. I have EXACTLY the same problem you described (Invalid URL).
I've read through this entire posting and none of the other descriptions and results applies to my situation.
My SOE works perfectly on my machine, but when I went to install it in Production, I get the Invalid URL message. I put lots of debug messages. Everything seems perfect. My ArcCatalog application performs as supposed to. I'm seeing absolutely no error messages anywhere (I have debugging turned up everywhere).
But I cant get beyond the Invalid URL message.

Ideas? This seems to be the same as what you described.
Or if anyone else has ideas, please chime in.
I'm about to try installing Simple REST SOE at production to make sure I can get to the REST URL in general (to help isolate the problem).

Thanks.
Karen
0 Kudos
AhadKheirabadi
Emerging Contributor
Hi Govindarajan,

I want to access to NetworkAnalysis from SOE, but I couldn't find the way.

I think for accessing to NetworkAnalysis in Desktop we have this way:

Using application and CLSID like this:

     pID.Value = "esriEditorExt.UtilityNetworkAnalysisExt";
     pNetAnalysisExt = (INetworkAnalysisExt)app.FindExtensionByCLSID(pID);

But because I don't access to application, I can't use UtilityNetworkAnalysisExt. Do you have any suggestion for me?

Thanks.
0 Kudos
nicogis
MVP Alum
this is available for desktop. See how work with INetworkDataset http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/0001/000100000mrr000000.htm.
Are your sure that functionalies extension NA server available are not sufficient for your purposes ?
0 Kudos
AhadKheirabadi
Emerging Contributor
Thank you for your response,

I want to use NetworkAnalysis not NetworkDatasets.

As you know NetworkAnalysis is using for utility network and NetworkDatasets is usually using for road network.

In addition, I want to use them in ArcGIS Server not in Desktop.
0 Kudos