Secure Map Rendering on Javabean based API

Hi,
I need to apply secure mapping functionality using Mapviewer’s JavaBean based API. I’ve created a secure data source by adding the plsql_package="web_user_info" statement on the data source definition. For testing purposes I’ve used mvdemo data set and followed the steps of Secure Map Rendering Demo. I created "web_user_info" package on mvdemo schema as well as a view on CUSTOMERS table (create or replace view customers_view as select * from customers where account_mgr = web_user_info.get_user) and a geometry theme: mycystomers on that view.
I also added the appropriate authenticated web users to the OC4J container(e.g. alex) and assigned them the "users" role.
Finally I included the relative path of JSP Demo (with mapclient lib) that resides at http://server:port/mapviewer/demo/mapinit.jsp to the <security-constraint> element of web.xml file so that the data source can get the web user name from J2EE user:
<!-- For Secure Map Rendering demos only -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure mapping demo page</web-resource-name>
<description>MapViewer secure map rendering demo</description>     
     <url-pattern>/demo/secure-mapping.html</url-pattern>
     <url-pattern>/demo/mapinit.jsp</url-pattern>
     <url-pattern>/demo/map.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>secure_maps_role</role-name>
</auth-constraint>
</security-constraint>
After authenticating to the http://server:port/mapviewer/demo/mapinit.jsp JSP demo through mapviewer's login page that was automatically generated because of the security-constraint, I filled in the required fields asking for base map: demo_map. I also modified "demo_map" by adding "mycustomers" theme to it. Unlike Oracle Maps Map Rendering Demo (http://server:port/mapviewer/demo/secure-mapping.html) that displays only those customers that belong to the authenticated user, the generated map does not display any customer data at all.
Does Secure Map Rendering Demo apply just for the Oracle Maps Javascript API and the XML API or is there any other parameter that I’m missing and needs to be configured in order for it to run for the JavaBean based API as well?
Any help on the above matter would be really appreciated.
Thanks in advance.

Hi,
The reason the JSP files did not show the secured customers, is because while you authenticated to the J2EE server when accessing these JSP files, the JSP file themselves did not authenticate to the J2EE server. In other words, there are two sessions involved. One session is between your browser and the J2EE server, which contains the authenticated user ID. This session is initiated when you try to open the mapinit.jsp page.
The other session is established when the JSP page (map.jsp) opens a new HTTP Connection to the server to send the XML map request generated from various JavaBean API calls. To be more specific, when the JSP page invokes MapViewer.run(), this method internally gathers all the themes/basemaps you have added to the client handle, then constructs a single XML map request out of these pieces of information. It then opens a HTTP connection back to the same server to send the XML doc to mapviewer for processing. The problem is that to the J2EE server this is a new session (initiated by map.jsp), and it does not contain any authentication info.
Because currently the JavaBean API does not support setting a cookie or user credential directly on its internal Http connections, there seems to be no easy work around for this issue for now. Please contact us offline if you would like to open an enhancement request.
Thanks
LJ

