|
POST
|
Are you dealing with an abnormally large number of services or instances per service? I've seen this have an impact on service manipulation performance. If the ArcGIS Server Manager web site is not deleting the services fast enough then you could always try deleting them through Arc Desktop (which might be marginally faster), or even resort to manually removing the service definitions from the file system. Specifically, in the config-store and directories/arcgissystem/arcgisinput sub-folders beneath the arcgisserver directory.
... View more
03-25-2013
01:56 PM
|
0
|
0
|
868
|
|
POST
|
In 10.1 sp1 I can avoid a service locking my SDE data by unchecking the "Lock Database Schema" box. This option is not available for a geoprocessing service. Is there a reason that it is missing, or a way for me to disable the schema locking for geoprocessing services? Thanks in advance. Hi Matt, I am unsure know why Esri does not expose a "Lock Database Schema" option for Geoprocessing services, but it may be possible for you to control this behavior programmatically. If you create a lightweight Server Object Extension (SOE) for Geoprocessing services, you should be able to implement the Construct method off the IObjectConstruct interface and disable (or enable) schema locking on the workspace factory (and all workspaces it creates/manages). Here is a quick/untested code snippet that you can try.
private IServerObjectHelper _serverObjectHelper;
private IWorkspace _workspace;
public void Init(IServerObjectHelper serverObjectHelper)
{
_serverObjectHelper = serverObjectHelper;
_workspace = (_serverObjectHelper.ServerObject as IGeoDataServerObjects).DefaultWorkingWorkspace;
}
public void Contruct(IPropertySet propertSet)
{
// Disable schema locking
(_workspace.WorkspaceFactory as IWorkspaceFactoryLockControl).DisableSchemaLocking();
}
... View more
03-25-2013
01:43 PM
|
0
|
0
|
594
|
|
POST
|
Can you describe in more detail the process you're using to publish your service? You mentioned using a service definition file. Is that still the case or do you have a map document (MXD) available that you could use for the publishing?
... View more
03-21-2013
09:14 AM
|
0
|
0
|
787
|
|
POST
|
Hi Kevin, The rows you are seeing in the analysis results window are possibly due to having the "Feature Access" capability enabled. Have you tried disabling "Feature Access" under the "Capabilities" category and then reanalyzing to see if that clears up these errors / warnings? Also, I am surprised that "Mapping" is not among your list of service capabilities. It should always be enabled/available for Map Services.
... View more
03-20-2013
01:10 PM
|
0
|
0
|
787
|
|
POST
|
If I have a multimachine site, what is the best way to restart arcgis server? Is it harmful to go into the Windows Service manager and restart the ArcGIS Server service there? Would I need to do this on all machines in the Site? Kirk, Restarting the "ArcGIS Server" Windows Service on each machine registered with a given ArcGIS Server "site" is a fairly heavy-handed approach. This will effectively stop all service instances and their associated ArcSOC processes, but it will also terminate the Java runtime processes that ArcGIS Server relies on. There are more light-weight approaches for you to consider if your goal is to simply recycle your services. You could script the restart operations using Python web requests against the ArcGIS Server Administrator REST endpoint. Or you could manually restart each machine via the ArcGIS Server Manager web site (Under "Site" --> "Machines"). Another option is to use an administrative connection to your ArcGIS Server site via Arc Desktop. There is a nice little user-friendly UI that exposes the ability to start and stop machines in that site. From my experience, each of the options above accomplishes the same thing in terms of recycling any ArcSOC/service instances, but restarting the Windows Service will also recycle the Java processes whereas the other approaches will not. Other factors are whether or not you intend to automate (script) the process and what level of administrative access you have to each machine registered with the ArcGIS Server site (i.e. do you have the ability to log into a machine and manipulate its Windows Services). Hopefully one of the approaches above fits your scenario.
... View more
03-07-2013
08:07 AM
|
0
|
0
|
7839
|
|
POST
|
I have encountered the "ClassFactory cannot supply requested class" error several times over the course of upgrading my 10.0 SOEs to 10.1. In spite of my best efforts to manually update my existing project files with the new 10.1 build targets and other elements, I ultimately had to just bite the proverbial bullet and create brand new SOE projects using the 10.1 template and port over all my code. For one particular SOE I actually had to recreate its project from the 10.1 template (SOAP) a second time because of the "ClassFactory cannot supply requested class" error thrown during service startup.
... View more
03-05-2013
08:17 AM
|
0
|
0
|
1959
|
|
POST
|
I am working with a 10.1 SDE geodatabase that contains hundreds of tables, feature classes, and mosaic datasets. This geodatabase has been successfully registered with ArcGIS Server (10.1). Now I am trying to create a Geodata Service (in ArcCatalog) using the same SDE connection file that was used when the geodatabase was registered with ArcGIS Server, but the whole process grinds to a halt with no sign of progress during the Analyze/Publish step. My hope is that it will eventually finish if I leave ArcCatalog running (~1hr in at the time of this post), but what I'd like to know is what is causing this process to take so incredibly long and whether or not there is any to speed it up. On a related note, I also tried the "Stage Service" Geoprocessing Tool to try creating an SD file using an SD-Draft. This approach appears to suffer from the same performance problem as the Publish Service wizard. Has anyone else ran into a similar issue?
... View more
01-23-2013
07:15 PM
|
0
|
2
|
2290
|
|
POST
|
Hugo, I've observed very long delays during the "analyze" and "packaging" phases of creating services. The exact cause isn't always clear, but there are a few things we can check. First off, is your enterprise geodatabase registered with ArcGIS Server? Any unregistered data that you are trying to expose would be copied to the server, which could explain the long "packaging" time. The second note is that analyzing and packaging service definitions can take many minutes or even hours (based on my experience) if you are working with very large datasets. Have you allowed the ArcMap instance to just continue running while you work in a separate session? I had to resort to this during the analysis step of publishing a Geodata Services from a geodatabase with hundreds of feature classes and tables.
... View more
12-20-2012
09:53 AM
|
0
|
0
|
1359
|
|
POST
|
Thanks Domenico for the reply - I will try that. But basically, if you create a service using the ArcGIS Admin REST API, all updates have to be done via the API vs other methods (such as updating a service in ArcMap through the share dialogue)? IMO, either this is a bug (because the update process just failed without any error message), or ESRI needs to lay this out more clearly in the documentation. Richard, I am still trying to figure out all the correct workflows...10.1 is completely different from past versions. I used the 10.1 Admin REST API method with JSON as described above because it was the easiest way to spin up my 10.0 services in 10.1 - but if I can't update them easily, then that method is not what I should have used. Now I'm thinking I may need to convert my JSON to .sddraft documents and then start the services from there. While I can't explain the strange behavior using the Desktop tools (the Share/Publish dialog just disappears?), I think there is a path from start to finish using ArcPy and the AGS Admin REST endpoint. To create a Map Service from an MXD, you would use: [INDENT]CreateMapSDDraft --> .sddraft --> AnalyzeForSD --> .sddraft --> StageService --> .sd[/INDENT] Once you have your .sd file, you should be able to script the creation of the service as you already are (based on this example) Then, to edit your Map Service properties and apply a new/modified Map Document, you would use the same steps from above to create the .sd file from the .mxd and then (as Domenico recommended) script your Python to invoke the Edit Service REST function. One seemingly important note from the "Edit Service" documentation: "Any other properties that are left out of the JSON are not persisted by the server." It sounds like "Edit Service" pretty much recreates the service using whatever properties you specify, so be sure to set any values you used during initial service creation, even if they are not changing. Worst case scenario if "Edit Service" is not doing the trick, you could always Delete and recreate it entirely with your updated properties.
... View more
12-20-2012
09:35 AM
|
0
|
0
|
1332
|
|
POST
|
Michelle, You can certainly use this forum to post your code for other users to evaluate and help you with. Another good resource is GIS StackExchange.
... View more
12-11-2012
05:21 AM
|
0
|
0
|
413
|
|
POST
|
Hi Tom,
public MyCustomTypeCollection(string namespaceURI) : base(namespaceURI) { }
... In the "passed in" case ArcGIS Server is supplying the namespace when instantiating MyCustomTypeCollection. How is the namespace being set when it instantiates the MyCustomType's contained in that collection? I haven't verified this but I always assumed the typeNamespace parameter of the GetObject method was ultimately passed all the way through to the collection type's constructor. Regardless, I can definitely confirm that the parameterless-constructor w/ a static/hard-coded namespace value passed to the base constructor works fine in both AGS 10.0 and 10.1. No, I don't have a working debugger; ArcGIS Server is on a different machine than my development workstation. I have been logging for debugging. This makes troubleshooting more challenging. Even with the ability to develop and debug locally on the server, it still took me several days to work through all the deserialization issues in 10.1 and correctly implement the workaround (as described in NIM-083300). Are you performing the 64-bit regasm.exe assembly registration each time you rebuild and redeploy your SOE code? I would also highly recommend developing on the server if that option is available to you. The reasons for some of the tougher issues I ran into were not apparent until I was able to actively debug the SOE. One last quick set of thoughts and things to try: The fact that you can pass a single custom type object as an input parameter to an SOE method tells me that your namespaces, XML type-mapping file, and SOE assembly registration (i.e. w/ the 64-bit version of regasm.exe) are correct. You are inspecting the SOAP message you send, but it might also be a good idea to inspect that message once it reaches the SOE. The code snippet below will help support that:
public static string Read(this IMessage message)
{
string xml;
XMLStreamClass xmlStream = new XMLStreamClass();
message.WriteXML(xmlStream);
xml = xmlStream.SaveToString();
return xml;
}
You may want to try just working with your collection type directly in the SOE, e.g. explicitly instantiate a collection object, add items to it, cast it, etc., just to make sure it is a valid class at runtime. I ran into a situation where multiple versions of my assemblies were somehow being registered, which was causing type conflict errors that were being swallowed unless I was actively debugging the code. Add some logging inside the Deserialize method of the "MyCustomType" class. This method will be called for each object that was passed in the collection, so writing to the log from here will give you an idea if the code is even making it this far or if the "invalid cast exception" is being thrown earlier.
... View more
12-10-2012
09:16 AM
|
0
|
0
|
1374
|
|
POST
|
Are you able to actively debug your SOE as it runs? My guess is that the cast-exception is stemming from this line: MyCustomTypeCollection myTypeColl = (MyCustomTypeCollection)reqParams.GetObject(idx, c_ns_soe, "MyCustomTypeCollection"); It should be equivalent to what you already have, but you can also try using type attributes instead of hard-coding the "MyCustomTypeCollection" string. E.g.: typeof(MyCustomTypeCollection).Name I bring this up since it was another difference I noticed after examining my code. I'll post tomorrow an example of a custom type w/ a custom type collection attribute.
... View more
12-05-2012
01:59 PM
|
0
|
0
|
1375
|
|
POST
|
I've carefully constructed my XmlSupportAdot.dat file (everything works if I just send an instance of my custom type and not an array so I know this file is getting seen). Is there an entry in your XmlSupportAdot.dat file for the MyCustomTypeCollection class? Sounds like there most likely is but I wanted to confirm. Beyond that, all the code examples you shared look correct to me. There are a few minor differences between your prototype and the code I've developed: I only have a parameterless constructor for my Collection class (and pass a static namespace value to the base constructor). The Collection object that is passed to my SOE methods is actually an attribute of a different custom class; I don't pass the Collection object by itself. With that said, I don't believe either of these differences would cause the classic deserialization error you're seeing. I'll take another look at your post and let you know if I can come up with any other ideas.
... View more
12-05-2012
11:10 AM
|
0
|
0
|
2045
|
|
POST
|
Erin, the originator of this thread, writes that a SOAP SOE was written that successfully sends an array of strings as input. I have a working SOAP SOE that takes a custom type but have had no luck with sending arrays (either with my custom type or even with simple types). Does any one know of samples out there that show the correct syntax for this? Tom, While I do not know of any online samples, I can at least provide you a few code snippets to illustrate how to use arrays as SOE method inputs. The first snippet is from the hand-rolled WSDL for the SOE. It demonstrates how to define a SOAP method with a string array input parameter.
<xs:element name="GetStuffByStringArray">
<xs:complexType>
<xs:sequence>
<xs:element name="aStringArray" type="ArrayOfString" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetStuffByStringArrayResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="resultString" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element> Note that ArrayOfString is an XML type defined in the Esri namespace. On the ArcObjects side, this XML type can be translated as an IStringArray object as demonstrated in the code block below:
private void GetStuffByStringArray(IMessage request, IMessage response)
{
// Begin by parsing the string array from the request parameter.
IStringArray stringCollection;
int fieldIndex = Utility.FindFieldIndex("aStringArray", request.Parameters, true);
stringCollection = request.Parameters.GetObject(fieldIndex, Utility.EsriNamespace, "ArrayOfString") as IStringArray;
// Do something with the string values...
} Creating an SOE method that takes an array of custom type objects involves a bit more work. I'm happy to provide more detail but here are the essential concepts: 1) Create a new class (e.g. MyTypeCollection) that is derived from SerializableList<T> where T is your custom type that you want to pass a collection of. This collection class will be the type that the SOAP parameter can be deserialized into. 2) Define a corresponding XML type for MyTypeCollection. It will look something like the following:
<xs:complexType name="MyTypeCollection">
<xs:sequence>
<xs:element minOccurs="0"
maxOccurs="unbounded"
name="MyType"
type="tns:MyType"/>
</xs:sequence>
</xs:complexType>
3) Then, in your SOE code itself, deserialize the input parameter using code similar to the following:
MyTypeCollection collection = new MyTypeCollection();
int fieldIndex = Utility.FindFieldIndex("myTypeCollectionInput", request.Parameters, true);
collection = request.Parameters.GetObject(fieldIndex, Utility.CustomTypesNamespace, "MyTypeCollection ") as MyTypeCollection;
Note that your custom types/classes will need to implement the Deserialize and Serialize methods of the IXMLSerialize interface, and each custom type will need an entry in your XML type mapping file. Those topics are covered in detail in Esri's SOE samples. Hope this helps!
... View more
11-27-2012
06:35 AM
|
0
|
0
|
2045
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-18-2015 01:41 PM | |
| 1 | 11-07-2014 11:58 AM | |
| 1 | 01-22-2015 08:01 AM | |
| 1 | 02-18-2015 08:18 AM | |
| 1 | 04-17-2015 03:14 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|