FB beta 2 PHP services genretated code

looking for some doco on this - the new version has the old doco
Accessing  data with Flex / Implementing services for data-centric applications
section
rgds
martin

I happen to be updating this part of the Flash Builder documentation this week.
Attached is the latest version of this topic in PDF format. It contains updated service examples in PHP and ColdFusion. The examples were derived from the code generated by Flash Builder.
HTH
Vince Genovese
Senior Technical Writer

Similar Messages

  • Access MySQL Database on Server with PHP Services

    Hi there
    There are lots of tutorials on how to connect to a MySQL database on your local machine but I'd like to access a database on my server.
    When creating a new Flex Project the wizard asks me to define a Web root and a Root URL. I used '/home/ecoflexer/public_html' as Web root and 'http://ecoflexer.com' as Root URL. However, the Web root coudn't be validated. So I've chosen the local folder 'C:\ecoflexer' as Web root. Though it was possibly wrong Flash Builder generated a debug folder at the defined location. After that I went to "Connect to Data/Service" and selected "PHP Service". I tried to generate a sample using the same credentials I use for a standard PHP login script ("Server Port" was left empty). After clicking on "Connect to Database" Zend was installed and returned an error. 'gateway.php' couldn't be found on 'http://ecoflexer.com/testProject-debug/gateway.php'.
    So I went into my local Web root and copied the 'testProject-debug' folder to my server to the destination the previous error mentioned. Then another error occured concerning a Zend file. So I went back and copied the whole 'ZendFramework' folder as well to my server. It connects now successfully to my database. I can chose a table but soon after that the introspection of the service fails. I modified the 'amf_config.ini' by adding 'webroot =/home/ecoflexer/public_html' and 'zend_path =/home/ecoflexer/public_html/ZendFramework/library' but it's still not working. Anithing I've done wrong or forgot to do?
    Cheers!
    ecoFLEXER

    iam doing client server application,the database is on the server,and iam doing the log in part,so i need to access the database to match the entered user name and password?so i should implement the accessing database part on the server side with the above code,right?i didn't test that i will test it now,but i thought that it's a different way

  • Why doesn't my php service work on the mobile device but in the emulator?

    I currently have a browser version of my Flex app that uses a series of php services to provide database functionality.  It works well- now I am looking to add a mobile version.  I have segmented all my code such that I have a core of code that both the desktop and the mobile can use with the specifics placed on top.  I have been testing my mobile version in the emulator and the php services work fine.  But when I use the mobile application on the device it has no connectivity.
    I have checked and:
                                      <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    is in my manifest and in the application the permission says full network access.
    I am attempting to run it on a Droid Bionic running ICS.
    Also the webservice endpoint is secured.  I have manually set it in the project in several locations (I don't think I missed any...)
    Any suggestions would be appreciated.
    Thanks,
    -Jonathan

    If serials don't work, you may simply have the wrong installer like one that is for an upgrade or different region of the world and using site license serials may not help the matter. Assuming your really mean Premiere 6, not CS6, that is. Anyway, beyond that generic advise nobody will be able to help you much. It's simply old software and even I can barely remeber those versions anymore much less any specifics regarding install and licensing back then.
    Mylenium

  • How to bind a PHP service to an ArrayCollection

    Ok. i have used Flash builder data connect wizard to connect to my database and generate some PHP services.
    One of them being a get all service.
    I can drag and drop that onto a datagrid fine and it works.
    But
    Could someone please tell me, with as much detail as possible how to call that service, and bind it to an array/arraycollection.

    Hi,
    I meant to use the code completion when you create the service instance in MXML.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"    
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
         minWidth="955" minHeight="600"
         xmlns:services="services.*"
         >
         <fx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
                   import mx.rpc.events.FaultEvent;
                   import mx.rpc.events.ResultEvent;
                   [Bindable]private var images:ArrayCollection;
                   protected function myService_resultHandler(event:ResultEvent):void
                        images = event.result as ArrayCollection;
                   protected function myService_faultHandler(event:FaultEvent):void
                        trace(event.fault.faultString);
                   protected function button1_clickHandler(event:MouseEvent):void
                        myService.tblimagesService.getAllTbl_images();
              ]]>
         </fx:Script>
         <s:Button label="Get Data" click="button1_clickHandler(event)"/>
         <fx:Declarations>
              <services:TblImagesService id="myService"
                   result="myService_resultHandler(event)" fault="myService_faultHandler(event)"/>
         </fx:Declarations>
    </s:Application>
    The previous example is modified to include the namespace in the application tag, assuming that yourTblImagesService is in the services folder. If it is different, change the namespace declaration .

  • Overriding doPost() better than service() method

    why overriding doPost() or doGet() is better than service() method
    in servlets
    thanx

    One reason is to help break your code up into more manageable pieces. For example, let's say you have a page that displays a list of Employees when called via GET, but also includes a FORM that lets you delete employees based on checkboxes included on the form with a SUBMIT button. If you use the doService, you'll probably have to do something like this:
    doService(request, response) {
      if (request.getMethod().equals("get")) {
        // handle GET logic
      else {
        //  handle POST logic
    }However, if you have two separate methods, it makes the logic a little simpler. For example:
    doGet(request, response) {
      // handle GET logic
    doPost(request, response) {
      // handle POST logic
    }The distinction is fairly minor, but I do think the code is cleaner without having to check for gets and posts. With that said, I have plenty of servlets that use the doService() method because there is no distinction in those servlets between the doGet() and doPost() functionality.
    Michael

  • Exception while accessing web service through code

    I have a web service developed using AXIS deployed on Weblogic 8.1
    Another web application cotaining GUI deployed on Weblogic 10 tries to access this web service through code.
    This piece of code to invoke the web service is written in Action Class present inside web application. (Struts is used in GUI based web app)
    When the code tries to invoke web service I am getting following error.
    (401)Unauthorized xxx
         at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
         at org.apache.axis.client.Call.invoke(Call.java:2553)
         at org.apache.axis.client.Call.invoke(Call.java:1753)
         at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.invokeAx(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:243)
         at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.callUCS77_1ProcessOfficialChangeWebService(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:173)
         at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.processAction(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:133)
         at com.ebv.framework.web.action.EBVAction.execute(EBVAction.java:106)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    The web service URL is as follows:
    http://10.140.96.5:7808/services/ucs77_1/ProcessOfficialChangeSave77_1-v0001.soap
    However
    When I try to hit the webservice URL directly on browser login window appears where same username/password I provide which are passed in code to invoke the web service. I get the success page indicating that web service is invoked on hitting enter.
    The method used in UCS77_1ProcessOfficialChangeSaveDetailsAction.java to invoke web service is as follows:
    public String invokeAx
                   String xmlMessage,
                   String webServiceURL,
                   String webServiceOperation,
                   String username,
                   String password)
              String xmlResponse = null;
              Call webServiceCall = null;
              InputStream input = new ByteArrayInputStream(xmlMessage.getBytes());
              Service service = new Service();
              try
                   webServiceCall = (Call) service.createCall();
                   SOAPEnvelope env = new SOAPEnvelope(input);
                   SOAPEnvelope resEnv = null;
                   webServiceCall.setTargetEndpointAddress(new URL(webServiceURL));
                   webServiceCall.setOperationName(new QName(webServiceOperation));
                   webServiceCall.setUsername(username);
                   webServiceCall.setPassword(password);               
                   try
                        resEnv = webServiceCall.invoke(env);
                   catch (AxisFault e)
                        e.printStackTrace();
                        Message responseMessage = webServiceCall.getResponseMessage();
                        SOAPEnvelope soapXml = (SOAPEnvelope) responseMessage.getSOAPEnvelope();
                        xmlResponse = new String(soapXml.toString().getBytes(AppConstants.UTF8),AppConstants.UTF8);     
                   if (xmlResponse == null)
                        xmlResponse = resEnv.toString();
              catch (Exception e1)
                   e1.printStackTrace();
              return xmlResponse;
    Both the weblogic server reside on two different AIX machines.
    Can anybody tell what's the problem while invoking web service through code?

    time to look into the gateway logs as stated by the fault ..
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns:p="http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode><faultstring>Step execution failed with an exception</faultstring><detail></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    looks like the cipher step might have failed

  • Creation of Service Tax code for Service Tax Payable

    Hi
    Please advise me to create service tax code for service tax payable
    Thanks and Best Regards
    Shekhar
    Edited by: Shekhar Yecham on Sep 16, 2008 8:28 PM

    Hi Randeep,
    As they said it is service tax GTA.Right we are doing out of SAP, we want it to be done in SAP
    The tax calculation will be like below
    service tax of 10.3%  has to caluclate on the 25% of the Base amount. Like
    25% is taxable and 75% is livied.
    Base Amount - 100.00
    25% of the base amount(100/25) = 25.00
    service tax(10.30%) to be calculate on Rs. 25.00
    25*10.30% = 2.57
    Base amount --> 100.00
    Service Tax  -->      2.57
            Total:           102.57
    Regards,
    Siva.

  • Creation of Service Tax code 10.30% on the 25% of the Base Amount

    Dear Team,
    We want to create a service tax code of 10.3% on the 25% of the Base amount.
    Base Amount - 100.00
    25% of the base amount(100/25) = 25.00
    service tax(10.30%) to be calculate on Rs. 25.00
    25*10.30% = 2.57
    Base amount --> 100.00
    Service Tax  -->      2.57
          Total:                     102.57
    Can somebody let me how to create the service tax code for this.
    Regards,
    Siva.

    Hi Randeep,
    As they said it is service tax GTA.Right we are doing out of SAP, we want it to be done in SAP
    The tax calculation will be like below
    service tax of 10.3%  has to caluclate on the 25% of the Base amount. Like
    25% is taxable and 75% is livied.
    Base Amount - 100.00
    25% of the base amount(100/25) = 25.00
    service tax(10.30%) to be calculate on Rs. 25.00
    25*10.30% = 2.57
    Base amount --> 100.00
    Service Tax  -->      2.57
            Total:           102.57
    Regards,
    Siva.

  • I am facing problem in starting ShellHWDetection service Error code 1075,please help

    I am facing problem in starting ShellHWDetection service Error code 1075,please help

    Shellhwdetection is a Windows service which stands for Shell Hardware Detection Service.
    It provides notifications for AutoPlay hardware events.
    System error code 1075 means "The dependency service does not exist or has been marked for deletion."
    Please run services.msc, then find Shell Hardware Detection Service, view its dependencies
    Make sure the three services are set to running "automatic" in Services.
    If this doesn't help, then run sfc to check if there're some missing or corrupted files in system.
    Yolanda Zhu
    TechNet Community Support

  • WSDL / Web Service Skeleton code Generation Tool

    Hello,
    My name is Joe Roberts. I am a developer in the Oracle Insurance Global Business Unit, A recent Oracle acquisition. I currently have the need to create a web service based on a schema that has certain base fields that never change and certain other base fields that do change based upon each customer implementation. What I am looking for is a tool that will generate a WSDL and web service skeleton code from a schema from the command line so that I can automate this process. Does Oracle offer such a tool? I have looked for one but have not found it. The only tool that I have been able to find that does this is Spring-WS but I would rather not use Spring-WS and go with an Oracle solution if possible.
    Thanks,
    Joe

    Hi,
    use wsa.jar (jdeveloper: e.g. jdeveloper10.1.3.3/webservices/lib/)
    for syntax read:
    http://download-uk.oracle.com/docs/cd/B31017_01/web.1013/b28974/wsassemble.htm#CHDDBCCA

  • Flex and zend , php services - soooo slow. any ideas?

    Hey Folks,
    I have a flex application that uses PHP services with the Zend framework.
    When I run it locally, the speed is great. My largest query returns data to my datagrid in 2-3 seconds.
    When I do run it locally, it is pulling from the production database.
    When I move the project to my dedicated server, the same query takes a painful 30 seconds.
    When I run the SQL query directly in MYSQL, it is back to around 2 seconds.  So the problem is not the query itself.
    So, any ideas why the results would take so much longer in my production environment? I purposely purchased dedicated server hosting because I thought it might of been server load.  That didn't help.  The queries are not complex at all. The most they return is under 200 rows.
    In summary: Why would my results set populate so much quicker on my development computer than on the production server?
    Using:
    Flash builder 4
    mysql
    php
    zendframweork
    Thank you for any assitance.
    -greg

    Your question seems to be outside of the scope of this forum.  But as someone who uses Zend_AMF and PHP for a backend I'll take a whack.  Have you analyzed your query, you may discover some inefficiencies there ?  This could be a problem if you have many joins, not leading you "WHERE" statement off with the most selective property and so on and so on try basic db optimizations if you haven't already.  Are you using an ORM of any kind ?  These can add to the time it takes to get results back, especially if you have lazy loading enabled instead of bringing back associated objects with your query and not on the fly.  The next step I would check would be for any type of serialization issues that might arise if you are doing so.  Even though a database usually isn't considered "large" until it has 10's of millions of rows, joins as I have verified the hardway, when done incorrectly without any type of keys or indexing can be particularly painful.

  • Error on Production Server when php service is called.

    The web application runs fine on my development machine but on the production server it gives me the following error and no responce when a phpservice is called.
    error:
    Send failed
    Channel.Connect.Failed error NetConnection.Call.BadVersion: : url:
    'http://ipaddress/Project/public/gateway.php'
    Network Monitor:
    Development Machine:
    Windows 7
    MySQL 5.5.16
    Zend Framework 1.10
    Production Machine:
    Ubuntu 11.10
    MySQL 5.1.58
    Zend Framework 1.11
    I followed the following steps to deploy the application on production server;
    1. created identical database with same credentials on the production server
    2. confirmed that my php service works on the server by manually navigating to the php file and printing the data retrieved on the page
    3. modified the paths in amf_config.ini to reflect production server
    [zend]
    webroot = "/var/www"
    zend_path ="/usr/local/zend/share/ZendFramework/library"
    library ="/var/www/Project/library"
    services ="/var/www/Project/services"
    [zendamf]
    amf.production = true
    amf.directories[]=Project/services
    4. initialized the class by adding
    // Initialization customization goes here
    _serviceControl.endpoint = "http://ipaddress/Project/public/gateway.php";
    in the .as file for the php service
    I have also found from my zend server logs that when my php service is called its throws the following error:
    PHP Notice:  Undefined index: HTTPS in /usr/local/zend/share/ZendFramework/library/Zend/Amf/Response/Http.php on line 59
    I doubt that there is anything wrong in the deployment process but please do let me know if you could think of something i might have missed.
    The other thing im wondering is the php notice if it were to be caused due to different Zend Framework versions!
    Kindly advice

    EGJ Steens has post a fix at http://forums.adobe.com/message/4097998#4097998#4097998/Using Flash Builder
    Zend framework 1.11 added an extra function in the Http.php file (which was mentioned in the post) and was fixed as follows
    protected function isIeOverSsl()
            $_SERVER['HTTPS'] = 'off';  //Adding this line fixed the issue
            $ssl = $_SERVER['HTTPS'];
            if (!$ssl || ($ssl == 'off')) {
                // IIS reports "off", whereas other browsers simply don't populate
                return false;
            $ua  = $_SERVER['HTTP_USER_AGENT'];
            if (!preg_match('/; MSIE \d+\.\d+;/', $ua)) {
                // Not MicroSoft Internet Explorer
                return false;
            return true;
    My concern is if i wish to secure my application with ssl using HTTPS will this prevent me from doing so.
    Any Pointers Anybody?

  • Sample PHP Service selecting from multiple tables

    Hi all!
    I have the following challange:
    How do I properly set up my PHP-service to insert, select, update and delete values from multiple tables?
    So far, the standard templates generated by Flash Builder is based on a single table.
    Example: I have 2 tables: [person] and [school]
    [person] has [person_id, first_name, last_name, birthdate]
    [school] has [school_id, person_id, school_name, city]
    One [person] can have multiple [schools]
    How should I define the selectByID function in PHP to be able to have
    First name: [TextInput /]
    Last name: [TextInput /]
    Birthdate: [DateField /]
    Schools:
    [TabBar: School1, School2, School3 /]
    [ViewStack1]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack1]]
    [ViewStack2]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack2]]
    [ViewStack3]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack3]]
    And even more interesting: How do I update all these fields back to the database?

    First, the relationship between school and person is many-to-many NOT one-to-many -- you will need to add a junction table.
    From the form you have given I would handle insertions like this:
    loop through all the schools and see if the school already exist in the DB. If so, then store the school_id. If not, then create a new record and store the id. You should have an array collection of store_ids by the end of the loop
    Check whether the student exists w/in the DB. If so, then you might consider aborting the operation or you could opt to do an update. If the student doesn't exist, then create a new student record and store the new student_id (mysql::insert_id)
    Loop through the school_id array and add new student_id/school_id records into the junction table.
    Retrieving records is much simpler -- it's just a join on the tables i.e. "SELECT * FROM student INNER JOIN school_student ON student.student_id = school_student.student_id INNER JOIN schools ON school_student.school_id = school.school_id WHERE student.first_name = 'John' AND student.last_name = 'Doe' (assuming there aren't more than one John Does of course!).
    - e

  • Php services running on an application server

    Running the test application concerning php services on my local xamp installation just works fine.
    But unfortunately I am not smart enough to test it on my ISP application server!
    Is there a way to test a remote server. So far I haven't seen any tutorial covering this issue ...
    Any help would be highly welcome.

    The export release workflow is under development. Till then you can try the following manual steps to move your application to a production server:
    1. Your current local webroot would have a folder called ZendFramework, zip it and upload it to your server. Unzip the framework in your web root. One point though, installing the framework in webroot is not the recommended by Zend, so if you are able to manage some other install location then that would be the best way to install ZF. If ZF is installed in a location other than webroot, then you would have to update the amf_config.ini file which will arrive at your server in the subsequent steps.
    2. find/replace all the endpoint URLs in the MXML files from http://localhost:8080/ProjectName-debug/gateway.php to /<sitename>/gateway.php
    3. export release build of the project
    4. ensure that the gateway.php and amf_config.ini have been copied into the bin-release folder.
    5. zip the bin-release folder contents into <sitename>.zip
    6. upload sitename.zip and unzip its contents in /wwwroot/<sitename>/
    Hope this helps...
    -mayank
    Message was edited by: Mayank (Adobe)

  • Service Tax Code Creation?

    Hi,
    While raising A/R Invoice I have to charge service charges of Rs. 100000/- in which 67% is exempted from Service tax. In this circumstances how i have to create Service tax set up.
    Ex.  Service Charges -
    1,00,000
    Less : Abatement 67%----
    67000
              Balance 33% -
    33000
              Service Tax @ 12.36%on  33000                  4,079
    Invoice Total Should be                                      1,04,079
    Pl. help me in this regard for setting up the service tax code.
    Thank & Regards
    Sampath Devuneri

    sampath,
    Pl follow the below link for defining tax code
    use s-user id to login,
    https://websmp208.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000680297&_SCENARIO=01100035870000000183&_ADDINC=011000358700002837782005E&
    There is a document in pdf
    Localization in 2005B for India
    Jeyakanthan

