Problem Extracting SRID using MapViewer JS API

Dear All
I am developing an application using MapViewer 11g.
a) MapViewer JavaScript function mapview.getSrid() returns NULL for a map with SRIDS properly set in USER_SDO_GEOM_METADATA table and all the records of the table.
However I am able to retrieve the SRIDs properly by using a callback function as explained below
function loadMap()
var baseURL = "http://<servername>:8888/mapviewer";
var point = new MVSdoGeometry.createPoint(77.5,20.5,8307);
mapView = new MVMapView(document.getElementById("map"),baseURL);
mapView.addMapTileLayer(new MVMapTileLayer("mvdemo.india_map"));
mapView.setCenter(point);
mapView.setZoomLevel(3);
mapView.display();
*//This returns NULL*
alert("SRID " + mapView.getSrid());
However when I use
mapView.getMapTileLayerDefinition(mapCallback,"mvdemo.india_map");
//Load all relevant modules
//Callback function
function mapCallback(value)
     alert(value.coordSys.srid);    //This WORKS! returns the SRID 8307
+//Verified with FireBug Debugger+
b) I am in the process of using DOJO toolkitfor JS with MapViewer. I have just started this integration. But i havent come across any implementations in the past with DOJO.
I like to know about any implementation experience in this regard. Will compile and revert later.
Regards
Govindarajan
GIS Consultant

a) The map tile layer definition may not have been loaded by the time you first call getSrid().
Either define a callaback function in addMapTileLayer(mapTileLayer, callBack) or attach an event listener for MVEvent.INITIALIZE to mapview and call getSrid() in that.
b) Others have used mapviewer with Ext.js. That has worked well. Not sure about Dojo. Would be great to hear about your experience.

