|
POST
|
Another question Bjorn, if you don't mind: Currently I've got token based security working via httpservice and my own custom login window. The window captures not just the service credentials but also other user info... name, phone no, email address, etc... Can the login window for the IndentifyManager be customized to handle more user input besides the service user/password combo?
... View more
12-28-2011
02:58 PM
|
0
|
0
|
718
|
|
POST
|
Yes, all you have to do is enable the IdentityManager. It will take care of prompting users to login for ArcGIS Servers that have been secured using token-based authentication. and then using that token as appropriate. "The Identity Manager is a singleton class that, when enabled, will manage the credentials for ArcGIS Server resources secured using token-based authentication. Note that only ArcGIS Server versions 10 SP 1 and greater are supported." http://resourcesbeta.arcgis.com/en/webapis/flex-api/apiref/com/esri/ags/components/IdentityManager.html Wow, ok. That's great.
... View more
12-28-2011
02:45 PM
|
0
|
0
|
718
|
|
POST
|
I'm having a look at the Edit Secure Service sample and am stumped on how the initial login window is created, initialized and interacts with the IdentityManager instance and then how the IdentityManager passes token to the intended feature service for loading. Is all that part of the enabling of the IdentityManager instance or is there code that sets the loginWindowClass property, gets the token, etc., etc.? That login window seems pretty customized, so there's gotta be some code around there somewhere. I'm just not getting the full picture with how this sample works. Thanks, -Royce
... View more
12-28-2011
01:28 PM
|
0
|
6
|
1095
|
|
POST
|
Royce, So have you tried to submit a graphic that has a null for geometry as in the sample (which by the way is editing a related Flat table). private function voteImage_clickHandler(event:MouseEvent):void
{
const voteRecordAttributes:Object = {
sf_311_serviceoid: selectedGraphic.attributes.objectid,
datetime: new Date().getTime(),
agree_with_incident: 1
};
const voteRecord:Graphic = new Graphic(null, null, voteRecordAttributes);
const incidentVoteTable:FeatureLayer = new FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/1");
incidentVoteTable.addEventListener(FeatureLayerEvent.EDITS_COMPLETE, incidentVoteTable_editsCompleteHandler);
incidentVoteTable.applyEdits([ voteRecord ], null, null);
} I hadn't but just did and damned if it didn't work. The reason I paid little attention to the sample is because I have another app that is doing it by just supplying the attributes as my previous post shows and it works just fine... So I was stuck on the "it can't be my code" delusion. In any case, your suggestion works, even though creating a "graphic" without any geometry is strange. It's good enough for me. Thanks much.
... View more
11-29-2011
01:15 PM
|
0
|
0
|
1258
|
|
POST
|
Royce, I Believe you need to submit a graphic to the applyedits no matter what as in this sample: http://help.arcgis.com/en/webapi/flex/samples/index.html#/Editing_a_related_table/01nq00000020000000/ Thanks Robert but I think it only needs to be a graphic if the layer you are editing is a feature class. If the layer is a stand alone table, you can just pass the attributes as my code snippet shows. The documentation for FeatureLayer within the Flex/AGS API pages states, "The feature layer can be used to display features from one single layer of either a Feature Service or a Map Service. The layer can be either a (spatial) layer or a (non-spatial) table. The features in a FeatureLayer can be edited if it is based on a Feature Service. " The applyedits method documentation does not state one way or another if the edits can only be to graphical features. Also, this according the the AGS REST API feature service documentation: "Records to be added to a table should not include the geometry." Lastly, I can go to the web interface for the stand alone table within the feature service and add a "null" record from within the "applyedits/adds" operation... as in [{}]... and the record is added to the table just fine. (see the attached png image).
... View more
11-29-2011
12:48 PM
|
0
|
0
|
1258
|
|
POST
|
I'm still having this issue and not sure how to proceed debugging it. Here is some more detail on what triggers the above exception: I create an object as follows. This only has attributes since the feature layer that is getting the new record is a stand alone table.
_accountObject=
{
"attributes":
{
"OBJECTID":null,
"LASTNAME":txtLastName.text,
"FIRSTNAME":txtFirstName.text,
"EMAILADDRESS":txtEmailAddress.text,
"PHONENUMBER":txtPhoneNumber.text,
"CREATIONDATE": new Date().toString(),
"LASTUPDATE": new Date().toString()
}
}
Then invoke the "applyedits" method against the _accountTable stand alone table FeatureLayer with the above object.
_accountTable.applyEdits([_accountObject], [], [], new AsyncResponder(applyEditsResults, applyEditsFault));
The exception noted in the OP is what comes next. Neither applyEditsResults or applyEditsFault get invoked.
TypeError: Error #1034: Type Coercion failed: cannot convert Object@ee7f749 to com.esri.ags.Graphic.
at com.esri.ags.layers::FeatureLayer/http://www.esri.com/2008/ags/internal::editHandler()
at mx.rpc::AsyncResponder/result()
at com.esri.ags.tasks::FeatureLayerTask/handleApplyEdits()
at Function/http://adobe.com/AS3/2006/builtin::call()
I've verified that the object referenced in the exception is "_accountObject". So, I'm not sure why the exception is happening since the feature layer object represents a table and not feature class... Why FeatureLayer.as is trying to convert it to a graphic is escaping me. Once again, it needs to be noted that I am using the Flex/AGS 2.4 API against 10.1 b2 AGS installation.
... View more
11-29-2011
09:54 AM
|
0
|
0
|
1258
|
|
POST
|
i would call gmail significant but not particularly complex. and anyway, geez, that's google. who else has google's engineering resources? the trend for years, at least server side, has been towards more dev productivity (eg, coldfusion), not less. i don't get the rush backwards. one, i think important, point i forgot to mention is the apple/canvas tag HTML5 boogeyman. flex will soon be opensource (except for the tooling & player--which i think adobe simply can't OS because they license stuff in the player). we could soon be faced with a different proprietary overlord, but instead of a fairly open adobe we get apple, who's ideas of technology seem to be more penal colony than their "1984" commercial suggested way back when. I've been trying to immerse myself in a logical, well rationed understanding of all of this and am 100% in line with your analysis and won't add anything to it. Too bad the news Adobe is dribbling out re Flex/Flash is not being done in a crystal clear fashion and is serving to needlessly spook a lot of impatient, easily spooked folks.
... View more
11-28-2011
07:56 AM
|
0
|
0
|
359
|
|
POST
|
simpsonr, i have the same problem ... i wanna do something like you.. save the user .. but i cant.. im new in flex... i have a question about your solution.. where you place the fl.addEventListener(FeatureLayerEvent.EDITS_STARTING, editsStartingHandler); what is this "fl" can you help me??? Thanks.. Sure, "fl" would be a reference to a FeatureLayer object to which I'm adding an event listener. It would have been created thusly: var fl:FeatureLayer = _currentEditor.featureLayers[0];
... View more
11-10-2011
09:46 AM
|
0
|
0
|
516
|
|
POST
|
UPDATE: Darn. Even though I had to make the below change, the original error is still present. Wow, that took a lot of time to debug. Answer: When doing updates to standalone table as in "myFL.applyEdits([], updatedRecords, [], new AsyncResponder(onUpdateResults, applyEditsFault));" The updatedRecords array of attributes JSON objects at AGS version 10 needed to have ObjectID written like: "objectId". At version 10.1 b1 it needs to be written like "OBJECTID". As in: [{ "attributes": { "OBJECTID":677, "fieldA":"0", "fieldB":"1" } } ] Fun times.
... View more
11-09-2011
09:15 AM
|
0
|
0
|
1258
|
|
POST
|
Hello All, I've got a stand-alone table published as a "feature layer" in a feature service that I'd like to be able to add/update/delete records. What is the best way to do this? Right now I create the featurelayer, then create a "map" object, add the feature layer to it and then do what I need to do. However, recently I've been getting the below exception and not able to pin down why it's happening. My guess is Object@ee7f749 is a record in the featurelayer, but since that object isn't a feature but a record (without geometry), things are getting messed up. I am running this against 10.1 b1 service with Flex/AGS API 2.4. TypeError: Error #1034: Type Coercion failed: cannot convert Object@ee7f749 to com.esri.ags.Graphic.
at com.esri.ags.layers::FeatureLayer/http://www.esri.com/2008/ags/internal::editHandler()
at mx.rpc::AsyncResponder/result()
at com.esri.ags.tasks::FeatureLayerTask/handleApplyEdits()
at Function/http://adobe.com/AS3/2006/builtin::call()
... View more
11-07-2011
08:07 AM
|
0
|
7
|
1941
|
|
POST
|
Royce, Don't perform step 6; this isn't needed for Oracle since there's no database name to register (we're fixing this topic). If you do the other steps, though, this should work. -Kim Thanks Kim. Can you create multiple sde services while using remote databases? If so, what is the procedure? One thing to note that might not have been clear in the OP is the fact that I'm attempting to get these multiple sde services up on a separate machine than the actual Oracle database. With that in mind, it seems the real issue lies back at step 5. When I run the "sdeservice -o create" command, it never uses the copied dbinit file that was created in step 2 and just overwrites the original "dbinit.sde" for the new service that I'm trying to create. In the dbinit.sde (and copied one) I'm not using the "ORACLE_SID" variable... that fails because this is a remote db. Ironically, I need to use the "LOCAL" connection variable. So, I go into the newly created and overwritten "dbinit.sde" file and change the default "ORACLE_SID" variable name to "LOCAL".
... View more
10-24-2011
03:01 PM
|
0
|
0
|
344
|
|
POST
|
Royce Thanks for the feedback! What type of service are you creating. Is it a map service or feature service? thanks Gary Feature Service was my original need but I've discovered that it doesn't matter. The results mentioned above happen with or without feature service. I do have further update on this. Currently we maintain an SDE schema database and have users that have various permissions. Today I created a new "test" user and created an all new "user-schema geodatabase" off of the master sde schema database. I then added a feature class and a standalone table in that new user-schema gdb. Added those to arcmap and was successful at publishing the service. So, something just isn't right with our current setup as far as 10.1 goes but that strategy has worked from 9.3 through 10.0x.
... View more
10-19-2011
02:37 PM
|
0
|
0
|
653
|
|
POST
|
I've got two MXDs with the same exact data except one is connected to 10.1 SDE and one is connected to 9.3 SDE. There is one feature class layer and one standalone table in the MXDs. I can successfully publish a service via ArcMap 10.1 from the MXD that is pointing to the 9.3 SDE but can't publish a service pointing to the 10.1 SDE. I get an "unidentified error". Now, if I remove the standalone table from the MXD that's pointing to the 10.1 SDE, the service publishes just fine. If I add the table back to the MXD... fail. Can anyone else try this and see if you get the same results... assuming you've got 10.1 SDE up and running. Not sure if this is an AGS issue or an SDE issue... In ArcMap, the table acts just fine. I can edit it, view it, etc... This works fine with 10.0x AGS pointing at a 9.3x SDE database. UPDATE: If I access the standalone table via the "SDE" user data connection, I can publish the service just fine. If I go back to my designated user connection which has read/write/etc... (I can edit the table in arcmap just fine), the publish fails. Note however, that you can't just add a stand alone table to ArcMap and publish/share that as a service. You need to add in at least one feature class. Not sure why that is required and hopefully that restriction will be lifted in subsequent releases.
... View more
10-18-2011
01:33 PM
|
0
|
4
|
2804
|
|
POST
|
I'm trying to setup ArcSDE 10.1 on a Win Server 2003 with multiple SDE services pointing at two Oracle DBs running on Sun/Unix. I've got a single SDE service up and running fine and am able to connect to the one of the DBs via ArcCatalog both through direct connect and ArcSDE service. I need to create a second service that is pointing to a second gDB. I've got the direct connection setup and am looking at this doc but it doesn't seem to be worded correctly. In fact, if you follow this documentation you get errors and things get gummed up. This Oracle section looks like it was lifted from the Informix section and never re-written for the specifics of Oracle. http://resourcesbeta.arcgis.com/en/help/main/10.1/index.html#/Setting_up_multiple_ArcSDE_services_on_one_Windows_server/002n0000000t000000/ Is there better documentation on how to do this? Anyone else attempting to do this? Am I jumping the gun with beta 1?
... View more
10-18-2011
01:22 PM
|
0
|
3
|
829
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-21-2020 10:08 AM | |
| 1 | 05-30-2018 02:39 PM | |
| 5 | 02-13-2015 10:07 AM | |
| 3 | 12-03-2019 09:48 AM | |
| 1 | 10-22-2015 01:15 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-24-2021
06:29 PM
|