Maybe you are looking for

  • I updated to iOS 5 and now my iPod Touch 3g won't sync. Help?

    My iTunes told me to update to iOS5, so I did. I saved a backup, got the new OS and it restored my iPod. The problem is that it didn't actually restore it. None of my music or apps was on my iPod. So I tried syncing it. No such luck. I tried changing

  • Best way to generate report on huge data table

    Hi, I am using Oracle11g. I want to generate reports on transaction tables containing huge amount of data, on which very frequently DMLs are performing in real time. i want to keep my report/result in RESULT_CACHE for 15 mins. active. whenever any in

  • To get checkboxes in the results table of SEARCH page?

    Hi, I am trying to create a search form using 'Execute With Params', while doing this I am getting radiobuttons when I go for Enable Selections , but I want Checkboxes to be present there instead of Radio Buttons. And also when the page is displayed

  • W510 - DisplayPort to HDMI with Audio

    Hi, I am wondering if the new Calpella solution in W510 offers DisplayPort to HDMI conversion with audio-support. Is there any information so far regarding this issue? Would be nice to get some official statement. greets Beniamin

  • Clock not updated  on the menue bar

    The time stamp on the Mac OS X Menu bar is not updated: The clock is "broken".  When moving the cursor over the menu bar form left to right, the cursor changes to a spinning wheel starting at the bluetooth icon.  It seems the rest of the system works