Similar Messages

  • Secure map rendering and the tile server

    Hi all,
    The demos for secure map rendering that I've seen e.g. mapviewer.ear/web.war/demo/secure-mapping.html involve sending an XML map request directly to mapviewer, and they work OK.
    However when I use a MVMapView JavaScript object and just pull back map tiles (no FOI), I see clear_user() being called but not set_user(). In other words my tiles are not being built securely. I don't see anything in the debug listing the values of cookies. Before I dig any deeper is secure map rendering expected to work with the tile server? Does the tile server know in such a case not to cache the tiles since one user's tile may contain different information than another user's view of the same tile?
    When pulling back FOIs with a MVMapView I do see debug info about the values of cookies, and the username is stated correctly in the debug. But still set_user() is not called! I'm sure that at least FOIs should be queried securely???
    BTW this is MapViewer 11gR1.
    Thanks
    Al

    Currently users and roles are not used when rendering tiles.

  • Secure Map Rendering - Javascript API

    Hello All
    I need to apply secure mapping functionality using Mapviewer’s JavaScript based API.Is it possible using cookie ?.Can you please give an example for this?
    Thank you

    Thanks for your prompt reply
    I do following things for secure rendering a map
    1) First created a SQL package
    CREATE OR REPLACE PACKAGE BODY web_user_info
    AS
    w_name VARCHAR2 (32767);
    PROCEDURE set_user (p_name IN VARCHAR2)
    AS
    BEGIN
    insert into test(testcol) values(1);
    commit;
    w_name := LOWER (p_name);
    END;
    PROCEDURE clear_user
    AS
    BEGIN
    insert into test(testcol) values(2);
    commit;
    w_name := null;
    END;
    FUNCTION get_user
    RETURN VARCHAR2
    AS
    BEGIN
    --insert into test(testcol) values(3);
    --commit;
    RETURN w_name;
    END;
    END;
    2) Then I created a view for my spatial table .
    CREATE OR REPLACE FORCE VIEW nb_view (node_name,
    src_file,
    mi_style,
    geom,
    mv_style,
    status,
    account_mgr
    AS
    SELECT "NODE_NAME", "SRC_FILE", "MI_STYLE", "GEOM", "MV_STYLE", "STATUS",
    "ACCOUNT_MGR"
    FROM node_boundary
    WHERE account_mgr = web_user_info.get_user;
    After that I created theme *(THEME_NB)* using this view
    3) And My Mapviewer configuration settings as like below
    <map_data_source name="mvtest"
    jdbc_host="192.168.5.120"
    jdbc_sid="sbcsptl"
    jdbc_port="1521"
    jdbc_user="mvtest"
    jdbc_password="HUBA8JhmUr15xuA9gRFnvT6iXhCyYcrQ"
    jdbc_mode="thin"
    number_of_mappers="3"
    allow_jdbc_theme_based_foi="true"
    plsql_package="web_user_info"
    web_user_type="MON_USER"
    />
    4) Finally my Cookie is settings as like below
    <script language="Javascript">
    var mapview;
    var basemap1 = new MVMapTileLayer("MVTEST.TILE_NB");
    var basemap2 = new MVThemeBasedFOI('basemap2', 'MVTEST.THEME_NB');
    function showMap() {
    set_cookie ( "MON_USER", "kk" );
    var baseURL = "http://192.168.5.116:7101/mapviewer";
    var mpoint = MVSdoGeometry.createPoint(1968376.0, 770568.7, 41129);
    mapview = new MVMapView(document.getElementById("map"), baseURL);
    mapview.addMapTileLayer(basemap1);
    mapview.addThemeBasedFOI(basemap2);
    mapview.setCenter(mpoint);
    mapview.setZoomLevel(2);
    mapview.display();
    mapview.addNavigationPanel();
    function set_cookie ( name, value, secure )
    var cookie_string = name + "=" + escape ( value );
    secure="secure";
    if ( secure )
    cookie_string += "; secure";
    document.cookie = cookie_string;
    </script>
    The issue in my case, set_user and clear_user is not executed properly.
    Thank You

  • Howto change property of javabeans based data control?

    Hi,
    I have a swing application which displays a combobox. This combobox is bound to a javabeans based model using ADF.
    The combobox is enabled/disabled based on a value in another combobox, so sometimes the combobox is enabled, sometimes it's not.
    We've currently implemented this using an action listener, which call comboBox.setEnabled(false).
    This works, but when you refresh the iterator binding for the panel, the combobox is always enabled. I assume this is caused by the fact that the adf xml file describing the javabean contains the following attribute: IsUpdatable="true".
    How can i programatically change this attribute? Can i set a property for the jcombobox control binding, or can i change the AttributeDef used by the combobox?
    Thanks,
    Andrej

    How do i programatically change an adf javabeans based control value from editable to not-editable?

  • Reading formulars and blank cells in Excel by POI event based API

    Hello at all,
    first sorry for my english.
    I have to read Excel files using the POI event based API.
    These files contain FormularRecords, whitch values are Strings.
    I googled a lot, but I didn't found a way, to get FormularRecords as string.
    This I need, because I have to compare the position of the Cell (row, column)
    with other values.
    An other way to get these cells is reading them as StringRecord or SSTRecod.
    But there is no method .getRow() or .getColumn() for StringRecords and SSTRecords.
    My other problem:
    Some cells without a value can not be read.
    Using the BlankRecord didn't catch all of them.
    When I go to these cells and just hit Return (no value is set), then the cells can be catched.
    Can anyone give me an idea?
    It really would be very helpfull.
    And I hope my english can be understood.
    thx a lot
    eichi

    Problem is solved,
    in the datastream the FornulaRecord appears before the StringRecord.
    I take the position from the Formula and value from the String.

  • A Map As a JavaBean Property

    I know how to create a JavaBean - zero argument constructor, private field variables, and public get and set methods to expose the properties.
    Now, I have created a Map object:
    Map map = new HashMap();
    map.put("sort", sort);
    map.put("order", order);
    map.put("offset", offset); How do I store this object as a property of a JavaBean?
    How do I later on retrieve what are in the 'map' from the JavaBean created?

    just as easy as this :
    class MyBean {
       private Map myMap;
       public void setMyMap( Map map ) {
          myMap = map;
       public Map getMyMap() {
          return myMap;
       // You can add more stuff if u want :
       public void addToMyMap( Object item ) {
          myMap.put( item );
       // and so on ...
    }--Behrad                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Templated predefined theme and JavaBean MapViewer API

    Hello,
    i have problems using a templated predefined theme and the JavaBean Mapviewer API.
    I defined a theme with a styling rule:
    <?xml version="1.0" standalone="yes"?>
    <styling_rules>
      <rule>
        <features style="MYSTYLE">id in ( select column_value from table(:1))</features>
      </rule>
    </styling_rules>When i use the javascript api i can provide the parameter to my Foi using a MVArrayParameter :
    var myparams = "\"aaa\",\"bbb\"";
    var myArrayPar = new MVArrayParameter(myparams,'sarray','id_list');
    myFoi.setQueryParameters(myArrayPar);id_list is a table of varchar2(64).
    This works fine in OracleMaps, but i have troubles to get this working with the JavaBean API.
    String[] sArr = new String[2];
    sArr[0] = "aaa";
    sArr[1] = "bbb";
    mv.addPredefinedTheme(themeName);
    mv.setPredefinedThemeParameters(themeName,sArr);
    ...This results in a theme node with two parameter nodes in the xml map_request:
    <theme name="MYTHEME">
      <binding_parameters>
        <parameter value="aaa" type="String"/>
        <parameter value="bbb" type="String"/>
      </binding_parameters>
    </theme>
    ...But the output does not include the theme. Instead i get this error message:
    2007-12-20 09:14:36.081 ERROR *** Exception while querying theme: MYTHEME
    2007-12-20 09:14:36.081 ERROR Exception fetching data for theme MYTHEME.How can i solve this problem?
    Thanks for help in advance,
    Dirk

    Hi Dirk,
    your type in this case is 'id_list' and the XML should be something like:
    <theme name="MYTHEME">
      <binding_parameters>
        <parameter value="aaa,bbb" type="id_list"/>
      </binding_parameters>
    </theme>
    ...However, if you are using version 10.1.3.1 (sending a direct XML request or using the API) it does not support this binding_parameter with a custom type. With version 11 preview that we posted recently, you should be able to send a direct xml request using the example above, but it seems that using the API, you will not be able to get the correct XML. We will check that.
    Joao

  • Is CS6 capable of 'Data Mapping' from an excel based database?

    I have CS6 and want to know if it is capable of data mapping from an excel based database.
    Basically i am using inDesign to create new Organisational Charts for my company. i have 23 seperate documents created, all of which conatin; 1 image box and 2 text boxes per each employee in that particular department.
    I want each document from inDesign to point at the database and pull in the correct details to each box within that document.
    I am aware of the 'place' feature but all this does is allow to you to select a range of cells and dump that in the document randomly.
    i have tried ringing adobe and they ponted me to here.
    I am a man on the edge with this... someone please help. Even if its to say 'NO' inDesign does not support this feature.
    Thanks in advance, Danny.

    Danity7 wrote:
    My companies views, much like my own (something which seems to be frowned upon in this forum 'opinions/views') when we have spent a considerable amount of money on the software, we belived the answer to using certain features or at least the answer to 'know' if the software is capable of doing a particular commend wouldnt come at an extra cost.
    Well, without more information on your data, the layout in ID, and how you expect to connect them, as Mike has already said, it's pretty hard to tell you what out of the box capabilities ID has that will work, if any, or where to point you to other commercial add-on products if they exist, or even to suggest a scripted solution, though my current reaction is that you are looking at some sort of XML workflow, which is well outside my own comfort zone.
    ID is a very complex program that has many more capabilities than what are "built-in" in the standard release versions. One of it's greatest features is the ability to expand what you can do through scripts or plugins. This forum is full of free advice, but very few participants are willing to to spend more than an hour designing a custom solution that will not be useful to anyone else unless they are compensated. The people who respond here are professionals, like you, who need to make a living. If I were paid for the time I spend here handing out free solutions and advice I wouldn't need my regular design business anymore.
    If you feel a feature should be included in the general release at no additional cost, please ask Adobe to do so: Adobe - Feature Request/Bug Report Form
    You need to understand, though, that Adobe is a big corporation that budgets the time that developers can spend on new features, and most new things that are added are features that many users have asked for, and usually over the course of several versions (long document users are still waiting for improved footnotes, unchanged since they were introduced), so unless this is a "killer" new idea that will benefit thousands of users you are unlikely to see Adobe add it any time soon, if at all.

  • JNI classes to access the Security Filter features of the C API

    Looking for help with managing security filters using the JAPI. Has anyone developed JNI classes to access the Security Filter features of the C API? If so, would you be willing to share your experience and/or code? Time is of the ssence. Thanks in advance for any help.-- Posted for Martin [email protected]@pacbell.net

    Are you talking about the Requirements Gateway?  It is a separate product from NI that will do what you are looking for.  I haven't used it so I am not sure of the API chain to make it work.  Take a look and see if that is what you were thinking of.
    Hope that this helps,
    Bob Young
    Sorry, I just re-read your original post and see that you are looking to also use the Requirements Gateway, so you obviously know about it.  I don't know what the API changes were that made it work so I am not going to be much help.
    Sorry about posting before getting the correct information from the original.
    Bob Young
    Message Edited by Bob Y. on 08-24-2006 04:54 PM
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • 1:N mapping without using BPM , based on segment conditions

    Hi All,
    I have to send 3 different files from source based on some conditions
    1) for the first file to be sent is okay
    2) But for second file and third file i need to check some conditions
    the conditions are
    If E1EDL44 case detail fields exists   i should generate second file and i should not create any third file  (it's one or the other, not both).
    If E1EDL44 case details doesnot exist i should generate third file and not second file...
    So My confusion is how to send either second or third file (any one only)
    If i do mapping  is it sufficient or also should i use condition editor in Receiver Determination...
    Please suggest u r valuable help..
    Thanks and Regards,
    sridhar

    Hi Sridhar,
    Make ur second interface Occurence as Optional 0:1 in ur Interfaec Mapping.
    In ur Multi-mapping (Message Mapping) also make ur  message type corresponding to ur second file as Optional.
    In ur mapping check the condition and if doesnot satisfy dont populate the second message type. Check this option.
    Regards,
    Sudharshan

  • Rendering the component based on valueChangeListener

    Hi
    i have to rendered the af:table based on valueChangedListener..
    i have a tableLayout and inside tableLayout i have af table.i have dropdown list in that drop down list i put valuechangeListener event when i select the value from drop down list i have to do rendered the table.
    so what i did here is
    tableLayout3.setRendered(true);
    AdfFacesContext.getCurrentInstance().addPartialTarget(tableLayout3);
    but it is not diaplaying the table but when tried with button action it is properly displaying the table.
    can any body help plz ..
    Thanks and Regards,
    Harish

    Your EL is indeed wrong. Place the operators inside the EL, otherwise they would evaluate to plain (non-EL) values.
    <f:subview rendered ="#{bean.value1 || bean.value2}">

  • Oracle XML Gateway- Mapping XML to Oracle Apps API - Wrong Number or types

    XML GATEWAY INBOUND – CALLING AN API (PL/SQL record type IN variable) TO INSERT THE DATA INTO SAMPLE TABLE
    Hi,
    I am using XML Gateway to push data into Oracle Apps using a procedure call with “Record Type” as the parameter. I am getting a “wrong number” or types of arguments mismatch error inspite of following the process described in the Oracle XML Gateway User’s Guide
    Steps followed:
    DB
    1. I Created a sample table XX_CUST_HIST(ID NUMBER, ACCOUNT_NAME VARCHAR2(50), FIRST_NAME VARCHAR2(50), LAST_NAME VARCHAR2(50), TITLE VARCHAR2(50))
    2. I then Created a package ‘XX_XML_DEMO_API’ in which we have defined a record type and a procedure.
    3. The Record type ‘customerRecordType’ holds account_name , first_name, last_name and the title.
    4. The Procedure ‘insert_customer_r’ takes 2 IN arguments :
    1. p_ id number
    2. p_customer customerRecordType
    5. The procedure will insert the values into xx_cust_hist table
    p_id -> id
    p_customer.account_name -> account_name
    p_customer.first_name -> first_name
    p_customer.last_name -> last_name
    p_customer.title -> title
    Now I need to call the procedure ‘XX_XML_DEMO_API . insert_customer_r’ from XML gateway.
    Following are the steps to call the procedure:
    [1] Create DTD
    ELEMENT NEW_CUSTOMER_APIR (DATAAREA)
    ELEMENT DATAAREA (CUSTOMER_DATA)
    ELEMENT CUSTOMER_DATA (ID, CUSTOMER_RECORD)
    ELEMENT ID (#PCDATA) ELEMENT CUSTOMER_RECORD (ACCOUNT_NAME, FIRST_NAME, LAST_NAME, TITLE)
    ELEMENT ACCOUNT_NAME (#PCDATA)
    ELEMENT FIRST_NAME (#PCDATA)
    ELEMENT LAST_NAME (#PCDATA)
    ELEMENT TITLE (#PCDATA)
    [2] Creation of XML map Data Definition type for Source and Destination are set to XML.
    While executing the procedure ‘XX_XML_DEMO_API . insert_customer_r’ in post_process from the message designer, instead of 2 (p_id IN number , p_customer IN customerRecordType) parameters it is showing 6 parameters (p_id IN number, p_customer IN customerRecordType, account_name IN varchar2, first_name IN varchar2, last_name IN varchar2, title IN varchar2). Six parameters are getting mapped, instead of the 2 that the procedure really needs.
    [3] Testing of XML map. Error message in transaction monitor:
    ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'INSERT_CUSTOMER_R' ORA-06550: line 1, column 7: PL/SQL: Statement ignored -
    ECX_ACTIONS.BIND_PROC_VARIABLES
    The process executed and produced the error message given in the step 3. The standard documentation is unclear on how this should be done. Being a newbie to the XML Gateway technology I am unable to get a clue about what the error message could be and which step of the process produced the message. Could anyone help me to proceed further?
    Thanks in advance.

    Hi Siva,
    It seems like the walletkey property of event type is defined incorrectly. Please try by defining the event as follows:
    <wlevs:property name="walletkey" type="char" length="20"/>
    Use "char" instead of "char[]".
    Best Regards,
    Sandeep

  • What touch-based API or modules you use for Android?

    I had ported my web-based flex application to android. During porting, I need to code different type of touch-based UI components from ground up. Apparently this is not very efficient and I also need to perform a lot more testing as a result. Do you guys use any touch-based UI api or modules, if yes, can share with the rest in this forum?

    See if thesee links can be helpful to you:
    http://help.adobe.com/en_US/as3/dev/WS1ca064e08d7aa93023c59dfc1257b16a3d6-7ffe.html
    http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/ui/Multitouc h.html

  • FOI theme (Oracle Maps) rendering very slow

    I sniffed the network traffic when a FOI theme is rendered on a map. I determined that for each feature of the theme a network request is sent to the server fetching the corresponding marker. Fetching markers has a big impact on the performance.
    I think that fetching the same marker for each feature is not nessary.
    Is there a way (undocumented feature or patch) to avoid this from happening?
    Thanks in advance,
    Jeroen

    Hi,
    Experienced the same issue. I would like to hear from Oracle Maps development team if they are going to do something with it because our Map with active theme is very slow (rendering of markers and also panning the map). Without active markers it's fast.
    thanks,
    Branislav

  • Advanced Security manager- Error Initializing the Essbase API.

    Hi,
    I have installed  OLAPUnderground> Advanced Security manager for exporting all the User security.  when i try to click connect it throws a connection error "error Initializing the Essbase API, cannot connect." Has any one seen this error before? please let me know if i am missing anything.
    We are currently using  11.1.2.3.500.
    Thanks,
    Sankeerth

    Sounds like you have not created the windows environment variable:
    ESSBASEPATH
    D:\Oracle\Middleware\EPMSystem11R1\common\EssbaseRTC\11.1.2.0
    That is just an example path update to match your environment
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for