Flakey ZEND / PHP - FB2 services. I think?

this is driving me nuts
I can use the application I'm developing ( Flex app hosted on a DV at Media Temple, mysql/apache + Zend )  - add and edit content just fine. Not a single error.
However :-(
Others using different OS/Browser/Network/Locations problems are getting intermittent "Channel Disconnect" errors. Sometimes it works, sometime it does not.
I change machines/browser from my house and - still no errors!  Mac / PC, Chrome / FF / IE
Even trying to debugg the errors from my end is proving tough - because no errors are being thrown.
Any tips on how to find out what is going on. I use Charles my end to get at the RAW response, and this has been helpfull in the past.
<membercontentservice:MembercontentService id="membercontentService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail);" showBusyCursor="true"/>
Any help appreciated.
rgds
martin

Hi,
I would be looking at zendAMF, one thing you could do is update to the latest ZendAMF, 1.10.2 , and see if this helps the situation.
http://framework.zend.com/download/amf
If the host you are using has zend optimisation make sure its disabled, zend optimization is nearly as flakey as ZendAMF. Zend have been promising for some time now to improve the performance of ZendAMF( I think a lot of the issues people experience can be related back to performance, the internet wasn't designed for products that have to think to long about how they will respond to a request.).
I don't know what the size of data is you are retrieving but if there is room to optimize what you 'fetch' that could also help.
David.

Similar Messages

  • How to send JSON data in HTTPService to PHP web service question

    I'm using Flex 4 and a mx:HTTPService to send a JSON request to a php web service. I'm not sure if I'm sending the request correctly. Could someone look at the code below to see what I'm doing wrong?
    thanks
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   width="100%" height="100%">
        <fx:Declarations>
            <mx:HTTPService id="service" url="https://my web service url/"
                            method="POST" resultFormat="text" result="onResult(event)" fault="onFault(event)">
            </mx:HTTPService>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import com.adobe.serialization.json.JSON;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.utils.Base64Encoder;
                [Bindable]private var username:String = "[email protected]";
                [Bindable]private var password:String = "the password";
                [Bindable]private var accountNumber:String = "49055";
                [Bindable]private var anticipatedDeliveryDate:Number = 20101115;
                [Bindable]private var purchaseOrder:String = "#123 for retailer";
                [Bindable]private var detailRecords:Array = new Array();
                [Bindable]private var key:String = "abc123";
                private function populateService():void {
                    populateProducts();   
                    setRequestHeader();
                    setRequestData();
                    service.send();   
                private function setRequestHeader():void {
                    var encoder:Base64Encoder = new Base64Encoder();
                    encoder.insertNewLines = false;
                    encoder.encode(key);               
                    service.headers["Authorization"] = "VIP " + key;
                    service.headers["Content-Type"] = "application/json";
                private function setRequestData():void {
                    service.request.username = username;
                    service.request.password = password;
                    service.request.accountNumber = accountNumber;
                    service.request.anticipatedDeliveryDate = anticipatedDeliveryDate;
                    service.request.purchaseOrder = purchaseOrder;
                    service.request.detailRecords = detailRecords;
                    // caching test
                    var rnd : Number = Math.round(Math.random()*1000);
                    service.request.cacheOff = rnd;
                private function populateProducts():void {
                    var prod1:Object = new Object();
                    prod1.itemCodeOrUPC = "00241";
                    prod1.itemDescription = "Budweiser Keg 1/2 BBL";
                    prod1.quantityOrdered = 2;
                    prod1.orderUOM = "Keg";
                    var prod2:Object = new Object();
                    prod2.itemCodeOrUPC = "00219";
                    prod2.itemDescription = "Budweiser 24/12 OZ CAN";
                    prod2.quantityOrdered = 4;
                    prod2.orderUOM = "Case";
                    detailRecords.push(prod1);
                    detailRecords.push(prod2);
                private function onResult(event:ResultEvent):void
                    var json:Object = JSON.decode(event.result as String);
                private function onFault(event:FaultEvent):void
                    trace("Fault: " + event.fault.faultString);
            ]]>
        </fx:Script>
        <mx:Panel width="95%" height="100%" color="#000000">
            <mx:HBox width="100%">
                <mx:Button label="Submit" click="{populateService()}"/>
            </mx:HBox>   
        </mx:Panel>
    </s:Application>

    Have you think abut using ActionScript in your Flex application? Or, you can write javascript to be proxy between your flash app and backend PHP web service?
    Also, it seems that you will allow every customer's flash player to have a copy of secret code. I think it is dangerous design because an flv file can be easity decompiled. Therefore, you secret code can be found if it is not input by your end user and it is populated on your serverside script.

  • Problems on Windows 7 Professional 64 with PHP data service

    I've created a data service using PHP in a PHP Eclipse project and I'm trying to connect to it from my new Flash project. When I try to create a custom data type via the Configure Return Type dialog, "Auto detect the return type from sample data" radio button, I get the following error:
    There was an error while invoking the operation. Check  your operation inputs or server code and try invoking the operation again. 
    Reason:
    Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2003): Can't connect to MySQL  server on 'localhost' (10061) in  C:\Users\davidk\workspace\php-global-includes\mysqlAccess.inc.php on line  11
        /0/onStatusÿÿÿÿ �SIflex.messaging.messages.ErrorMessage extendedData faultCode faultDetail faultString rootCause correlationId clientId destination messageId timestamp timeToLive headers  body  „m …a#0  C:\Zend\ZendServer\share\ZendFramework\library\Zend\Amf\Server.php(550):  Zend_Amf_Server->_dispatch('getProductVersi...', Array, 'GetPlayData')#1  C:\Zend\ZendServer\share\ZendFramework\library\Zend\Amf\Server.php(626):  Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http))#2  C:\Zend\Apache2\htdocs\play-debug\gateway.php(69):  Zend_Amf_Server->handle()#3 {main} ‚UError instantiating class GetPlayData to  invoke method getProductVersions: Error connecting to database server as user  via password configured in  config_cdna_testdb.php  IE83D9958-920E-E203-54BC-E5365BD85289 I5496259E-8C36-AC89-E234-00000D37FD49  I7E8A1BD7-9D60-9329-DBFB-00001B5BE8C7  126823334100     
    Note that I've tested the GetPlayData class and the getProductVersions() method with some simple "unit testing" code and it works fine when I execute it directly. It just won't run when called from this dialog.
    I tried to debug the gateway.php process that is used to do this connecting without much success so far.
    Is Windows 7 supported for PHP data service development in this beta release? I'm using Version 4.0 build 253292

    One more clue: the message from the exception shows that the global variables I'm using to configure the MySQL connection parameters are not set somehow. Maybe I need to upgrade my Zend Framework?
    Nope. I upgraded to the latest Zend Framework and it still did not work. The global variables are not working. When I hard coded the connection parameters into the constructor of the GetPlayData class, then it worked fine. I just switched to using define() to create constants instead of using the globals and that worked, too.
    It is as if globals set in one include file are not available in another include file. I agree that using them might be a bad programming practice of sorts, but it seems wrong to disallow / not support something that is part of the core language!
    So, I don't know if this is a Windows 7 thing or just a general behavior. Globals within the same file seem to work fine still, but not from another include file.
    So the answer for me is to not use these cross-include file globals in code that is going to be used from Flash Builder.

  • Flash Builder 4.5 Auto-Gen Code For PHP Data Service Produces Errors

    Hello
    I'm currently running a fresh install of MAMP on my Mac and when I start a new flex project, add a php data service that pulls from a mysql database I have. Everything works fine until I try to compile. The error I'm getting is 'uid' being the primary key which is a bigint(20). The file _Super_Users.as (auto-gen based on the user table below) reports 2 errors: [Managed] requires uid to be of type 'String'. (same error on 2 lines of code) Now the MySQL table wants it to be a int, the auto gen code seems to want it to be an int as well but for some reason its putting in these requires for String on the getter and setters for 'uid'. The is before I even add any of my own code, just auto-gen then compile.
         * data/source property getters
    [Bindable(event="propertyChange")]
        public function get uid() : int /*error line*/
            return _internal_uid;
         * data/source property setters
        public function set uid(value:int) : void /*error line*/
            var oldValue:int = _internal_uid;
            if (oldValue !== value)
                _internal_uid = value;
    This is what my database looks when I export it:
    CREATE TABLE `users` (
      `uid` bigint(20) unsigned NOT NULL,
      `name` varchar(150) NOT NULL,
      `first_name` varchar(50) NOT NULL,
      `middle_name` varchar(50) NOT NULL,
      `last_name` varchar(50) NOT NULL,
      `gender` tinyint(1) NOT NULL,
      `locale` varchar(5) NOT NULL,
      `link` varchar(255) NOT NULL,
      `username` varchar(50) NOT NULL,
      `email` varchar(255) NOT NULL,
      `picture` varchar(255) NOT NULL,
      `friends` text NOT NULL,
      `created` datetime NOT NULL,
      `updated` datetime NOT NULL,
      PRIMARY KEY (`uid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    It's empty right now...
    Apache 2.0.64
    MySQL 5.5.9
    PHP 5.2.17 & 5.3.5
    APC 3.1.7
    eAccelerator 0.9.6.1
    XCache 1.2.2 & 1.3.1
    phpMyAdmin 3.3.9.2
    Zend Optimizer 3.3.9
    SQLiteManager 1.2.4
    Freetype 2.4.4
    t1lib 5.1.2
    curl 7.21.3
    jpeg 8c
    libpng-1.5.0
    gd 2.0.34
    libxml 2.7.6
    libxslt 1.1.26
    gettext 0.18.1.1
    libidn 1.17
    iconv 1.13
    mcrypt 2.5.8
    YAZ 4.0.1 & PHP/YAZ 1.0.14
    I tried to give as much info as possible, if you need more let me know...

    I discovered my problem was uid seems to be a built in global or something and was filling in that data field with a bunch of letters and number, like the device id. Because of the letters flex was throwing a fit. So if you're using Facebook API in flex be sure to not go with uid for the user id, which is was facebook api calls it.

  • Tutorial: Flash Builder 4 beta 2 and PHP Data/Services for beginners

    Hi fellas,
    I've written this tutorial for total beginners to get quickly to FB4 and PHP. Comments welcome
    Flash Builder 4 and PHP Data/Services for beginners
    http://www.flashrealtime.com/flash-builder-4-and-php-data-services/

    Hi,
    The first issue will be the pathing differences between wamp/mamp/xampp, some use www as root others htdoc you need to setup the php services on your local machine rather than importing a project.
    The created services will have a connection array declared at the top of the code that points to the mysql server, in the project default debug folder you will have the config file that has the zend and webserver path
    top of service file
    ============
    var $username = "root";
    var $password = "";
    var $server = "localhost";
    var $port = "3306";
    var $databasename = "zend";
    var $tablename = "clients";
    var $connection;
    amfconfig.ini
    =========
    [zend]
    ;set the absolute location path of webroot directory, example:
    ;Windows: C:\apache\www
    ;MAC/UNIX: /user/apache/www
    webroot =C:/wamp/www
    ;set the absolute location path of zend installation directory, example:
    ;Windows: C:\apache\PHPFrameworks\ZendFramework\library
    ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework/library
    ;zend_path =
    [zendamf]
    amf.production = false
    amf.directories[]=Zender-debug/services
    In your main project folder you have a .model folder the file there is an *.fml file that contains your channel endpoints etc.
    David.

  • JWSDP, webservices and weblogic 8.1 talking to a PHP web service

    Hello all. I have a web service client running in weblogic 8.1 on Redhat, when I try to send the data to the service I get:
    Sep 14, 2006 12:00:29 PM com.sun.xml.messaging.saaj.soap.MessageImpl identifyContentType
    SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
    Sep 14, 2006 12:00:29 PM com.sun.xml.messaging.saaj.soap.MessageImpl <init>
    SEVERE: SAAJ0535: Unable to internalize message
    Thu Sep 14 12:00:29 MDT 2006 RiverbedShipmentSubscriberMDB.createAndSendXML(): Exception: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
            HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
    Thu Sep 14 12:00:30 MDT 2006: email information TO: [email protected] FROM: [email protected]
    Thu Sep 14 12:00:30 MDT 2006: sent mail
    java.rmi.RemoteException: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
            HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:88)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(RiverbedShipmentSubscriberMDB.java:621)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.onMessage(Ljavax.jms.Message;)V(RiverbedShipmentSubscriberMDB.java:434)
            at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:382)
            at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
            at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(Ljava.lang.String;Lcom.sun.xml.rpc.soap.message.SOAPMessageContext;)V(HttpClientTransport.java:140)
            at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderState;)V(StreamingSender.java:96)
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:72)That is using JSWDP 1.6, when I use 1.3 I get a similar message:
    Thu Sep 14 11:46:29 MDT 2006 RiverbedShipmentSubscriberMDB.createAndSendXML(): Exception: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html; nested exception is:
            HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
    Thu Sep 14 11:46:29 MDT 2006: email information TO: [email protected] FROM: [email protected]
    Thu Sep 14 11:46:29 MDT 2006: sent mail
    java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html; nested exception is:
            HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:88)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(RiverbedShipmentSubscriberMDB.java:621)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.onMessage(Ljavax.jms.Message;)V(RiverbedShipmentSubscriberMDB.java:434)
            at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:382)
            at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
            at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(Ljava.lang.String;Lcom.sun.xml.rpc.soap.message.SOAPMessageContext;)V(HttpClientTransport.java:140)
            at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderState;)V(StreamingSender.java:96)
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:72)This makes me think that the PHP web service is returning a content type header of text/html instead of text/xml. Is there a way to make the JWSDP code ignore that or to make the PHP code return the correct header content type?
    Here is a similar thread but I'm not having any luck with the answers in it:
    http://forum.java.sun.com/thread.jspa?threadID=643810

    Hello all. I have a web service client running in weblogic 8.1 on Redhat, when I try to send the data to the service I get:
    Sep 14, 2006 12:00:29 PM com.sun.xml.messaging.saaj.soap.MessageImpl identifyContentType
    SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
    Sep 14, 2006 12:00:29 PM com.sun.xml.messaging.saaj.soap.MessageImpl <init>
    SEVERE: SAAJ0535: Unable to internalize message
    Thu Sep 14 12:00:29 MDT 2006 RiverbedShipmentSubscriberMDB.createAndSendXML(): Exception: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
            HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
    Thu Sep 14 12:00:30 MDT 2006: email information TO: [email protected] FROM: [email protected]
    Thu Sep 14 12:00:30 MDT 2006: sent mail
    java.rmi.RemoteException: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message; nested exception is:
            HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:88)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(RiverbedShipmentSubscriberMDB.java:621)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.onMessage(Ljavax.jms.Message;)V(RiverbedShipmentSubscriberMDB.java:434)
            at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:382)
            at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: HTTP transport error: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
            at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(Ljava.lang.String;Lcom.sun.xml.rpc.soap.message.SOAPMessageContext;)V(HttpClientTransport.java:140)
            at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderState;)V(StreamingSender.java:96)
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:72)That is using JSWDP 1.6, when I use 1.3 I get a similar message:
    Thu Sep 14 11:46:29 MDT 2006 RiverbedShipmentSubscriberMDB.createAndSendXML(): Exception: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html; nested exception is:
            HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
    Thu Sep 14 11:46:29 MDT 2006: email information TO: [email protected] FROM: [email protected]
    Thu Sep 14 11:46:29 MDT 2006: sent mail
    java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html; nested exception is:
            HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:88)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.createAndSendXML(Ljava.lang.String;)V(RiverbedShipmentSubscriberMDB.java:621)
            at com.mcdata.ejb.riverbedshipment.RiverbedShipmentSubscriberMDB.onMessage(Ljavax.jms.Message;)V(RiverbedShipmentSubscriberMDB.java:434)
            at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:382)
            at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
            at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
            at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: Unsupported Content-Type: text/html
            at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(Ljava.lang.String;Lcom.sun.xml.rpc.soap.message.SOAPMessageContext;)V(HttpClientTransport.java:140)
            at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderState;)V(StreamingSender.java:96)
            at com.mcdata.websvc.riverbed.client.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Ljava.lang.String;(DataExchangerSoap_Stub.java:72)This makes me think that the PHP web service is returning a content type header of text/html instead of text/xml. Is there a way to make the JWSDP code ignore that or to make the PHP code return the correct header content type?
    Here is a similar thread but I'm not having any luck with the answers in it:
    http://forum.java.sun.com/thread.jspa?threadID=643810

  • Problem in creating a java proxy for PHP web service

    This is a problem in generating a java proxy for a PHP webservice.
    I have a PHP service running on Wamp Server and also a PHP client which is able to call the service.
    The WSDL for the PHP web service is also generated .
    I am trying to create a java proxy using the jdev (10.1.3.0.3) from the wsdl file.
    The wsdl generated by the php program is
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:tns="urn:hellowsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:hellowsdl">
    <types>
    <xsd:schema targetNamespace="urn:hellowsdl">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
      </xsd:schema>
      </types>
    <message name="helloRequest">
      <part name="name" type="xsd:string" />
      </message>
    <message name="helloResponse">
      <part name="return" type="xsd:string" />
      </message>
    <portType name="hellowsdlPortType">
    <operation name="hello">
      <documentation>Says hello to the caller</documentation>
      <input message="tns:helloRequest" />
      <output message="tns:helloResponse" />
      </operation>
      </portType>
    <binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="hello">
      <soap:operation soapAction="urn:hellowsdl#hello" style="rpc" />
    <input>
      <soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
    <output>
      <soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
      </operation>
      </binding>
    <service name="hellowsdl">
    <port name="hellowsdlPort" binding="tns:hellowsdlBinding">
      <soap:address location="http://localhost/mywork/myphp.php" />
      </port>
      </service>
      </definitions>After making following changes to the wsdl program, I tried to generate java proxy.
    <definitions name="hellowsdl"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:si="http://soapinterop.org/xsd" xmlns:tns="http://localhost/mywork/hellowsdl.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/mywork/myphpwsdl.wsdll">
    <types>
    <xsd:schema targetNamespace="http://localhost/mywork/hellowsdl.wsdl">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
      </xsd:schema>
      </types>
    <message name="helloRequest">
      <part name="name" type="xsd:string" />
      </message>
    <message name="helloResponse">
      <part name="return" type="xsd:string" />
      </message>
    <portType name="hellowsdlPortType">
    <operation name="hello">
      <documentation>Says hello to the caller</documentation>
      <input message="tns:helloRequest" />
      <output message="tns:helloResponse" />
      </operation>
      </portType>
    <binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="hello">
      <soap:operation soapAction="" style="rpc" />
    <input>
      <soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
    <output>
      <soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
      </operation>
      </binding>
    <service name="hellowsdl">
    <port name="hellowsdlPort" binding="tns:hellowsdlBinding">
      <soap:address location="http://localhost/mywork/myphp.php" />
      </port>
      </service>
      </definitions>This is how the java stub file looks like:
    public class HellowsdlBinding_Stub
        extends oracle.j2ee.ws.client.StubBase
        implements demo.mypackage.HellowsdlPortType {
         *  public constructor
        public HellowsdlBinding_Stub(HandlerChain handlerChain) {
            super(handlerChain);
            _setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost/mywork/hellowsdl.php");
            setSoapVersion(SOAPVersion.SOAP_11);
            setServiceName( new QName("http://localhost/mywork/hellowsdl","hellowsdl"));
            setPortName( new QName("http://localhost/mywork/hellowsdl","hellowsdlPort"));
         *  implementation of hello
        public java.lang.String hello(java.lang.String name)
            throws java.rmi.RemoteException {
            StreamingSenderState _state = null;
            try {
                _state = _start(_handlerChain);
                if (_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS) != null) {
                    _state.getMessageContext().getMessage().setProperty("DimeEncode",_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS));
                InternalSOAPMessage _request = _state.getRequest();
                _request.setOperationCode(hello_OPCODE);
                _state.getMessageContext().setProperty("oracle.j2ee.ws.mgmt.interceptor.operation-qname",new QName("","hello"));
                demo.mypackage.runtime.HellowsdlBinding_hello_ReqS _myHellowsdlBinding_hello_ReqS = new demo.mypackage.runtime.HellowsdlBinding_hello_ReqS();
            _myHellowsdlBinding_hello_ReqS.setName(name);
            SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_hello_QNAME);
            _bodyBlock.setValue(_myHellowsdlBinding_hello_ReqS);
            _bodyBlock.setSerializer(myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer);
            _request.setBody(_bodyBlock);
            _state.getMessageContext().setProperty("http.soap.action", "http://localhost/mywork/hellowsdl");
            _send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
            demo.mypackage.runtime.HellowsdlBinding_hello_RespS _myHellowsdlBinding_hello_RespS = null;
            Object _responseObj = _state.getResponse().getBody().getValue();
            if (_responseObj instanceof SOAPDeserializationState) {
                _myHellowsdlBinding_hello_RespS =
                    (demo.mypackage.runtime.HellowsdlBinding_hello_RespS)((SOAPDeserializationState)_responseObj).getInstance();
            } else {
                _myHellowsdlBinding_hello_RespS =
                    (demo.mypackage.runtime.HellowsdlBinding_hello_RespS)_responseObj;
            return _myHellowsdlBinding_hello_RespS.get_return();
        } catch (RemoteException e) {
            // let this one through unchanged
            throw e;
        } catch (JAXRPCException e) {
            throw new RemoteException(e.getMessage(), e);
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException)e;
            } else {
                throw new RemoteException(e.getMessage(), e);
    *  this method deserializes the request/response structure in the body
    protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState  state) throws Exception {
        int opcode = state.getRequest().getOperationCode();
        switch (opcode) {
            case hello_OPCODE:
                _deserialize_hello(bodyReader, deserializationContext, state);
                break;
            default:
                throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
    * This method deserializes the body of the hello operation.
    private void _deserialize_hello(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
        try {
            Object myHellowsdlBinding_hello_RespSObj =
                myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer.deserialize(ns1_hello_helloResponse_QNAME,
                    bodyReader, deserializationContext);
            SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_hello_helloResponse_QNAME);
            bodyBlock.setValue(myHellowsdlBinding_hello_RespSObj);
            state.getResponse().setBody(bodyBlock);
        } catch (DeserializationException e) {
            if (e.getSoapFaultSubCodeType() == JAXRPCExceptionBase.FAULT_CODE_NONE && e.getSoapFaultCodeType() != JAXRPCExceptionBase.FAULT_CODE_DATA_ENCODING_UNKNOWN) {
                e.setSoapFaultSubCodeType(JAXRPCExceptionBase.FAULT_CODE_BAD_ARGUMENTS);
            throw e;
    public String _getEncodingStyle() {
        return SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding();
    public void _setEncodingStyle(String encodingStyle) {
        throw new UnsupportedOperationException("cannot set encoding style");
    public ClientTransport getClientTransport() {
        return super._getTransport();
    * This method returns an array containing (prefix, nsURI) pairs.
    protected String[] _getNamespaceDeclarations() {
        return myNamespace_declarations;
    * This method returns an array containing the names of the headers we understand.
    public QName[] _getUnderstoodHeaders() {
        return understoodHeaderNames;
    * This method handles the case of an empty SOAP body.
    protected void _handleEmptyBody(XMLReader reader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
    public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
        super._initialize(registry);
        myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_ReqS.class, ns1_hello_TYPE_QNAME);
        myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_RespS.class, ns1_helloResponse_TYPE_QNAME);
    private static final QName _portName = new QName("http://localhost/mywork/hellowsdl", "hellowsdlPort");
    private static final int hello_OPCODE = 0;
    private static final QName ns1_hello_hello_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
    private static final QName ns1_hello_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
    private CombinedSerializer myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer;
    private static final QName ns1_hello_helloResponse_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
    private static final QName ns1_helloResponse_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
    private CombinedSerializer myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer;
    private static final String[] myNamespace_declarations =
                                        new String[] {
                                            "ns0", "http://localhost/mywork/hellowsdl"
    private static final QName[] understoodHeaderNames = new QName[] {  };
    }The errors that are produced are-
    java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found
    Kindly help to resolve this.
    Thanks.

    This is a problem in generating a java proxy for a PHP webservice.
    I have a PHP service running on Wamp Server and also a PHP client which is able to call the service.
    The WSDL for the PHP web service is also generated .
    I am trying to create a java proxy using the jdev (10.1.3.0.3) from the wsdl file.
    The wsdl generated by the php program is
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:tns="urn:hellowsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:hellowsdl">
    <types>
    <xsd:schema targetNamespace="urn:hellowsdl">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
      </xsd:schema>
      </types>
    <message name="helloRequest">
      <part name="name" type="xsd:string" />
      </message>
    <message name="helloResponse">
      <part name="return" type="xsd:string" />
      </message>
    <portType name="hellowsdlPortType">
    <operation name="hello">
      <documentation>Says hello to the caller</documentation>
      <input message="tns:helloRequest" />
      <output message="tns:helloResponse" />
      </operation>
      </portType>
    <binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="hello">
      <soap:operation soapAction="urn:hellowsdl#hello" style="rpc" />
    <input>
      <soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
    <output>
      <soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
      </operation>
      </binding>
    <service name="hellowsdl">
    <port name="hellowsdlPort" binding="tns:hellowsdlBinding">
      <soap:address location="http://localhost/mywork/myphp.php" />
      </port>
      </service>
      </definitions>After making following changes to the wsdl program, I tried to generate java proxy.
    <definitions name="hellowsdl"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:si="http://soapinterop.org/xsd" xmlns:tns="http://localhost/mywork/hellowsdl.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/mywork/myphpwsdl.wsdll">
    <types>
    <xsd:schema targetNamespace="http://localhost/mywork/hellowsdl.wsdl">
      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
      </xsd:schema>
      </types>
    <message name="helloRequest">
      <part name="name" type="xsd:string" />
      </message>
    <message name="helloResponse">
      <part name="return" type="xsd:string" />
      </message>
    <portType name="hellowsdlPortType">
    <operation name="hello">
      <documentation>Says hello to the caller</documentation>
      <input message="tns:helloRequest" />
      <output message="tns:helloResponse" />
      </operation>
      </portType>
    <binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="hello">
      <soap:operation soapAction="" style="rpc" />
    <input>
      <soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
    <output>
      <soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
      </operation>
      </binding>
    <service name="hellowsdl">
    <port name="hellowsdlPort" binding="tns:hellowsdlBinding">
      <soap:address location="http://localhost/mywork/myphp.php" />
      </port>
      </service>
      </definitions>This is how the java stub file looks like:
    public class HellowsdlBinding_Stub
        extends oracle.j2ee.ws.client.StubBase
        implements demo.mypackage.HellowsdlPortType {
         *  public constructor
        public HellowsdlBinding_Stub(HandlerChain handlerChain) {
            super(handlerChain);
            _setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost/mywork/hellowsdl.php");
            setSoapVersion(SOAPVersion.SOAP_11);
            setServiceName( new QName("http://localhost/mywork/hellowsdl","hellowsdl"));
            setPortName( new QName("http://localhost/mywork/hellowsdl","hellowsdlPort"));
         *  implementation of hello
        public java.lang.String hello(java.lang.String name)
            throws java.rmi.RemoteException {
            StreamingSenderState _state = null;
            try {
                _state = _start(_handlerChain);
                if (_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS) != null) {
                    _state.getMessageContext().getMessage().setProperty("DimeEncode",_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS));
                InternalSOAPMessage _request = _state.getRequest();
                _request.setOperationCode(hello_OPCODE);
                _state.getMessageContext().setProperty("oracle.j2ee.ws.mgmt.interceptor.operation-qname",new QName("","hello"));
                demo.mypackage.runtime.HellowsdlBinding_hello_ReqS _myHellowsdlBinding_hello_ReqS = new demo.mypackage.runtime.HellowsdlBinding_hello_ReqS();
            _myHellowsdlBinding_hello_ReqS.setName(name);
            SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_hello_QNAME);
            _bodyBlock.setValue(_myHellowsdlBinding_hello_ReqS);
            _bodyBlock.setSerializer(myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer);
            _request.setBody(_bodyBlock);
            _state.getMessageContext().setProperty("http.soap.action", "http://localhost/mywork/hellowsdl");
            _send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
            demo.mypackage.runtime.HellowsdlBinding_hello_RespS _myHellowsdlBinding_hello_RespS = null;
            Object _responseObj = _state.getResponse().getBody().getValue();
            if (_responseObj instanceof SOAPDeserializationState) {
                _myHellowsdlBinding_hello_RespS =
                    (demo.mypackage.runtime.HellowsdlBinding_hello_RespS)((SOAPDeserializationState)_responseObj).getInstance();
            } else {
                _myHellowsdlBinding_hello_RespS =
                    (demo.mypackage.runtime.HellowsdlBinding_hello_RespS)_responseObj;
            return _myHellowsdlBinding_hello_RespS.get_return();
        } catch (RemoteException e) {
            // let this one through unchanged
            throw e;
        } catch (JAXRPCException e) {
            throw new RemoteException(e.getMessage(), e);
        } catch (Exception e) {
            if (e instanceof RuntimeException) {
                throw (RuntimeException)e;
            } else {
                throw new RemoteException(e.getMessage(), e);
    *  this method deserializes the request/response structure in the body
    protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState  state) throws Exception {
        int opcode = state.getRequest().getOperationCode();
        switch (opcode) {
            case hello_OPCODE:
                _deserialize_hello(bodyReader, deserializationContext, state);
                break;
            default:
                throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
    * This method deserializes the body of the hello operation.
    private void _deserialize_hello(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
        try {
            Object myHellowsdlBinding_hello_RespSObj =
                myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer.deserialize(ns1_hello_helloResponse_QNAME,
                    bodyReader, deserializationContext);
            SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_hello_helloResponse_QNAME);
            bodyBlock.setValue(myHellowsdlBinding_hello_RespSObj);
            state.getResponse().setBody(bodyBlock);
        } catch (DeserializationException e) {
            if (e.getSoapFaultSubCodeType() == JAXRPCExceptionBase.FAULT_CODE_NONE && e.getSoapFaultCodeType() != JAXRPCExceptionBase.FAULT_CODE_DATA_ENCODING_UNKNOWN) {
                e.setSoapFaultSubCodeType(JAXRPCExceptionBase.FAULT_CODE_BAD_ARGUMENTS);
            throw e;
    public String _getEncodingStyle() {
        return SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding();
    public void _setEncodingStyle(String encodingStyle) {
        throw new UnsupportedOperationException("cannot set encoding style");
    public ClientTransport getClientTransport() {
        return super._getTransport();
    * This method returns an array containing (prefix, nsURI) pairs.
    protected String[] _getNamespaceDeclarations() {
        return myNamespace_declarations;
    * This method returns an array containing the names of the headers we understand.
    public QName[] _getUnderstoodHeaders() {
        return understoodHeaderNames;
    * This method handles the case of an empty SOAP body.
    protected void _handleEmptyBody(XMLReader reader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
    public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
        super._initialize(registry);
        myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_ReqS.class, ns1_hello_TYPE_QNAME);
        myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_RespS.class, ns1_helloResponse_TYPE_QNAME);
    private static final QName _portName = new QName("http://localhost/mywork/hellowsdl", "hellowsdlPort");
    private static final int hello_OPCODE = 0;
    private static final QName ns1_hello_hello_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
    private static final QName ns1_hello_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
    private CombinedSerializer myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer;
    private static final QName ns1_hello_helloResponse_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
    private static final QName ns1_helloResponse_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
    private CombinedSerializer myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer;
    private static final String[] myNamespace_declarations =
                                        new String[] {
                                            "ns0", "http://localhost/mywork/hellowsdl"
    private static final QName[] understoodHeaderNames = new QName[] {  };
    }The errors that are produced are-
    java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found
    Kindly help to resolve this.
    Thanks.

  • How to deploy and start PHP web services required for a process

    hello everyone!
    i ve implemented some php web services. One of them is ManagePatientsImpl.php class
    and the corresponding ManagePatients.wsdl.
    How can deploy it? What are the files required apart from them?
    In addition there are some GUI-files. Should these files be deployed together?
    Thank you in advance!
    Edited by: user643354 on 14-Jul-2010 09:40

    i'm sorry, i assumed you were running weblogic server.
    in case of oc4j you could try this :
    http://tugdualgrall.blogspot.com/2005/03/php-on-oc4j-yes-with-jsr-223-ri.html
    OC4J communication with PHP

  • Using PHP Data Services to create an object and accessing that objects data in an unbound way in AS

    Hello,
    I've been able to use the php data services and bind the results of a function to a component. However I am having a hard time figuring out the syntax to use the data services to create an object out of the results, and then use that object as an array of filenames to provide the current index of the filename to a new sound object.
    My problem is obviously in not being able to figure out the specific syntax, I have declared the service and and object of the services returned type and in the creationComplete() function I have assigned object.token = service.getData();
    I've tried various ways of then pulling that data out of the object, with no success.
    Can someone point me in the right direction?
    This code probably looks horrible because it doesn't work yet.
    - Joel
                import flash.media.Sound;
                import flash.media.SoundChannel;
                import mx.controls.Alert;
                var playing:Sound = new Sound();
                var channel:SoundChannel = new SoundChannel();
                var sndIndex:int=0;
                var skpTr:String;
                public function init():void{
                 mp3Array.token = mp3service.getData();
                 currentTrack(mp3Array.lastResult.filename); 
                     trace(mp3Array.lastResult.filename[sndIndex]);
                public function currentTrack(t:String):void{
                    playing = new Sound();
                    playing.load(new URLRequest("mp3/" +t));
                public function skip():void{
                    stop();
                    if (sndIndex != mp3Array.lastResult.length-1){
                        sndIndex++;
                        var skipTr:String=mp3Array.lastResult.filename[sndIndex].data;
                        currentTrack(skipTr);
                        play();
                    } else {
                        sndIndex=0;
                        skipTr=mp3Array.lastResult.filename[sndIndex].data;
                        currentTrack(skipTr);
                        play();
                public function stop():void{
                    channel.stop();
                public function play():void{
                    channel = playing.play();
        <fx:Declarations>
            <s:CallResponder id="mp3Array"/>
            <mp3services:Mp3Service id="mp3service" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>

    Hello Joel;
    In retrieving your data - what is your php returning to FB, an object, object array, an array?  Either way, I have a brief example below that an object(s) is being returned.  Pull the data from the lastResult in a ResultEvent.  The object instantiated in the resultEvent will contain your data and you can do what you want from there. 
    Also, I always use Network Monitor to see what data (if any) is being returned from the server, you can also see how it is being sent back.
    John
    private function init():void
         mp3Array.token = mp3service.getData();
         mp3Array.addEventListener(FaultEvent.FAULT, faultHandler);
         mp3Array.addEventListener(ResultEvent.RESULT, mp3Array_resultHandler);
    protected function faultHandler(event:FaultEvent):void
         Alert.show("There was a fault error!" + event.message, "Fault Error", Alert.OK);
    protected function mp3Array_resultHandler(event:ResultEvent):void
         // Not sure if your service is sending back an object or an array or ?
        var info:Object = mp3Array.lastResult;
         doSomeFunction(info)
    protected function doSomeFunction(data:Object):void
         trace(info.filename);

  • Will Zend PHP ship with OAS ?

    I thought I read somewhere that either OAS 10G R2 or R3 will ship with the mod_php ? Now I'm having trouble determing if that is true or not from the online documentation...nor can I find where I originally read it. (Was I dreaming?)
    Thanks.

    http://userdocs.mit.edu/IDD/devenv/OracleNotes/phpzend.html
    I have OAS 10G R2 and have installed Zend PHP.

  • 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.

  • Unable to create records in database using PHP Data Service

    Hello, I've been stuck on this for a few days and search up and down for this on the net, no response I've found has worked, so I come to you...
    Here are the steps I've taken, I think it's pretty standard
    1. I have a macbook pro running osx 10.7.3
    2. I installed MAMP all default (I've acually reinstalled this because someone suggested this might fix it)
    3. Thru phpMyAdmin I created a database called my_test
    4. In that database I created a table, this is the export of that table: (I've also tried this with InnoDB which is the default)
    CREATE TABLE `customer` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `name` varchar(50) NOT NULL,
      `email` varchar(150) NOT NULL,
      PRIMARY KEY (`id`),
      UNIQUE KEY `id` (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
    5. I created a new Flx Project (Running Flash Builder 4.5.1 Premium)
         Project Name: PHPTest
         Application Type: Desktop (Although I've done the same thing with Web and got the same results)
         >> Next
         Application Server Type: PHP
         Web Root: /Applications/MAMP/htdocs/
         URL Root: http://localhost:8888/
         Clicked 'Validate Configuration' and that worked
         Output Folder: /Applications/MAMP/htdocs/PHPService (default by Flash Builder)
         >> Finished
    6. On the Data/Services tab on the bottom I click 'Connect to Data/Service...'
         Select 'PHP'
         >> Next
         Select 'Click here to generate a sample'
         Select 'Generate from database' radio button
         Username: root
         Password: root (default for MAMP)
         Host name: localhost
         Server port: 8889 (default for MAMP MySQL port, the HTTP port default is 8888 which in both cases seem to work but every video I've seen that uses MAMP on youtube uses 8889)
         Database: my_test
         Click 'Test Connection' (works)
         Table: customer
         Primary Key: id (this field is greyed out and Flash Builder selects 'id' which it figures out from the SQL table)
         >> Click OK
    7. Then if I don't have the Zend Framework folder in my /Applications/MAMP/htdocs/ folder it tells me its going to create that and I say alright. Then Flash Builder says stuff about how this is really only for testing and not production server ready and I say alright.
    8. Then it takes me back to the Form from Step 6 when I get the chance to select 'Click here to generate a sample'
         These fields are now filled with this data automaticly:
         PHP Class: /Applications/MAMP/htdocs/PHPTest/services/CustomerService.php
         Service name: CustomerService
         Service package: services.customerservice
         Data type package: valueObjects
         >> Click Next (shows all the functions that will be now availible)
         >> Click Finished (End of the forms and it opens Dreamweaver to the php file it created CustomerService.php which I have no need to edit so I close that down)
    9. Back in Flash Builder I switch to design view and drag a datagrid onto the big white area in the middle, whatever that is called.
    10. Then below in Data/Services tab on the bottom I click drag the function 'GetAllCustomer' on top of the datagrid.
         I say yes to rebound and click ok and the view of the datagrid is updated with the colums from the 'customer' table in mySQL.
    (Now let me say that when I hit save and compile this, if I actually had records in this table that I insert thru phpMyAdmin, this does show in the datagrid. So for the whole CRUD thing I am able to get the R which is Read)
    11. Now going back to the design view in Flash Builder I will create a form to create records in the table... (I guess this isn't really a step)
    12. In the Data/Service tab on the bottom I select 'createCustomer' function and then there is an icon called 'Generate Form' that looks like a white piece of paper with a gear on the bottom of it.
    13. This opens up a new form and since I don't have a crazy bunch of fields in my table I just click Finished (If you click next you can specify which fields you want to exclude from the form but this time I don't need to)
    14. This actually creates 2 forms if you look at the code, the second just shows the return type from when you click 'CreateCustomer' button on the first form. Because they overlap in design view I drag the form out of the way so you can see the input form, the return form, and the datagrid
    15. Then I save and compile...
    (Also if your actually reading this I didn't remove the id form field, I get the same result either way, but if you do remove the form field in the code/design you also have to update the button function to not deal with the id before it gets sent off to the php page since in this case the MySQL table is set to auto_increment the id, sorry this doesn't make much sence but this little area doesn't matter much either way)
    16. Now fill in whatever data you want for name and email, try differnt numbers in the id field like 0, nothing, 1, 1000 and click 'CreateCustomer'
    (For me nothing happens, no return is put in the return field, no error pops up and the datagrid is not updated with the new record, also going over to phpMyAdmin and checking out the table browse doesn't show any changes either, I know the button is calling the function because if I add a state change in that function it changes, it would seem that the line:
    createCustomerResult.token = customerService.createCustomer(customer2); doesn't do anything)
    So any idea what is wrong here, I'm convenced it's something stupid easy simple I just can't see it.

    In case you need more info, here is a code dump on a mxml project that has this problem:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           xmlns:customerservice="services.customerservice.*"
                           xmlns:valueObjects="valueObjects.*"
                           currentState="State1">
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.events.FlexEvent;
                protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
                    getAllCustomerResult.token = customerService.getAllCustomer();
                protected function button_clickHandler(event:MouseEvent):void
                    var customer2:Customer = new Customer();
                    customer2.id = parseInt(idTextInput.text);
                    customer2.name = nameTextInput.text;
                    customer2.email = emailTextInput.text;
                    currentState = "Test";
                    createCustomerResult.token = customerService.createCustomer(customer2);
            ]]>
        </fx:Script>
        <s:states>
            <s:State name="State1"/>
            <s:State name="Test"/>
        </s:states>
        <fx:Declarations>
            <s:CallResponder id="getAllCustomerResult"/>
            <customerservice:CustomerService id="customerService"
                                             fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
                                             showBusyCursor="true"/>
            <valueObjects:Customer id="customer"/>
            <s:CallResponder id="createCustomerResult"/>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:DataGrid id="dataGrid" includeIn="State1" x="330" y="10" width="392"
                    creationComplete="dataGrid_creationCompleteHandler(event)" requestedRowCount="4">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn dataField="id" headerText="id"></s:GridColumn>
                    <s:GridColumn dataField="name" headerText="name"></s:GridColumn>
                    <s:GridColumn dataField="email" headerText="email"></s:GridColumn>
                </s:ArrayList>
            </s:columns>
            <s:typicalItem>
                <fx:Object id="id1" email="email1" name="name1"></fx:Object>
            </s:typicalItem>
            <s:AsyncListView list="{getAllCustomerResult.lastResult}"/>
        </s:DataGrid>
        <s:Form includeIn="State1" defaultButton="{button}">
            <s:FormItem label="Id">
                <s:TextInput id="idTextInput" text="{customer.id}"/>
            </s:FormItem>
            <s:FormItem label="Name">
                <s:TextInput id="nameTextInput" text="{customer.name}"/>
            </s:FormItem>
            <s:FormItem label="Email">
                <s:TextInput id="emailTextInput" text="{customer.email}"/>
            </s:FormItem>
            <s:Button id="button" label="CreateCustomer" click="button_clickHandler(event)"/>
        </s:Form>
        <s:Form includeIn="State1" x="0" y="204">
            <s:FormItem label="CreateCustomer">
                <s:TextInput id="createCustomerTextInput" text="{createCustomerResult.lastResult as int}"/>
            </s:FormItem>
        </s:Form>
    </s:WindowedApplication>

  • Trouble executing "some" auto generated php remote services...?

    Hi,
    I was using the flash builder 4 premium trial with the 4.0 sdk, recently I bought the CS5 web premium suite. It includes flash builder 4.0.1 standard with 4.1 sdk.
    1. create a new flex project (as in the welcome tutorial)
    2. create a sample PHP service using my db infos (let it install Zend_AMF for me)
    3. place a datagrid in the desing mode,
    4. drop the the "getAll()" method on it
    5. tweek some columns,
    6. it works, I see the service call and answer with service capture (an external AMF service monitor).
    the 2 problems that appear now (which were not existing in the 4.0 trial version I had)
    1) add a new item
    protected var newItem:dbItem;
    protected function addBtn_clickHandler(event:MouseEvent):void
    newItem = new dbItem();
    newItem.attribute = 'someValue';
    this.addDbItem(newItem:dbItem);
    protected function addDbItem(item:dbItem:void
    createDbItemResult.token = dbItemService.createDbItem(item);
    <s:Button label="new item" id="addBtn" click="addBtn_clickHandler(event)"/>
    When I click the button, absolutely NOTHING happens, no error, no service call, nothing at all.
    2) refresh the datagrid's dataprovider
    I followed the tutorial on how to bind an ArrayCollection to the dataGrid instead of binding it to "service.lastresult"
    populate the ArrayCollection with the service result handler with event.result as ArrayCollection... everything works like before. whe the datagrid is created, it calls the "dataGrid_creationCompleteHandler".
    protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
    this.getAllDbItem();
    protected function refreshBtn_clickHandler(event:MouseEvent):void
    this.getAllDbItem();
    protected function getAllDbItemResult_resultHandler(event:ResultEvent):void
    DbItems = event.result as ArrayCollection;
    <s:Button label="refresh" id="refreshBtn" click="refreshBtn_clickHandler(event)"/>
    this works!, the refresh button also works, BUT... it only refreshes item which have not bee edited within the app... if I change some item value with a form, (still using skills from the tutorial) :
    - the data in the datagrid ARE UPDATED.
    - the service.update(item) method DOES NOT EXECUTE (like the create above)
    - if I update the DB manualy, ONLY the NON UPDATED rows refresh...
    Any idea?
    Thank you! I'm stuck here for hours and hours now :-(
    the full MXML code
    <?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:moniteurservice="services.moniteurservice.*" xmlns:valueObjects="valueObjects.*">
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    protected var moniteurs:ArrayCollection = new ArrayCollection();
    protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
    getAllMoniteurResult.token = moniteurService.getAllMoniteur();
    protected function button_clickHandler(event:MouseEvent):void
    moniteur.statut = statutTextInput.text;
    moniteur.nom = nomTextInput.text;
    moniteur.prenom = prenomTextInput.text;
    moniteur.tel = telTextInput.text;
    moniteur.mobile = mobileTextInput.text;
    moniteur.email = emailTextInput.text;
    moniteur.adresse = adresseTextInput.text;
    moniteur.npa = npaTextInput.text;
    moniteur.lieu = lieuTextInput.text;
    moniteur.pays = paysTextInput.text;
    this.updateMoniteur(moniteur);
    protected function updateMoniteur(item:Moniteur):void
    updateMoniteurResult.token = moniteurService.updateMoniteur(item);
    protected function button1_clickHandler(event:MouseEvent):void
    getAllMoniteurResult.token = moniteurService.getAllMoniteur();
    protected function getAllMoniteurResult_resultHandler(event:ResultEvent):void
    moniteurs = event.result as ArrayCollection;
    ]]>
    </fx:Script>
    <fx:Declarations>
    <s:CallResponder id="getAllMoniteurResult" result="getAllMoniteurResult_resultHandler(event)"/>
    <moniteurservice:MoniteurService id="moniteurService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
    <valueObjects:Moniteur id="moniteur"/>
    <s:CallResponder id="updateMoniteurResult"/>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Binding source="dataGrid.selectedItem as Moniteur" destination="moniteur"/>
    <mx:DataGrid x="25" y="24" id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)"
    dataProvider="{moniteurs}">
    <mx:columns>
    <mx:DataGridColumn headerText="id" dataField="id"/>
    <mx:DataGridColumn headerText="statut" dataField="statut"/>
    <mx:DataGridColumn headerText="nom" dataField="nom"/>
    <mx:DataGridColumn headerText="prenom" dataField="prenom"/>
    <mx:DataGridColumn headerText="tel" dataField="tel"/>
    <mx:DataGridColumn headerText="mobile" dataField="mobile"/>
    <mx:DataGridColumn headerText="email" dataField="email"/>
    <mx:DataGridColumn headerText="adresse" dataField="adresse"/>
    <mx:DataGridColumn headerText="npa" dataField="npa"/>
    <mx:DataGridColumn headerText="lieu" dataField="lieu"/>
    <mx:DataGridColumn headerText="pays" dataField="pays"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Form defaultButton="{button}" x="25" y="174">
    <mx:FormItem label="Statut">
    <s:TextInput id="statutTextInput" text="{moniteur.statut}"/>
    </mx:FormItem>
    <mx:FormItem label="Nom">
    <s:TextInput id="nomTextInput" text="{moniteur.nom}"/>
    </mx:FormItem>
    <mx:FormItem label="Prenom">
    <s:TextInput id="prenomTextInput" text="{moniteur.prenom}"/>
    </mx:FormItem>
    <mx:FormItem label="Tel">
    <s:TextInput id="telTextInput" text="{moniteur.tel}"/>
    </mx:FormItem>
    <mx:FormItem label="Mobile">
    <s:TextInput id="mobileTextInput" text="{moniteur.mobile}"/>
    </mx:FormItem>
    <mx:FormItem label="Email">
    <s:TextInput id="emailTextInput" text="{moniteur.email}"/>
    </mx:FormItem>
    <mx:FormItem label="Adresse">
    <s:TextInput id="adresseTextInput" text="{moniteur.adresse}"/>
    </mx:FormItem>
    <mx:FormItem label="Npa">
    <s:TextInput id="npaTextInput" text="{moniteur.npa}"/>
    </mx:FormItem>
    <mx:FormItem label="Lieu">
    <s:TextInput id="lieuTextInput" text="{moniteur.lieu}"/>
    </mx:FormItem>
    <mx:FormItem label="Pays">
    <s:TextInput id="paysTextInput" text="{moniteur.pays}"/>
    </mx:FormItem>
    <s:Button id="button" label="Submit" click="button_clickHandler(event)"/>
    </mx:Form>
    <s:Button x="322" y="200" label="Button" click="button1_clickHandler(event)"/>
    </s:Application>
    the full PHP service code:
    <?php
    *  README for sample service
    *  This generated sample service contains functions that illustrate typical service operations.
    *  Use these functions as a starting point for creating your own service implementation. Modify the
    *  function signatures, references to the database, and implementation according to your needs.
    *  Delete the functions that you do not use.
    *  Save your changes and return to Flash Builder. In Flash Builder Data/Services View, refresh
    *  the service. Then drag service operations onto user interface components in Design View. For
    *  example, drag the getAllItems() operation onto a DataGrid.
    *  This code is for prototyping only.
    *  Authenticate the user prior to allowing them to call these methods. You can find more
    *  information at http://www.adobe.com/go/flex_security
    class MoniteurService {
    var $username = "root";
    var $password = "mikedev";
    var $server = "localhost";
    var $port = "8889";
    var $databasename = "test_db";
    var $tablename = "moniteur";
    var $connection;
    * The constructor initializes the connection to database. Everytime a request is
    * received by Zend AMF, an instance of the service class is created and then the
    * requested method is invoked.
    public function __construct() {
       $this->connection = mysqli_connect(
       $this->server, 
       $this->username, 
       $this->password,
       $this->databasename,
       $this->port
    $this->throwExceptionOnError($this->connection);
    * Returns all the rows from the table.
    * Add authroization or any logical checks for secure access to your data
    * @return array
    public function getAllMoniteur() {
    $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename");
    $this->throwExceptionOnError();
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    $rows = array();
    mysqli_stmt_bind_result($stmt, $row->id, $row->statut, $row->nom, $row->prenom, $row->tel, $row->mobile, $row->email, $row->adresse, $row->npa, $row->lieu, $row->pays);
        while (mysqli_stmt_fetch($stmt)) {
          $rows[] = $row;
          $row = new stdClass();
          mysqli_stmt_bind_result($stmt, $row->id, $row->statut, $row->nom, $row->prenom, $row->tel, $row->mobile, $row->email, $row->adresse, $row->npa, $row->lieu, $row->pays);
    mysqli_stmt_free_result($stmt);
        mysqli_close($this->connection);
        return $rows;
    * Returns the item corresponding to the value specified for the primary key.
    * Add authorization or any logical checks for secure access to your data
    * @return stdClass
    public function getMoniteurByID($itemID) {
    $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename where id=?");
    $this->throwExceptionOnError();
    mysqli_stmt_bind_param($stmt, 'i', $itemID);
    $this->throwExceptionOnError();
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    mysqli_stmt_bind_result($stmt, $row->id, $row->statut, $row->nom, $row->prenom, $row->tel, $row->mobile, $row->email, $row->adresse, $row->npa, $row->lieu, $row->pays);
    if(mysqli_stmt_fetch($stmt)) {
          return $row;
    } else {
          return null;
    * Returns the item corresponding to the value specified for the primary key.
    * Add authorization or any logical checks for secure access to your data
    * @return stdClass
    public function createMoniteur($item) {
    $stmt = mysqli_prepare($this->connection, "INSERT INTO $this->tablename (id, statut, nom, prenom, tel, mobile, email, adresse, npa, lieu, pays) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
    $this->throwExceptionOnError();
    mysqli_stmt_bind_param($stmt, 'issssssssss', $item->id, $item->statut, $item->nom, $item->prenom, $item->tel, $item->mobile, $item->email, $item->adresse, $item->npa, $item->lieu, $item->pays);
    $this->throwExceptionOnError();
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    $autoid = $item->id;
    mysqli_stmt_free_result($stmt);
    mysqli_close($this->connection);
    return $autoid;
    * Updates the passed item in the table.
    * Add authorization or any logical checks for secure access to your data
    * @param stdClass $item
    * @return void
    public function updateMoniteur($item) {
    $stmt = mysqli_prepare($this->connection, "UPDATE $this->tablename SET statut=?, nom=?, prenom=?, tel=?, mobile=?, email=?, adresse=?, npa=?, lieu=?, pays=? WHERE id=?");
    $this->throwExceptionOnError();
    mysqli_stmt_bind_param($stmt, 'ssssssssssi', $item->statut, $item->nom, $item->prenom, $item->tel, $item->mobile, $item->email, $item->adresse, $item->npa, $item->lieu, $item->pays, $item->id);
    $this->throwExceptionOnError();
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    mysqli_stmt_free_result($stmt);
    mysqli_close($this->connection);
    * Deletes the item corresponding to the passed primary key value from
    * the table.
    * Add authorization or any logical checks for secure access to your data
    * @return void
    public function deleteMoniteur($itemID) {
    $stmt = mysqli_prepare($this->connection, "DELETE FROM $this->tablename WHERE id = ?");
    $this->throwExceptionOnError();
    mysqli_stmt_bind_param($stmt, 'i', $itemID);
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    mysqli_stmt_free_result($stmt);
    mysqli_close($this->connection);
    * Returns the number of rows in the table.
    * Add authorization or any logical checks for secure access to your data
    public function count() {
    $stmt = mysqli_prepare($this->connection, "SELECT COUNT(*) AS COUNT FROM $this->tablename");
    $this->throwExceptionOnError();
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    mysqli_stmt_bind_result($stmt, $rec_count);
    $this->throwExceptionOnError();
    mysqli_stmt_fetch($stmt);
    $this->throwExceptionOnError();
    mysqli_stmt_free_result($stmt);
    mysqli_close($this->connection);
    return $rec_count;
    * Returns $numItems rows starting from the $startIndex row from the
    * table.
    * Add authorization or any logical checks for secure access to your data
    * @return array
    public function getMoniteur_paged($startIndex, $numItems) {
    $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename LIMIT ?, ?");
    $this->throwExceptionOnError();
    mysqli_stmt_bind_param($stmt, 'ii', $startIndex, $numItems);
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
    $rows = array();
    mysqli_stmt_bind_result($stmt, $row->id, $row->statut, $row->nom, $row->prenom, $row->tel, $row->mobile, $row->email, $row->adresse, $row->npa, $row->lieu, $row->pays);
        while (mysqli_stmt_fetch($stmt)) {
          $rows[] = $row;
          $row = new stdClass();
          mysqli_stmt_bind_result($stmt, $row->id, $row->statut, $row->nom, $row->prenom, $row->tel, $row->mobile, $row->email, $row->adresse, $row->npa, $row->lieu, $row->pays);
    mysqli_stmt_free_result($stmt);
    mysqli_close($this->connection);
    return $rows;
    * Utility function to throw an exception if an error occurs
    * while running a mysql command.
    private function throwExceptionOnError($link = null) {
    if($link == null) {
    $link = $this->connection;
    if(mysqli_error($link)) {
    $msg = mysqli_errno($link) . ": " . mysqli_error($link);
    throw new Exception('MySQL Error - '. $msg);
    ?>

    >
    >  the service.update(item) method DOES NOT EXECUTE (like the create above)
    >
    I think you are not using the "commit" on the service. By default the Data services are "managed".
    Data management features allow you to synchronize adding, updating, and deleting of records in a database. Changes you make in the client application are not written to the server until a "commit" method is called. You can call a revert method to roll back changes made in the client application.
    So wherever you update or create add "commit" to the service after adding/updating. for eg.
    protected function addDbItem(item:dbItem:void
         createDbItemResult.token = dbItemService.createDbItem(item);
         dbItemService.commit();
    I think the following article might be of interest to you:
    http://help.adobe.com/en_US/Flex/4.0/FlexTutorials/WSbde04e3d3e6474c4292a0331216558354b-80 00.html#WSbde04e3d3e6474c4-10020e8112165e18e29-8000

  • Php data service with something other than localhost for mysql

    Hello
    I'm trying to use an external host as an mysql source.
    I've used the 'generate from template' option and filled it out with the correct data.
    The php code is on my localhost on my mac.
    I've made a testfile in php to test my service and it seems to work and get the data from the database.
    But flashbuilder doesn't see an operation and when I try to refresh it says:
    java.lang.IllegalArgumentException: protocol = http host = null
    I get the same error if I try to 'generate from database' and I click the 'connect database' button.
    in the hostname field, I've tried the url to the server and also the IP (in case of a DNS problem), but either of them generate the same error.
    I hope some one can help me, so I can really start trying out the new data services.
    Thanks
    Johan Velthuis

    Thanks for replying, it works now!
    At first I got the error below, but after putting a ZendFramework folder in the /Library/Webserver/Documents folder my settings got accepted.
    Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream: No such file or directory in /Users/johan/Sites/test/tempgateway.php on line 27
    Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader/Autoloader.php' (include_path='.:/usr/lib/php:/Library/WebServer/Documents/ZendFramework/library') in /Users/johan/Sites/test/tempgateway.php on line 27
    I think this is some kind of bug too, since I let the project wizard create a local ZendFramework folder in my project automatically, but it did not get used.
    It would really be great to have the webroot on a remote server through ftp or maybe afp in a private network to the remote server, but with only tapping into the remote database already solves a lot of problems for the workflow.
    In order to make this work (mysql remote connection) one should create a user on the mysql server with host '%' instead of 'localhost'.
    Since this is not very secure, you could also set the host to your external IP (if its not dynamic), or give that user only rights to your testdatabase.
    Thanks,
    Johan Velthuis

  • Zend AMF Data Service Return Problem

    Hi Folks,
    I am working with FB4 and Zend AMF/PHP and MySQL.  I began integrating the PHP stuff using the great article by Mihai Corlan called 'Working in Flash Builder 4 with Flex and PHP.  I followed all the steps exactly, aside from creating my own app-specific PHP classes and functions, etc...  I 'hooked up' the Zend stuff just like the article, created a text datagrid, just like the article, and viola!, it worked.  I then tweaked it a bit and interwove it into my 'real' component.  So far, so good.
    Then I created a second PHP class with a different 'get data' type of function.  It queries a different table in MySQL, but is essentially the 'same' as the query/function in the initial PHP class.
    In FB, in the Data Services window, I choose the 'Connect to Data/Services' function, just like the first time.  I then find/select my PHP class file and FB 'interrogates it' enough to show me the function that exists in the class.  I 'finish' the operation and it adds a new 'service' to the list of services in that window.  Again, so far, so good.
    The problem comes when I try to 'test' the service or 'configure return types' (which basically requires a 'test' operation anyway).  I can enter the 'input' params just fine, but when I try to execute the call, I get the following error:
    InvocationTargetException:There was an error while invoking the operation. Check your operation inputs or server code and try invoking the operation again.
    Reason: An error occured while reading response sent by server. Try encoding the response suitably before sending it. e.g. If a database column contains UTF-8 characters then use utf8_encode() to encode its value before returning it from the operation.
    I don't know where to go after this.  Again - the 2nd PHP class is essentially identical to the 1st.  The function in it is essentially identical, differing only by the input params, the name of the function and the actual SQL it sends to MySQL.  There is no special text, no special characters, no image stuff, nothing.  I do not 'encode' the results of the function in the first class - in fact the code in the second class is practically identical to the first.  I do not know what the error is talking about.  My guess is that it's more of a generic message.
    I can debug the PHP code just fine from within a seperate instance of Eclipse.  The function runs/returns just fine - an array of PHP-defined objects (simple strings).
    Any insights or advice would be welcomed.   Thank you,
    -David Baron

    Thank Jorge, but that was not the issue, though, it may be related.
    I checked the mySQL my.ini file, and there was already an entry for:
    [mysql]
    default-character-set=utf8
    I added the 'default-collation=utf8_unicode_ci', like you suggested, but that didn't do anything.
    I checked the Apache httpd.conf file, and added the following line 'under' the "DefaultType text/plain" line:
    AddDefaultCharset UTF-8    but that did not do anything.
    I checked my mySQL database, all the tables involved.  They were already at UTF-8 (default).  However, some of the 'varchar' columns were defined as 'latin 1-default collation'.   I changed them all to utf-8 (default table collation), but that did not help either.
    Finally, I found the problem, though I don't really know if it is "my" problem, or ZendAMF's problem, or Adobe's problem.
    It turned out that 'some' of my data had a 'bad' character in it.  Specifically, I had 'copied and pasted' some data from MS Word into mySQL Workbench.  Some of the data included the 'elipsis' character - you know, when you type "..." (dot dot dot) in MS Word, it replaces the three periods with a single elipsis character.  Although PHP could easily query and assemble this data into a nice object array, I noticed that that character showed up (in PHP's debugger) as a 'box' character, meaning "bad character".  Thus, I guess, Zend AMF and/or FlashBuilder could not 'bring over' and/or deal with this type of character.  As soon as I replace the few instances of that character with three periods, everything began to work perfectly.
    So... what to do about this?  I thought I was through with silly encoding/decoding of data when I left JavaScript and HTML behind in moving to FlashBuilder technology.  Am I really going to have to worry about this kind of thing?  Or might this be a bug/deficiency somewhere in the stack?
    Thanks for your help,
    -David

Maybe you are looking for

  • Export content in a pdf!

    Hi, Thanks in advance for the help . We publish classroom books using Adobe indesign software. But when we do translations of the same book, all the development work which we done for english should be repeated same for each language. My question: Is

  • Coding standards and naming convention

    Hi, Can anyone please provide any documentation available for BPM development. Would really appreciate for any pointers. Edited by: 905033 on Oct 23, 2012 2:54 AM

  • Datafile deleted

    hi by mistake i have deleted one datafile.. is there any way to bring up the db actually i have created a perfstat tablespace with 1 datafile named perfstat.dbf in two database latter on that tablespaces was not required so i was tried to drop the ta

  • Order cannot be placed using "Create sales order" fiori app

    We have setup "create sales order" fiori app and tried to place a order. We encountered with the error saying "In the context of Data Services an unknown internal server error occured" whilst clicking "Checkout" button. We looked up Error log and fou

  • Cant seem to get all the music in my music folder into my library.

    So i transfered my music to my mac from my pc using a cat5 e ethernet cable..worked wonders. and then i put all the music folders into my music folder on my desktop. i then dragged all of the music folders into itunes and it started to import.. i not