Similar Messages

  • Problem extracting data using 0EC_PCA_3 datasource

    Hello every body.
    Hope every thing is all right for you.
    I'm facing an embarassing problem, and hope you can help!
    I'm using datasource 0EC_PC_3 to extract data from GLPCA (ECC table) into a BI DSO. My probleme is that when i try to extract all data for a specific profit center group (or customer) i'm not getting data related to fiscal period biger than 10. When i add a filter on account number (on infopackage selection criteria) for example it's getting all data with no probleme in fiscal period!!
    Any body has faced this error or something like it?
    Thanks for help!
    Salah

    Thanks every body for reply,
    yes i've fiscal period as part of my DSO key part!
    At datasource level (0EC_PCA_3), i'm not getting data as it should be !!!
    When, whitin my infopackage, i specify the profit center, data are retreived correctly, otherwise i'm not getting all data!!!
    Any idea? :s

  • Get Direction Map using Mapviewer Javascript API

    Hello Gurus,
    I have coordinate information for a route which I got using routing engine. Now, my requirement is to get map (Similar to eLocation GetDirection map) which can show routing curve in map. Using Javascript API, how can I achieve this?
    If I am not not wrong, I will have to create new FOI with MVSdoGeometry, but I am not sure about how to create MVSdoGeometry for the lat-lang I have which will display a curve?
    Thanks in advance.
    -Hardik

    Currently you can not add zooming event listener. We'll support it in the next release.

  • Sound problem in applications using non-Phonon API

    Every application like mplayer, audacious, mpd or flash in opera cannot play sound... But in juk, dragon player, amarok2 everything is OK.

    Nothing....
    % mplayer -ao alsa ~/Music/Ayreon/01011001/Disc\ 1/01\ -\ Age\ Of\ Shadows.mp3
    MPlayer 1.0rc2-4.3.2 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM)2 Duo CPU     E4400  @ 2.00GHz (Family: 6, Model: 15, Stepping: 13)
    CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled with runtime CPU detection.
    115 audio & 237 video codecs
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.
    Playing /home/ferhiord/Music/Ayreon/01011001/Disc 1/01 - Age Of Shadows.mp3.
    SUB: error opening iconv descriptor.
    Audio file file format detected.
    Clip info:
    Title: Age Of Shadows
    Artist: Ayreon
    Album: 01011001
    Year: 2008
    Comment:
    Track: 1
    Genre: Progressive Rock
    ==========================================================================
    Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
    AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
    Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
    ==========================================================================
    AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
    Video: no video
    Starting playback...

  • How to use MapViewer API?

    Hi,
    I have a problem that is acturally regarded to java programming. I want to use MapViewer JavaBean-Based API. I did the preparing work described in Mapviewer doc §4.2.
    I saved the demo jsp page "mapclient.jsp" in my own application folder (under oc4j\j2ee\home\default-web-app). The other jsp pages written by myself can be displayed. But this mapclient.jsp can not be retrieved. "HTTP 500 internal server error The page cannot be displayed." It seems that I don't have J2EE container that contains the MapViewer service.
    I also changed the codes of mapclient.jsp. I use
    import oracle.spatial.mapclient.MapViewer;
    MapViewer mv = new MapViewer("http://localhost ...");
    It does not work, either. "The page cannot be displayed."
    I don't know how to invoke the MapViewer service. I use oc4j standalone. I don't know how to get the error message, either.
    I hope somebody can give me some suggestions. Thanks in advance.

    Hi,
    about the addDataSource using the Java API, for now you have to disable the security
    in order to add the data source using the MapViewer client API.
    You can do that editing the MapViewer config file:
    <mv_security enforce_sec_role="false" />
    Assuming that you have added your data source, and you have rendered some map,
    you can get the attribute information using the "identify" methods of the
    MapViewer client API.
    1) To identify one individual geometry:
    String [][] result = mapviewer.identify(dataSource,table_name,columns,
    geometry_column,srid, x, y);
    where: "columns" contains the table attribute names that
    you want to retrieve
         x,y represents the device coordinate.
    2) To identify geometries inside a rectangle:
    String [][]result = mapviewer.identify(dataSource,table_name,columns,
    geometry_column,srid, xlowleft,ylowleft,
    xupright,yupright,false);
    where the rectangle coordinates are defined by xlowleft,ylowleft,
    xuprigth, and yuprigth values in device unit.
    3) The resulted String array contains on the first row the attribute
    names, and on the remaining rows the attribute values for each geometry.
    int nlin = result.length; // return the number of lines
    int col = result[0].length; // number of columns
    To get the attribute names:
    // attribute names
    Object []tableattrs = new Object[ncol];
    for(int j=0;j<ncol;j++)
    tableattrs[j] = result[0][j];
    To get the attribute values:
    Object [][]tablevalues = new Object[nlin-1][];
    for(int lin=1;lin<nlin;lin++)
    tablevalues[lin-1] = new Object[ncol];
    for(int col=0;col<ncol;col++)
    tablevalues[lin-1][col] = result[lin][col];
    Regards.

  • Problems while uploading files using the FileReference API

    I've built an image uploader module in Flex using the FileReference API and PHP.
    While this works perfect for images upto 1 MB, What I'm noticing is that for images greater that 1 MB even after the Event.COMPLETE  has triggered, the file hasn't yet been uploaded into the folder.. its only after a couple of seconds or minutes after the Event.COMPLETE,  that the image actually shows up in the FTP folder. Morever I also noticed that for such files the DataEvent.UPLOAD_COMPLETE_DATA that we are using to get feedback from PHP never gets called.
    I thought it would be related to the PHP script getting timed out... but the PHP script does get executed and the images do show up in the folder but thats way after the Event.Complete has been triggered and more importantly  DataEvent.UPLOAD_COMPLETE_DATA doesnt get called.
    Everything seems to work fine as long as the file size is under 1 MB
    Did others too face similar problems and any ideas on how to fix it?
    Thanks in advance

    I don't believe there is, as the browse button renders out as an html input type file component, and this has no ability to get native file size from the client. The only way to do it is to check the file size server side, but that kind of defeats the purpose to some extent, as the file is required to be uploaded before the file size can be checked.
    There is no way to do this on the client short of using a third party client side component - ie. java, flash or some other active component that gets file system level access.
    Ben

  • Problem in using java print API

    I am facing a problem in using printAll and printComponents API.
    The application was developed in java1.1
    Now the same application is migrated to java 1.4
    But the reports are not being printed in desired format.
    The application make use of printAll() API of Component.
    Using java1.1 the print output is without the borders for components like textField or TextArea,
    whereas for java 1.4 we get border and scrollbar on print which is not the desired output.
    Can anybody suggest a solution for the same?
    here is the sample code, you can see the difference by executing this code in java1.1 and java 1.4.
    import java.awt.*;
    import java.util.*;
    public class TestPrint extends Frame implements java.awt.event.ActionListener {
    PrintJob job = null;
    //Frame aFrame = new Frame("Test Frame");
    private TextArea txaChangeNotes = null;
    private Label lb = null;
    private Panel ivjContentsPane = null;
    private Button ivjButton1 = null;
    TestPrint () {
         super("Test Frame");
         init();
    private void init() {
         ivjContentsPane = new java.awt.Panel();
         ivjContentsPane.setName("ContentsPane");
         txaChangeNotes = new java.awt.TextArea("",0,0,java.awt.TextArea.SCROLLBARS_BOTH);
         txaChangeNotes.setText("****\n&&&");
         ivjButton1 = new java.awt.Button();
         ivjButton1.setName("Button1");
         ivjButton1.addActionListener(this);
         ivjContentsPane.add(txaChangeNotes);
         ivjContentsPane.add(lb);
         ivjContentsPane.add(ivjButton1);
         this.add(ivjContentsPane);
         setSize(595, 735);
         show();
    public void actionPerformed(java.awt.event.ActionEvent e) {
         Object obj = e.getSource() ;
         if( obj instanceof java.awt.Button ){
              //Button but = e.getSource();
              print();
    private void print() {
         System.out.println("In Print");
         job = getPrintJob(this , "Print All Parts");
         //job.setPrintable(this);
         if(job!=null){
              System.out.println("Job not null");     
              /*if (job.printDialog()) {
         try {
                   System.out.println("printing");     
         job.print();
         } catch (Exception ex) {
         ex.printStackTrace();
              Graphics pg=job.getGraphics();
              if(pg!=null){
              System.out.println("graphics not null");     
                   this.requestFocus();
                   //this.printComponents(pg);
                   this.printAll(pg);
              }else{
              System.out.println("graphics null");     
                   //this.dispose();
                   return;
              pg.dispose();
         }else{
              System.out.println("job null");
              //this.dispose();
              return;
         job.end();     
    private PrintJob getPrintJob (Frame aFrame,String aString) {
         Properties printprefs = null;
         Toolkit toolkit = java.awt.Toolkit.getDefaultToolkit();
         PrintJob job = toolkit.getPrintJob(aFrame, aString, printprefs);
         /*JobAttributes jab = null;
         jab = new JobAttributes();
         PageAttributes pab = null;
         pab = new PageAttributes();
         pab.setPrinterResolution(70);
         jab.setDialog(JobAttributes.DialogType.COMMON);
    PrintJob job = Toolkit.getDefaultToolkit().getPrintJob(aFrame, aString, jab, pab);*/
         return job;
    public static void main(String arg[]){
         TestPrint objTestPrintFrame = new TestPrint();
    }

    You must not have the complete IFS_BASE_CLASSPATH defined in your CLASSPATH environment variable. The easiest way to do this is to type ". ifsenv.sh" on Solaris (or run ifsenv.bat on NT). Then you can invoke java like this:
    java -classpath $CLASSPATH:$IFS_BASE_CLASSPATH ...
    (your standard JDK classes should already be in the CLASSPATH; append our classpath to it)

  • Problem in Accessing serial port using java comm Api

    I have installed java comm Api in my pc.
    i have gone through the instalation instruction which comes on this package.
    I have done the instalation like this
    Copy win32com.dll to my <JDK>\bin directory.
    Copy comm.jar to my <JDK>\lib directory.
    Copy javax.comm.properties to my <JDK>\lib directory.
    and restart the system.
    But when i run the BlackBox , it is giving me message
    "serial port not found".
    Can any one tell me , what is the exact problem ?

    I'm not sure what you mean by BlackBox, but I have used the COMM api extensively.
    The majority of problems is that the api cannot see the serial port (which is what you are describing) and this is caused by incorrect placing of the javax.comm.properties file.
    As well as <JDK>\lib, try putting it into <JRE>\lib as well. That has often solved problems on my setup.

  • Problem using Java Mail API with WLS 7.0

    Hi All,
    I am trying to use the Java Mail API provided by WLS 7.0. I have made the
    settings metioned in the WLS 7.0 docs. However when I try to run the program I
    am getting the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment
    or system property, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    46)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
    a:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    The code that I have written is as follows
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
         public static void main(String args[])
              try
                   //Context ic = getInitialContext();
                   InitialContext ic = new InitialContext();
    /* My jndi name is "testSession" */
                   Session session = (Session) ic.lookup("testSession"); /* THE PROBLEM IS SHOWN
    IN THIS LINE */
                   Properties props = new Properties();
                   props.put("mail.transport.protocol", "smtp");
                   props.put("mail.smtp.host", "XX.XX.XX.XX");
    /* For security reasons I have written the ip add in this format */
                   props.put("mail.from", "[email protected]"); /* for security reasons i have
    changed the mail address */
                   Session session2 = session.getInstance(props);
                   Message msg = new MimeMessage(session2);
                   msg.setFrom();
                   msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]",
    false));
                   msg.setSubject("Test Message");
                   msg.setSentDate(new Date());
                   MimeBodyPart mbp = new MimeBodyPart();
                   mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(mbp);
                   msg.setContent(mp);
                   Transport.send(msg);
              catch(Exception e)
                   e.printStackTrace();
         }//end of main
    public static Context getInitialContext()
         throws NamingException
              Properties p = new Properties();
              p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              p.put(Context.PROVIDER_URL, "t3://localhost:7501/testWebApp");
                   p.put(Context.SECURITY_PRINCIPAL, "weblogic");
                   p.put(Context.SECURITY_CREDENTIALS, "weblogic");
              return new InitialContext(p);
    }//end of class
    Can anyone please tell me what is the problem. I thought that we cannot directly
    do
    InitialContext ic = new InitialContext();
    So I had written a method getInitialContext() as shown in the above piece of code,
    but that too did not work.
    Eagerly awaiting a response.
    Jimmy Shah

    You can use InitialContext ic = new InitialContext() only if you are using a startup class, servlet or a JSP i.e
    server side code.
    If you are using a java client you need to use Context ic = getInitialContext();
    Try this code
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
    public static void main(String args[])
    try {
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, "t3://localhost:7001");
    Context ic = new InitialContext(h);
    Session session = (Session) ic.lookup("testSession");
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", "XX.XX.XX.XX");
    props.put("mail.from", "[email protected]");
    Session session2 = session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse("[email protected]",false));
    msg.setSubject("Test Message");
    msg.setSentDate(new Date());
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp);
    msg.setContent(mp);
    Transport.send(msg);
    catch(Exception e)
    e.printStackTrace();
    }//end of main
    }//end of class
    We have shipped a javamail example in the samples\server\src\examples\javamail folder.
    Jimmy Shah wrote:
    Hi All,
    I am trying to use the Java Mail API provided by WLS 7.0. I have made the
    settings metioned in the WLS 7.0 docs. However when I try to run the program I
    am getting the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment
    or system property, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    46)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
    a:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    The code that I have written is as follows
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
    public static void main(String args[])
    try
    //Context ic = getInitialContext();
    InitialContext ic = new InitialContext();
    /* My jndi name is "testSession" */
    Session session = (Session) ic.lookup("testSession"); /* THE PROBLEM IS SHOWN
    IN THIS LINE */
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", "XX.XX.XX.XX");
    /* For security reasons I have written the ip add in this format */
    props.put("mail.from", "[email protected]"); /* for security reasons i have
    changed the mail address */
    Session session2 = session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]",
    false));
    msg.setSubject("Test Message");
    msg.setSentDate(new Date());
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp);
    msg.setContent(mp);
    Transport.send(msg);
    catch(Exception e)
    e.printStackTrace();
    }//end of main
    public static Context getInitialContext()
    throws NamingException
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, "t3://localhost:7501/testWebApp");
    p.put(Context.SECURITY_PRINCIPAL, "weblogic");
    p.put(Context.SECURITY_CREDENTIALS, "weblogic");
    return new InitialContext(p);
    }//end of class
    Can anyone please tell me what is the problem. I thought that we cannot directly
    do
    InitialContext ic = new InitialContext();
    So I had written a method getInitialContext() as shown in the above piece of code,
    but that too did not work.
    Eagerly awaiting a response.
    Jimmy Shah--
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Problem is occurring in docx format; it is not printing "New Line" character in extracted txt using IFilter (offfiltx.dll) while with doc file IFilter (OffFilt.dll) is working fine.

    Problem: Problem
    is occurring in docx format; it is not printing “New Line” character in extracted txt using IFilter (offfiltx.dll) while with doc file IFilter (OffFilt.dll) is working fine.
    Environment: -
    Operating
    System:
    Windows XP SP2/7
    Language:
    C#
    MS
    Office Version: - MS Office 2007/2010/2013
    Problem
    Description: -
    We
    havedocx
    file with new line character, and we are processing this file in IFilter for extracting text, and it is giving output with concatenation of lines.
    Docx
    file format (Sample.docx)
    Test this music
    Word processing
    Testing docx file
    Output:
    - Test this music Word processing Testing docx file
    Requirement:
    - We
    have requirement to get following text in particular format with New Line from docx because client is using docx format only.
    Test this music
    Word processing
    Testing docx file
    Attempt:
    We have tried a lot after changing IFilter configuration,
    but it is not giving required output. Then we saved same file in doc format (Sample.doc), which is giving required output.
    Because it is application specific problem, kindly
    assist to resolve issue on priority. We are sharing IFilter paths for extracting text for doc and docx.
    Doc Filter Location: - %systemroot%\system32\OffFilt.dll
    Docx Filter Location: - <Drive>:\PROGRA~1\COMMON~1\MICROS~1\Filters\offfiltx.dll
    Code Snippet for setting property of filter
    internal static IFilter LoadAndInitIFilter(string fileName, string extension)
                IFilter filter
    = LoadIFilter(extension);
                if (filter
    == null)
                    return null;
                IPersistFile persistFile
    = (filter as IPersistFile);
                if (persistFile
    != null)
    persistFile.Load(fileName, 0);
                    IFILTER_FLAGS flags;
                    IFILTER_INIT iflags
    =
                                IFILTER_INIT.CANON_HYPHENS
    |
                                IFILTER_INIT.CANON_PARAGRAPHS
    |
                                IFILTER_INIT.CANON_SPACES
    |
                                IFILTER_INIT.APPLY_INDEX_ATTRIBUTES
    |
                                IFILTER_INIT.HARD_LINE_BREAKS
    |
                                IFILTER_INIT.FILTER_OWNED_VALUE_OK;
                    if (filter.Init(iflags,
    0, IntPtr.Zero, out flags)
    ==IFilterReturnCode.S_OK)
                        return filter;
                Marshal.ReleaseComObject(filter);
                return null;
    Kindly
    assist to resolve this issue and also let us know if any input is required.
    For any help, we would be really
    thankful.

    Kindly
    assist to resolve this issue and also let us know if any input is required.
    For any help, we
    would be really thankful.

  • Problem with creating customer account using TCA Java API

    Hi,
    I am trying to create customer account using TCA java API. i am getting exception saying PL/SQL numeric error: character to number conversion. but this error raises when calling API method
    HzCustAccountV2Pub.createCustAccount.
    can any body help me in solving this issue, any clue why this exception raises. i have tested even the code given in TCA API user guide. that code also gets same error.

    package client;
    import java.math.BigDecimal;
    import java.sql.Timestamp;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import oracle.jdbc.driver.OracleConnection;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    import oracle.apps.ar.hz.v2api.HzCustAccountV2Pub;
    import oracle.apps.ar.hz.v2api.HzPartyV2Pub;
    import oracle.apps.ar.hz.v2api.HzCustomerProfileV2Pub;
    class CreateCustAccount {
         public static void main(String[] args) throws Exception {
         HzCustAccountV2Pub.CustAccountRec p_cust_account_rec = new HzCustAccountV2Pub.CustAccountRec();
         HzPartyV2Pub.PersonRec p_person_rec = new HzPartyV2Pub.PersonRec();
         HzCustomerProfileV2Pub.CustomerProfileRec p_customer_profile_rec = new      HzCustomerProfileV2Pub.CustomerProfileRec();
         BigDecimal[] x_cust_account_id = new BigDecimal[1];
         String[] x_account_number = new String[1];
         BigDecimal[] x_party_id = new BigDecimal[1];
         String[] x_party_number = new String[1];
         BigDecimal[] x_profile_id = new BigDecimal[1];
         String[] x_return_status = new String[1];
         BigDecimal[] x_msg_count = new BigDecimal[1];
         String[] x_msg_data = new String[1];
         try
         Class.forName ("oracle.jdbc.driver.OracleDriver");
         OracleConnection conn = (OracleConnection) DriverManager.getConnection ("jdbc:oracle:thin:@ebiztst.trianz.int:1526:PATCH","apps","apps");
         HzCustAccountV2Pub custaccountV2Pub = new HzCustAccountV2Pub();
         p_cust_account_rec.account_name = "John Ac";
         p_person_rec.person_first_name = "John";
         p_person_rec.person_last_name = "Smith";
         p_cust_account_rec.created_by_module = "TCA_EXAMPLE";
         HzCustAccountV2Pub.createCustAccount(
         conn
         , "T"
         , p_cust_account_rec
         , p_person_rec
         , p_customer_profile_rec
         , "F"
         , x_cust_account_id
         , x_account_number
         , x_party_id
         , x_party_number
         , x_profile_id
         , x_return_status
         , x_msg_count
         , x_msg_data
         System.out.println( "x_return_status = " + x_return_status[0] );
         System.out.println( "x_msg_count = " + x_msg_count[0] );
         System.out.println( "x_msg_data = " + x_msg_data[0]);
         if (x_msg_count[0].intValue() > 1) {
              OracleCallableStatement ocs = null;
              for (int i=0; i<x_msg_count[0].intValue(); i++) {
              ocs = (OracleCallableStatement)conn.prepareCall(
              "begin ? := fnd_msg_pub.get( p_encoded => ’F’ ); end;");
              ocs.registerOutParameter(1, OracleTypes.VARCHAR);
              ocs.execute();
              System.out.println((i + 1) + ". " + ocs.getString(1));
              conn.close();
              } catch (ClassNotFoundException e) {
              System.out.println("Driver Not Found: " + e);
              } catch (SQLException e) {
              System.out.println("SQL Error." + e);
    }

  • Problem using Javax.Mail API

    Hi Experts,
    I am using Javax.mail API to send an email through java application. But i am facing an issue when i am deploying the java application in SAP WAS.
    I have assigned values in SMTP Host ,Port, and InternetAddress and deployed to WAS. But when i deploy this java class again in WAS with changing the values for SMTP Host ,Port and InternetAddress and putting in Properties object ,its always picking the values set at first time.
    Can anyone tell me whats wrong with following code .
    Properties prpt = new Properties();
    if (host == null)
    host=token[0];
    prpt.put("mail.smtp.host",host);
    prpt.put("mail.smtp.sendpartial", "true");
    if (port == null)
    port=token[1];
    prpt.put("mail.smtp.port", port);
    Session session1=Session.getDefaultInstance(prpt, null);
    MimeMessage message=new MimeMessage(session1);
    message.setFrom(new InternetAddress(emailId"));
    Thanks in advance.

    Hi
    I hope follow similar answered thread  will help you.
    1. [Javamail Client Service   |Javamail Client Service;
    2.[Sending Email   |Sending Email;
    Best Regard
    Satish Kumar

  • WEB BASED MAPPING APPLICATION TO DEVELOP QUERY UTILITY USING MAPVIEWER

    Dear Sir,
    please any one can answer me as soon as possible its very urgent
    WEB BASED MAPPING APPLICATION TO DEVELOP QUERY UTILITY USING MAPVIEWER
    I     As oracle mapviewer Chapter 8 (Oracle Maps) says generating our own Web based mapping application we are trying to generate our own maps for our own data contains in our layers like example boundary lines and roads and etc. and we are following complete example as described in Oracle Mapviewer Document Chapter 8.
    Before this step we tried with demo data downloaded from OTN mvdemo. And we downloaded latest demo today itself from the OTN and imported into our database schema called mvdemo. And we copied all three jar files mvclient and mvconnection and mvpalette into our jdeveloper .
    II.     We created a jsp to execute the following code from oracle mapviewer chapter 8 documents
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/customizable" prefix="cust"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/jwcache.tld"
    prefix="jwcache"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld"
    prefix="fileaccess"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/jesitaglib.tld"
    prefix="JESI"%>
    <f:view>
    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html" charset=UTF-8>
    <TITLE>A sample Oracle Maps Application</TITLE>
    <script language="Javascript" src="jslib/loadscript.js"></script>
    <script language=javascript>
    var themebasedfoi=null
    function on_load_mapview()
    var baseURL = " http://localhost:8888/mapviewer/omserver";
    // Create an MVMapView instance to display the map
    var mapview = new MVMapView(document.getElementById("map"), baseURL);
    // Add a base map layer as background
    mapview.addBaseMapLayer(new MVBaseMap("mvdemo.demo_map"));
    // Add a theme-based FOI layer to display customers on the map
    themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.customers');
    themebasedfoi.setBringToTopOnMouseOver(true);
    mapview.addThemeBasedFOI(themebasedfoi);
    // Set the initial map center and zoom level
    mapview.setCenter(MVSdoGeometry.createPoint(-122.45,37.7706,8307));
    mapview.setZoomLevel(4);
    // Add a navigation panel on the right side of the map
    mapview.addNavigationPanel('east');
    // Add a scale bar
    mapview.addScaleBar();
    // Display the map.
    mapview.display();
    function setLayerVisible(checkBox){
    // Show the theme-based FOI layer if the check box is checked and
    // hide the theme-based FOI layer otherwise.
    if(checkBox.checked)
    themebasedfoi.setVisible(true) ;
    else
    themebasedfoi.setVisible(false);
    </script>
    </head>
    <body onload= javascript:on_load_mapview() >
    <h2> A sample Oracle Maps Application</h2>
    <INPUT TYPE="checkbox" onclick="setLayerVisible(this)" checked/>Show customers
    <div id="map" style="width: 600px; height: 500px"></div>
    </body>
    </html>
    </f:view>
    <!--
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>mapPage</title>
    </head>
    <body><h:form binding="#{backing_mapPage.form1}" id="form1"></h:form></body>
    </html>
    -->
    <%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_mapPage--%>
    III.     When we run this jsp it’s giving us following Two errors
    1     Error:     ‘MVMapView’ is undefined
         Code:     0
         URL:     http://192.168.100.149:8988/MapViewerApp-WebProj-context-root/faces/mapPage.jsp
    2     Error:     ‘themebasedfoi’ is null or not an object
         Code:     0
         URL:     http://192.168.100.149:8988/MapViewerApp-WebProj-context-root/faces/mapPage.jsp
    Please let us know what could be problem as soon as possible. Very urgent
    Please let us know where we can find Mapviewer AJAX API’s for Jdeveloper Extention
    Thanks
    Kabeer

    I currently use parameters, and they are passed from the form to the report. Report is then generated based on a function returning ‘strongly typed’ cursor. The ‘strongly typed’ cursor in my case returns a record consisting of an orderly collection of fields.
    This collection of fields is returned by another function that relies on the IF … THEN logic.
    However, the number of IF ... THEN statements is quite large (currently 64 covering all possible combinations of 6 parameters available in the form).
    I would like to avoid the large number of IF … THEN statements, and hope that there is a way of passing a string to a query, where the Dynamic SQL would in Select close and Where close reflect parameters passed by the form.
    In addition to this I would like to avoid creating and populating a table or a view dedicated to the report, because this may lead to a conflict in case of multiple users concurrently generating reports with different choice of parameters.
    Edited by: user6883574 on May 28, 2009 9:16 PM

  • Using Mapviewer with Oracle Locator

    We're currently using Oracle Locator as a datasource for Mapviewer 10g and we're running into a slight problem when loading simple points from a table. We have the table containing these ponits added to the USER_SDO_GEOM_METADATA table and the spatial index is created on the specific column with the SDO_GEOMETRY type. When the map loads up the following error is generated when a dynamic jdbc query is run:
    MAPVIEWER-06009: Error processing an FOI request.
    Root cause:FOIServlet:ORA-29900: operator binding does not exist
    ORA-06540: PL/SQL: compilation error
    ORA-06553: PLS-907: cannot load library unit MDSYS.SDO_3GL (referenced by MDSYS.SDO_FILTER)
    I've looked in the database for the MDSYS.SDO_3GL object and it's definitely there, so I'm a little lost on what could be causing this. I thought perhaps that our user schema may not have execute privileges associated with that specific procedure, but I believe the entire point of MDSYS is that it's available to any user on the database.
    Any help with this would be greatly appreciated.
    Edited by: user1175540 on Oct 29, 2010 7:10 PM

    We're currently using the javascript api for oracle maps (using the matching javascript file, oraclemaps.js, that came directly from the mapviewer application download). All that I'm calling is a single table and then getting some hidden info columns as well off of it too. I've tried this on a different schema and database that's also only running Locator and the query runs just fine with the points on the map displaying as intended.
    Here's the current theme request that I'm submitting:
    <theme name= 'lowerTheme' >
    <jdbc_query spatial_column='GEOMETRY' jdbc_srid='8307' render_style= 'V.AVCD_BUILD' datasource='mvdemo' >
    select * from build where subtype in('ABC','123','DEF')
    <hidden_info>
    <field column='SUBTYPE' name='Type'/>
    <field column='NAME' name='Name'/>
    <field column='ADDR' name='Address'/>
    <field column='CITY' name='City'/>
    <field column='STATE' name='State'/>
    <field column='ZIP_CODE' name='ZIP Code'/>
    </hidden_info>
    </jdbc_query>
    <rendering>
    <style name='V.AVCD_BUILD' value_columns='SUBTYPE'/>
    </rendering>
    </theme>
    Within the actual function adding that theme to the 'mapview' variable I'm creating a new MVThemeBasedFOI object using the name 'lowerTheme' and the above definition for the second parameter in the constructor.
    Is there a listing of procedures on the MDSYS schema that I should check to make sure they're valid for spatial queries to work?
    Thanks in advance for the help.

  • Using MapViewer from PL/SQL vs Java

    Hi group!
    The MapViewer User's Guide has this to say about using MapViewer from PL/SQL:
    "The usage model for the SDO_MVCLIENT package is almost identical to that of
    MapViewer JavaBean-based API" etc etc .. "For usage and reference information about specific functions or procedures, see the description of the associated JavaBean-Based API. methods and interfaces in Chapter 4"
    If I don't misunderstand the basic concept, in a Java Web App (using the MapViewer Bean) you create a MapViewer object for each HTTP-user-session, like so:
    MapViewer mv = new MapViewer("http://my_corp.com:8888/mapviewer/omserver");
    ... which you would then store in the user's session object, so that the MapViewer Bean conveniently holds the map's state on the user's behalf.
    To do the equivalent in PL/SQL, the User's Guide suggests:
    "connect scott/tiger
    call sdo_mvclient.createmapviewerclient(
    'http://www.mycorp.com:8888/mapviewer/omserver') ;
    The preceding example creates, in the current session, a unique MapViewer client
    handle to the MapViewer service URL"
    Does "current session" refer to the HTTP-user-session? While I've used PL/SQL before, I've not used the PL/SQL Web Toolkit. Is the session handling implicit here (and invisible?) or should the sdo_mvclient be subsequently stored in the PL/SQL equivalent of a (J2EE) HttpSession object?
    YT

    Part of the answer will depend on how you plan to deploy the application. If you have a few, local clients you could go with the traditional client/server model. If you have a lot of clients and/or they are spread out over a relatively large area (like a campus setting), a web front-end will save you a lot of hassels down the road when it comes time to upgrade.
    Regardless of the the front end, I can tell you that I have been greatly impressed with the throughput you can get by moving most of the code to PL/SQL packages. A few years ago we reworked a VB/Oracle app by moving a lot of the code out of VB and into packages, leaving the client to essentially call procedures and format the output. We had more than a 3x performance increase on the same hardware and our network utilization decreased noticably.
    I am now in the process of replacing the client code with Java servlets/JSP, primarily because of the maintenance hassles I mentioned earlier. There are some limitations with an HTML page but most of these have been cosmetic so far.
    We are still relying heavily on PL/SQL packages. The servlet code basically gets a request, calls a package to get the data, then hands the results to a JSP page. The JSP then formats the output and sends it to the client. We are little more than halfway through the re-write, but it appears performance will increase again. Not as noticably as before, but I will take what I can get. As you have seen, once something is rolled out it always ends up getting used more than you anticipated. Better to over-engineer now than have to patch it once it is live.
    HTH

Maybe you are looking for

  • Error while Reinstalling  at  Phase 6

    Hi     Can u  pls check this snap-in, what could be the error     ASSERT(arguments.callee, creation_ok, "SDB: ERROR WHILE DB INSTANCE CREATION! CHECK THE XCMDOUT.LOG FILE! "); SDB: ERROR CREATING DATABASE INSTANCE! Check the XCMDOUT.LOG FILE XCMDOUT.

  • Change the default service order type for repair order - RA

    When creating a repair order (RA), a service order of type SM03 is triggered. The default order type is SM03. How can I change the order type? Thanks in advance...

  • What is WRONG with Acrobat (Randomly Drops Text)

    I'm at the end of my rope with Acrobat CS3. It randomly distills my contract documents with whole para graphs missing here and there. Sometimes I can reboot and get the whole document to print, but again today, I have a contract that didn't print com

  • Set credential using java embedding activity in SOA11g

    Hi, In SOA 10g in java embedding activity we used to set the creadentials like below *try {* getLocator().lookupProcess("bpelprocess_name").getDescriptor().getPartnerLinkBindings().getPartnerLinkBinding("partnerlink_name").setPropertyValue("basicHead

  • Message Expiration @ EDN

    Hi, I have been leveraging EDN for publish-subscribe pattern implementation. In my business use-case there is one publisher and 3 subscriber. I am looking for little information around EDN. 1.     What is message expiration time at EDN, in case of su