Use BAPI_FLIGHT_GETLIST  from a standalone flex application

Hi all,
I am able to get the flight details [ BAPI_FLIGHT_GETLIST] using flex when run from BSP page, but if i embedd the same swf file in a HTML file or run in flash player i am not able to get any details even it is not asking for my server uname and pass.
Wat to do to fetch the data using this standalone swf files.
jay

Hi Jay,
It'd have been more clear if you had posted any error/exception you faced in this situation.
Still I can suggest you check wsdl link you mention in Flex application.
i mean if you have use any alies name like localhost etc insted of your R/3 IP XXX.XX.XX.XXX:ZZZZ.
In Above Line Replace XXX.XX.X.XXX:ZZZZ with <Host IP>:<Port>.
Further check that RFC is only at basic authentication and not customized authorised  Very rare possibility if you can be sure.
For your help you can refer sample code on following thread for same functionality you want.
Web service call in Flex
You can make AIR application also using same code. Just a small change to be used under WindowedApplication tag.
Regards,
Vivek

Similar Messages

  • How to get Portal user from a standalone Java application

    Hi,
    I have a standalone Java application from where I need to fetch the Portal User Information like userid and email id.
    I am using the below line of code
    iUser = UMFactory.getUserFactory().getUserByLogonID("e017939");
    I have included the jar file com.sap.security.api , But it was giving me the below exception
    java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:55)
         at com.am.wcas.java.mailscheduler.kmaccess.FetchDataFromKM.getiUser(FetchDataFromKM.java:29)
         at com.am.ScheduleEmails.main(ScheduleEmails.java:89)
    and I am getting a pop Up message from the Java Virtual Machine Launcher, saying a Fatal Exception has occured and the Program will exit.
    Then I went throught he SDN threads and they asked me to include the
    logging.jar and com.sap.security.perm.api .
    I Included them, then also, it is giving me Exception
    java.lang.NoClassDefFoundError: com/sap/engine/lib/logging/LoggingHelper
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:56)
         at com.am.FetchKMData.main(FetchKMData.java:30)
    Exception in thread "main"
    and I am getting a pop Up message from the Java Virtual Machine Launcher, saying a Fatal Exception has occured and the Program will exit.
    Kindly let me know if it is possible to access the User info using UMFactory in a standalone Java application. If yes kindly let me know where i am going wrong.
    Regards,
    Shilpa B.V

    Hi Shilpa,
    1. Check that you have added com.sap.security.api within the Your Project>Libraries folder (under navigation tab) and also added jars in the build path of the Your Project under project>properties>Build Path.
    2. In case you have a DC instead of Web Dynpro Project then you have to add the com.sap.security.api under Your DC>Used DCs and have compile time and runtime dependency added.
    Here java.lang.NoClassDefFoundError is caused basically due to only build time dependency added and reference to the jar missing at runtime. Rest the code to retrieve the current user id using UME API and getUserByLogOnID("....") method with/without portal environment would not be an issue at all.
    Regards,
    Tushar SInha

  • What should be done in certmap.conf for 2-way SSL support from a standalone Java application to an SSL enabled LDAP Server

    To support certficate based client authentication using 2-way SSL from a standalone java application which uses JNDI and JSSE1.0.2 to connect to an SSL enabled LDAP Server how do we configure the certmap.conf?Is there any additional setup required at the LDAP Server side apart from enablinf SSL with the option"Required Client Authentication" enabled.The 2 way SSL handshake goes through but the access log file (After configuring the certmap.conf for the issuer DN of the client certficate etc..)shows SSL failed to LDAP DN?But inspite of this access log error the Java client does get an SSL Connection object with which it is able to connect to the LDAP.IS the certmap.conf file being looked up by the LDAP Server at all?

    have you out.flush() and out.close() before you call connection.getInputStream()?

  • How to lookup EJBs deployed in OC4J from a standalone client application

    Hello all,
    I am trying to lookup an EJB deployed in OC4J 10.1.3 from a standalone client application using the following code:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791");
    env.put(Context.SECURITY_PRINCIPAL, "jazn.com/test");
    env.put(Context.SECURITY_CREDENTIALS, "test");
    Context context = new InitialContext(env);
    Object ref = context.lookup("ejb/Dispatch");
    I get the following error:
    javax.naming.NameNotFoundException: ejb/Dispatch not found
         at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
    For the lookup string I've also tried:
    "java:comp/env/ejb/Dispatch" and "Dispatch"
    For the Context.PROVIDER_URL property I've also tried:
    opmn:ormi://localhost:6003:instance
    The result is always the same.
    I appreciate if someone could help me with this?
    Thanks,
    Georgi

    Georgi,
    Your question has been discussed many times on this forum. Search the forum archives for "RMIInitialContextFactory".
    The PROVIDER_URL needs to include the name of the deployed application that your EJB is part of, for example:
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/MyApp");The lookup name has to be the value of the "ejb-name" element in your "ejb-jar.xml" descriptor file.
    Your SECURITY_PRINCIPAL value looks strange to me. Personally, I use "principals" (and not JAZN), so I modified the "application.xml" file (in the "j2ee/home/config" subdirectory) to use "principals". Look for the following comment in that file:
    &lt;!-- Comment out the jazn element to use principals.
          When both jazn and principals are present jazn is used  --&gt;Good Luck,
    Avi.
    Message was edited by:
    Avi Abrami

  • How to access internal table data from webdynpro to Flex application.

    Hi Connoisseur
    The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and  Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
    There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
    i tried to do pass internal table value  to flex-datagrid.but its not work.
    i would like to know
    1.how to access internal table data from webdynpro to Flex application.
    2.how to pass the internal table to flex-datagrid.
    2.how to pass dynamically in ADOBE flex.
    3. how to do Flex is receiving the wd context data?
    4. how can we update WD context with FLEX data.
    Ple give me sample example and step by step procedure.
    Regards
    laxmikanth

    Hi Laxmikanth,
    Please refer this...
    Flash island: update complex type from flex
    Cheers..
    kris.

  • How to get selected values (using checkBox) from DataGrid in flex.

    i have a datagrid which is getting values from a XML file (getting this xml file from database using PHP and HTTP request in flex). i have created a checkbox in every row in data grid. and here is my requirement: i want to select tow or three check-box and would like to get all the values form that particular ROWs in some form , prefered arraycollection (such that i can pass this array directly to a bar chart) .. can some one help me as i am new to flex .
    code ......
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="siteData.send()">
              <mx:Script>
                        <![CDATA[
                                  import mx.collections.XMLListCollection;
                                  import mx.controls.*;
                                  import mx.events.ListEvent;
                                  import mx.rpc.events.ResultEvent;
                                  import mx.controls.Alert;
                                  [Bindable] private var fullXML:XMLList;
                                  private function contentHandler(evt:ResultEvent):void{
                                            fullXML = evt.result.values;
                        ]]>
              </mx:Script>
              <mx:VBox>
                        <mx:Label text="This Data Grid is loading the full XML file"/>
                        <mx:DataGrid width="600"  id="datagrid" dataProvider="{fullXML}">
                                  <mx:columns>
                                            <mx:DataGridColumn headerText="Select">
                                                      <mx:itemRenderer>
                                                                <mx:Component>
                                                                          <mx:HBox horizontalAlign="center">
                                                                                    <mx:CheckBox id="check"/>
                                                                          </mx:HBox>
                                                                </mx:Component>
                                                      </mx:itemRenderer>
                                            </mx:DataGridColumn>
                                            <mx:DataGridColumn dataField="release_version" headerText="Release"/>
                                            <mx:DataGridColumn dataField="build" headerText="build"/>
                                            <mx:DataGridColumn dataField="time_login" headerText="time_login"/>
                                            <mx:DataGridColumn dataField="time_tunnel" headerText="time_tunnel"/>
                                            <mx:DataGridColumn dataField="rate_login" headerText="time_tunnel"/>
                                            <mx:DataGridColumn dataField="rate_tunnel" headerText="rate_tunnel"/>
                                  </mx:columns>
                        </mx:DataGrid>
              </mx:VBox>
              <mx:HTTPService url="http://localhost/php_genxml.php" id="siteData" result="contentHandler(event)" resultFormat="e4x"/>
    </mx:Application>
    as you can see in the image , i will get this datgrid . now i want to select two or three checkboxes and would like to get all the values form the perticular row (for which check box is selected). i would like to get in array from such that i can driectly pass them to bar chart....
    can some one help me in this. as i m new to flex. or if you have some other suggestion ...My final requirement is: select some values and generate bar gharph for those values.
    please help me in this.
    thanks
    tanuj

    Hi Timo -
    Thanks for the suggestion. I could get the values as below:
    public void multiOpUnitValChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding opUnitIter = (DCIteratorBinding)bindings.get("OperatingUnit2VOIterator");
    Integer[] values = (Integer[])valueChangeEvent.getNewValue();
    for (int i=0; i<values.length; i++){
    Row row = opUnitIter.getRowAtRangeIndex(i);
    System.out.println(row.getAttribute("OpUnitId"));
    Thanks -
    Rohit

  • Using flash debugger player with Flex application

    I am building my first Flex app and have run into a problem that I can't figure out.  When publishing a .swf in Flash I sometimes run the debugger to generate the swf.  When I do so, I can view the swf through my browser (using the debugger version of flash player) and the exceptions that are thrown include a stack trace (complete with line numbers) of any error that occurred.  I have tried running the debug compiled version of my swf from Flex and it does not show the line numbers.
    Is there some way to do this?  I have several thousand lines and the location of the error is tough to figure out becuase it is an instance where I am casting an event to the wrong type through my typed params for a function.  So, for example, I am dispatching a MouseEvent but the listener function has a typed parameter of Event instead.
    Can someone please point me in the right direction?
    Thanks.

    Thanks for the feedback.  Our debugger documentation definitely needs to be refreshed.  The PPAPI debugger on Chrome is even more complex.  I blocked some time out on my calendar for Friday to try and get these revised.

  • How to connect to SAP Database from a Adobe flex application?

    Hi
    I am an intern currently working on designing an Adobe flex interface that interacts with an SAP Database, although im torn between methods of implementing the most efficient connection without over-complicating the problem. I believe the best approach would be to use SAPJCo but am unfamiliar with how to approach this method and am finding it hard to get detailed documentation or code examples which show connecting to a Database. Another approach would be using a web service but my problems again arise with my lack of knowledge to connect to the Database.
    Any advice or help would be much appreciated.
    Thanks,
    Jonny

    Hi Jonathan.
    I believe webservice is the best approach, steps to create webservice is very simple.
    1. create a webservice from a standard rfc or bapi.
    2. release and activate webservice.
    3. it will generate wsdl file which can be used in flex environment.
    creating webservice.
    http://help.sap.com/saphelp_nw04s/helpdata/en/0d/2eac5a56d7e345853fe9c935954ff1/frameset.htm
    Consuming ABAP Web Services using Flex :
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/emtech/consuming%2babap%2bweb%2bservices%2busing%2bflex
    i hope this surely helps.
    Venkat.

  • Any way to use "_url" from AS2 in Flex?

    I just want to read the vars that get passed in through the
    url to my Flex app. If it was AS2, I would have just used the
    "_url" property, but thats been removed in AS3.
    Does anyone know how to do this?

    Thanks Tracy.
    I ended up using the loaderInfo object. Here is the init()
    method that gets called on applicationComplete
    private function init():void
    trace(this.loaderInfo.url);
    the tricky part for me was that I was using creationComplete,
    and the loader object was null, so creationComplete must get called
    before applicationComplete. Because when I just changed it to
    applicationComplete, I was able to use the loaderInfo. Hopefully
    this will help somebody else.

  • Using files from jtree as web application

    Hi frnds,
    My module is to create a tree in web page ,
    there we can add new node, rename the node, remove the node etc.
    I have done this using swing and integrated this tree in applet.
    It works fine as desktop application and web page level also.
    Now , I need to update the xml file upon adding/renaming/removing the node to tree.
    It's working fine when I run this applet as desktop/stand alone application.
    But The xml file is not updating when the new node added to tree in web page.
    Please suggest me the best way to solve it.
    I have taught to use web services or socket programming.Can I try in this way?
    Thanks,
    Anil Bandlamudi

    According to the article article posted on [http://www.informit.com/articles/article.aspx?p=26316&seqNum=7] there is no direct way of using an applet to write on a server file. Although it does mention about getting the functionality done by creating a daemon on server and communicating to it by opening a communication socket. See if this helps you. Good Luck.

  • How to use KM APIs, Can we use them in Standalone J2ee Application

    Hi Experts,
    I got KM APIs.
    I need to use them to access the KM Repository Content.
    I m a newbie in SAP KM.
    Can anyone help me to use KM APIs.
    For Eg:
    com.sapportals.portal.security.usermanagement.IUser user = …
    IResourceContext resourceContext = new ResourceContext(user);
    RID rid = RID.getRID("/etc");
    try {
      IResource resource = ResourceFactory.getInstance()
                           .getResource(rid, resourceContext);
      if( resource != null ) {
        // resource found
        System.out.println("resource " + resource.getRID() + " found");
      } else {
        // resource not found
        System.out.println("resource " + resource.getRID() + " does not exist");
    catch( ResourceException e ) {
      // problem while retrieving the resource
      System.out.println(
                        "exception while trying to get resource " + e.getRID()
                        + ": " + e.getMessage()
    How will i get the IUser populated?
    Can i use KM APIs from a standalone J2EE application?
    Can i Populate IUser in standalone J2EE application's Servlet?
    Please help me out.
    Waiting for reply
    -pankaj

    Hi Prem,
    Can u tell me how to deploy a war file on to the SAP J2EE server?
    I know how to deploy on Tomcat Server, but dont have any experience abt SAP J2EE server.
    Does SAP J2EE server also have some Webapp directory like TOMCAT where we have to put our WAR File?
    Or to Deploy a WAR File in SAP J2EE server is different, if yes then wats the procedure to do that?
    And can i access the KM APIs in SAP J2EE Server?

  • Accessing JNDI from Standalone JAVA application

    Hi,
    I want to access the JNDI tree from my
    standalone java application. (ie I have
    one weblogic server contains all my ejbs and client - swing - application which accesses that. )
    Here I don't want to ship weblogic.jar
    file to the client with swing application
    because it is of ~ 20 MP.
    Any other way to specify the INITIAL_CONTEXT_FATORY class.
    My code is
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, DTEConfig.PROVIDER_URL);
    But since I don't want to give the
    weblogic.jar bundle to my client, how he
    could manage this with out weblogic.jndi.WLInitialContextFactory
    with him to get the initialContext ?
    -Rajan Kumar

    You can strip out the jndi related classes from the weblogic.jar which can be distributed
    to the client installation. I don't think you will be violating any bea licensing
    policies with this.
    Rajan Kumar <[email protected]> wrote:
    Hi,
    I want to access the JNDI tree from my
    standalone java application. (ie I have
    one weblogic server contains all my ejbs and client - swing - application
    which accesses that. )
    Here I don't want to ship weblogic.jar
    file to the client with swing application
    because it is of ~ 20 MP.
    Any other way to specify the INITIAL_CONTEXT_FATORY class.
    My code is
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, DTEConfig.PROVIDER_URL);
    But since I don't want to give the
    weblogic.jar bundle to my client, how he
    could manage this with out weblogic.jndi.WLInitialContextFactory
    with him to get the initialContext ?
    -Rajan Kumar

  • How to ensure that latest version of Flex application is loaded

    Hello experts
    I have a bit of dilemma here. I am working on application which is going to be used at various locations (globally).
    Level of technical knowledge of users varies quite a lot so do operating systems authorizations of the PCs they are working on (various companies with different level of security).
    At the moment I am facing issue where some users are still using older release of the Flex application even after refresh and deletion of temporary internet files.
    Is there any way to ensure (using some AS code or Flex project settings) that only latest versions of SWF files are loaded (not the one from buffer/cache)?
    Regards
    Michael

    BTW, I have added following line to the HTML template/wrapper:
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    but it is still picking up older version of SWF file on certain PCs. It does read latest HTML (wrapper) file though. Seems that caching is only enabled for either certain file types or files exceeding certain size.
    I have decided to do something a bit daft (or cheeky, depends how you look at it) as temporary solution and rename 2 main files (main SWF and HTML) to something like:
    Application_name_ver_XYZ.*
    It can be done in couple of minutes after release build has been exported (no need to update project itself). That way I can fool browser so it will pick up latest version (since its different file with different name).
    Main application consists of 10+ modules and some of them are compiled into separate SWF files. I am loading them inside application using ModuleLoader component. I have set parameter cachePolicy to "off" as I am not going to rename all these modules each time I am releasing new version of application.
    The end result is that main application is refreshed but all modules that are being loaded are picked up from cache (old versions).
    So as a last resort I have decided to change folder name of my application. That way all the files (main app and modules) are considered as new files since location of all of them has changed. It is just a workaround, it does work but it carries certain risks. If user will use old link application will still load (older version) and then consequences can be catastrophic (even corruption of data).
    Has anyone experienced same issues?
    I know these are more browser/network issues but how do I deal with them. Some of these people cant ask IT for support (for various reasons). Is there anything else I can do to ensure that users across the board will use latest version of application?
    Regards
    Michael

  • External JS from AIR with Flex?

    Hi,
    I wonder if this is possible. I have a AIR application built
    using Flex, I would like to apply syntax highlight within the flex
    application - but my actionscript experience is very limited.
    My question:
    I've used JavaScript syntax highlighting scripts before
    (shjs) - I would like to use this package inside my Flex
    application. Is this possible, can I load and use external
    JavaScript files inside Flex/Air apps?
    I see this can be done using Flex in a Browser (flex without
    AIR) with the 'ExternalInterface API' - is this currently available
    for AIR or is there any other method available to do this?
    To me this is a huge factor for the success of Flex inside
    AIR. I have a huge range of JavaScript libraries I've built over
    the years, it would really suck if I had to rewrite everything in
    ActionScript.
    Any ideas??

    Hi,
    With AIR, you don't need to worry or think about
    ExternalInterface. AIR comes in built with webkit. Just use the
    mx:HTML control to load your html page containing the javascript
    and you will be able to make JS calls from your Flex side.
    But do note that there are limitations to what sort of JS can
    be run within the HTML control. Especially around "eval". Take a
    look at
    http://livedocs.adobe.com/flex/3/html/help.html?content=security_4.html#1091782

  • Embedding Flex applications inside a portlet question

    I'm trying to embed a Flex application within a Java portlet on my WLP 10.3.2 portal. I'm able to display the Flex app in the portlet but now I'm trying to access data. Does anyone know of any documents that cover how to access Flex data from a portlet and how to access portlet data from the embedded Flex application?
    thanks

    When you mentioned you integrated Flex App inside a Portlet, are you using like iFrame tag or Browser Portlet where in iFrame tag you specify the Flex app url like that. If so, then you will not be able to share any data/information between this iFrame portlet and the actual other real portlets.
    If these Flex app has something like JSR based Flex portlets, then you can integrate them in WLP more easily. Another option is to consume these Flex Portlets as remote portlets using WSRP on WLP Side and the producer will be Flex Portal App (with flex portlets).
    See if this link helps: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=wsrp_1.html
    Ravi Jegga

Maybe you are looking for

  • Problems with SOAP Adapter/Interface

    Hi Experts, we currently try and experiment with XI 3.0 Stack 09 and the SOAP adapter respectively. We started with a simple interface (foo..., see wsdl attachment) that we want to provide by XI. All configurations (SLD, Integration Repository, Integ

  • Choosing a Core Switch

    Hi, What are the criterias when choosing a core switch? For example, in the Cisco product pages - the Catalyst 4500 and 6500 are already distribution/core switches while the Catalyst 3750 are access/edge switches. Can I make a stack of Catalyst 3750

  • Using table in h:dataTable

    I'm trying to use <table> tags inside an h:column tag in an attempt to control formating with colspan and rowspan attributes like this: <h:dataTable var="data" value="#{upConference.conferences}" columnClasses="vert" rowClasses="evenrow, oddrow"> <h:

  • Following an upgrade I can't see any of my photos

    Hi, I have just upgraded my iPhoto but it is acting as if I haven't got any photos in my library.  When I go to the iPhoto Library icon, I can see that the file size is 118GB so I checked the package contents, and there's nothing in the Masters folde

  • When I push my on off button my phone is slow to turn on

    My software is completely updated and my phone is new but whenever I push my on/off button to unlock my phone, my screen won't turn on for several seconds after I push the button. Not sure why it's doing this or how to fix it?