You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by bilbosax <wa...@comcast.net> on 2017/10/08 20:28:34 UTC

Deploy RemoteObject Service Remotely

OK, I finally got my webservices converted from XML webservices to
RemoteObject AMF services on my local machine and it is working like a
charm, fast as lightning.  But this is a mobile app and the database and
services need to be moved to a server, and I am struggling to get everything
set up properly to communicate remotely.  Here is what I have done:

1) I moved the folder containing my services to my webserver, it is called
mytestservice2. It contains four php files - index.php, HalfService.php,
VOService.php, VOCompsService.php.  Index.php is the important one as it
exposes the Zend AMF endpoint.  When I use my browser to browse to
http://mywebsiteaddress/mytestservice2/index.php, it displays "Zend AMF
Endpoint".  So I know that PHP and Zend include_paths are all set properly
to locate Zend AMF.

2) I altered my services-config.xml file to point to the new endpoint in the
URI at the bottom of the file.  Here is the code:

<?xml version="1.0" encoding="UTF-8"?>
<services-config>
    <services>
        <service id="amfphp-flashremoting-service"
class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">
            <destination id="zend">
                <channels>
                    <channel ref="my-zend"/>
                </channels>
                <properties>
                    <source>*</source>
                </properties>
            </destination>
        </service>
    </services>
    <channels>
        <channel-definition id="my-zend"
class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://www.billspencere.com/mytestservice2"
class="flex.messaging.endpoints.AMFEndpoint"/>
        </channel-definition>
    </channels>
</services-config>

3) I make sure that the compiler knows to include the services-config.xml
file when it compiles by adding this statement to my additional compiler
arguements dialogue:

-services "C:\Users\waspe\Adobe Flash Builder
4.7\RemoteObjectTest5\services-config.xml"



Unfortuanately, it is not making all of the appropriate connections because
I keep getting this error when I run the program:

[RPC Fault faultString="Channel disconnected"
faultCode="Client.Error.DeliveryInDoubt" faultDetail="Channel disconnected
before an acknowledgement was received"]




This is the most important and final step in my development cycle.  I have
to be able to get this deployed to a server and connect remotely.  Please
give me any thoughts that you may have AT ALL!!!

Thanks,
Bill



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: Deploy RemoteObject Service Remotely

Posted by bilbosax <wa...@comcast.net>.
Uggghhh.  Sorry guys, I figured it out.  I did everything correctly except
one thing.  When you move from your local machine to a shared webhost, you
have to change the database name/password to the values that are often
forced upon you by your webhost in your PHP service files, otherwise you
can't access your database to pass anything at all LOL



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: Deploy RemoteObject Service Remotely

Posted by bilbosax <wa...@comcast.net>.
I thought I should post my solution because I finally figured it out. 
Strangest thing.  It turns out that I was doing everything right, but the
information was not getting propagated into my compiled project.  So I
created a file called services-config.xml that points to the endpoint of my
services on a remote server.  When I first created the file, the uri was not
correct.  After hours of trying different addresses and nothing working, I
finally noticed that in the error messages the uri address was the same no
matter what changes I actually made  to the uri in my XML file.  So I simply
put in what I figured must be the right address and saved the file, and then
cleaned and rebuilt the program and compiled it, and voila!, it worked.  For
some reason, editing and saving information in my XML file was not actually
ever making it into the compiled program until after i basically "refreshed"
the app.  Don't understand why, but it is fixed.

I should also mention that it just came upon my radar that all webservices
must now be on an HTTP*S* server with an SSL, or the App Store will not
accept your program.  Just a heads up.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Re: Deploy RemoteObject Service Remotely

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Use Network Monitors to see what is being sent where.

HTH,
-Alex

On 10/8/17, 4:53 PM, "bilbosax" <wa...@comcast.net> wrote:

>I thought I had solved this, but I haven't.  I could still use any
>suggestions anyone can possibly think of.  I know I am missing something
>small, but I totally want to pull my hair out!
>
>
>
>--
>Sent from: 
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-users.2333346.n4.nabble.com%2F&data=02%7C01%7C%7C36ba6de40e044e100e1008d
>50ea7c8b8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636431036170599738&
>sdata=HoyqjrsV%2BUbUSc%2BaxLOyV4ScM%2BoQLrspQx9pNclZk7E%3D&reserved=0


Re: Deploy RemoteObject Service Remotely

Posted by bilbosax <wa...@comcast.net>.
I thought I had solved this, but I haven't.  I could still use any
suggestions anyone can possibly think of.  I know I am missing something
small, but I totally want to pull my hair out!



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/