Customizing server.name and server.port in services-config.xml

Hi
How can i find out what does BlazeDs use for server.name and server.port in
url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
can i customize those values?
thank you

Mete
Thank you for your reply
So context.root is resolved at compile time and server & port at runtime
Do you have an example or a link that shows / explain how to create custom tokens replaced by JVM options?
I have an issue where if i install my app on http://www.mydomain.com/mycontext/, it loads but will display the following message when making server call using Safari
FAULT: faultCode:Client.Error.MessageSend faultString:Send failed faultDetail:Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: http://www.mydomain.com/context/messagebroker/amf
Notte that it works on IE7 when accessing http://www.mydomain.com/mycontext/
and that it works great with all browsers on http://localhost:8080/mycontextroot
Would you know what is the best way to debug this issue?
Thank you
matt

Similar Messages

  • Does it actualy matter what you have on your remote server for services-config.xml

    Hi there, does it actualy matter what you have on your remote server for services-config.xml ?
    Does the information not just get baked into the flex 3 app at compile time on my local computer?

    I don't think this is right!
    If you don't have any config file, you can set up a remote object. The config file handles the default settings.
    If you implement something like
        <mx:RemoteObject id="myService"
            destination="amf"
            source="remoteServiceName"
            endpoint="http://myDomain/amfphp/gateway.php"
            fault="handleFault(event)">
            <mx:method name="test" result="handleResult(event)"/>
        </mx:RemoteObject>
    it will work!
    Dany

  • [svn:bz-trunk] 8910: Bug: LCDS-936 - Should have better error message in servlet log if server in services-config .xml is configured to use wrong class.

    Revision: 8910
    Author:   [email protected]
    Date:     2009-07-29 14:22:26 -0700 (Wed, 29 Jul 2009)
    Log Message:
    Bug: LCDS-936 - Should have better error message in servlet log if server in services-config.xml is configured to use wrong class.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Ticket Links:
        http://bugs.adobe.com/jira/browse/LCDS-936
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/MessageBrokerServlet.java

    After many hard working days.i finally found the error cause,i needed to make weblogic datasource also ADF doesnt work on internet explorer browser,it works on safary.hope it helps somebody

  • Hard-coded endpoint port numbers in services-config.xml

    Is it possible to remove hard-coded port numbers in
    services-config.xml and replace them with variables? I'd like to
    deploy the same Flex application War file (including
    services-config.xml within it) to our Dev, UAT and then Production
    environments, for which the endpoints and port numbers must vary.
    Re-building the app for each environment isn't desirable.
    Has anyone else achieved this?

    Maybe I can clarify what I mean. I'm assuming that basically
    the same war file needs to be deployed twice to the same app
    server, as in the original example, excluding changes to config
    files (e.g. editing xml=ok, recompiling jars/swf=not ok).
    The problem arises because if you were to change the config
    file to use another port, it wouldn't make a difference to the
    client app, which has the port and destination compiled in. You
    would need to compile the app twice, once with the first port, once
    with the second.
    So my workaround is to compile (not deploy) with a config
    file containing two sets of destination channels, then in your
    deployed config files you remove one of the sets.
    Assuming you want to deploy two instances of an app into a
    single app server, there will 3 different configs, one used just to
    compile, and one for each of the two deployed instances.
    Config A (compilation config files, used only to compile the
    flex application, not used during server start up) contains:
    my-rtmp1, my-rtmp2, my-destination1, my-destination2.
    Config B (server 1-debug) contains: my-rtmp1, my-destination1
    Config C (server 2-release) contains: my-rtmp2,
    my-destination2
    So when you deploy two instances with Config B and Config C,
    there is no port conflict. The Flex app then has some parameter set
    in the wrapper (or the absence of said parameter could be the
    indicator) to tell it whether to use my-rtmp1 or my-rtmp2.
    I just tested this and it worked. The way I tested was to add
    two buttons to a the Flex app, one which connects to
    destination1and performs a fill, one which connections to
    destination2 and performs the same operation. This Flex application
    was compiled with config A.
    I start a server with config B, and the application starts
    fine, and the first button gets the fill as expected. The second
    button instantly crashes the entire browser with an illegal memory
    access exception. The second set of dest/channels aren't listening,
    since the server doesn't know anything about them in it's config
    file.
    So on the bright side, that confirms to me that you can
    compile an app with redundant channels and destinations, then
    choose which destination/channel you want to use at runtime.
    On the down side, being able to consistently cause a crash
    like that usually isn't a good sign. I'll look again on Monday, and
    raise a Flash bug if it's still present in the latest version.

  • [svn:bz-trunk] 16330: QA: Yes - Ran test locally and it was failing but tested condition was true - there is no services-config .xml file

    Revision: 16330
    Revision: 16330
    Author:   [email protected]
    Date:     2010-05-26 07:55:41 -0700 (Wed, 26 May 2010)
    Log Message:
    QA: Yes - Ran test locally and it was failing but tested condition was true - there is no services-config.xml file
    Doc: No
    Checkintests: NA
    Details: Updated expected error message to match current error.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/NoServicesConfigFileTest/error.t xt

    I have uploaded detail.txt at below url.
    http://m.uploadedit.com/b041/1413264342685.txt
    Hi Mahesh,
    According to log file, I find the message ‘The setup100.exe.config file was not found, therefore the DTSWizard and SQLWatson app config files were not replaced’. It seems that the SQL Server setup file is not complete. Please check that if the SQL Server
    setup file is corrupted, if it is corrupted, please download it again and reinstall SQL Server 2008 R2.
    However, if there’s no problem with the setup file, please check that if there is third-party software such as anti-virus software on your computer blocking the process of SQL Server installation. In addition, make sure that you choose ‘Run as administrator’
    to launch the setup and configure SQL Server service accounts appropriately with administrator permission during the installation.
    For more details about this error, please review the following similar thread.
    http://answers.flyppdevportal.com/categories/sqlserver/sqlsetupandupgrade.aspx?ID=ad794a97-09ae-4aae-9d68-0b06f9af3e16
    Thanks,
    Lydia Zhang

  • How to use URL in actionscript  Instead of services-config.xml?

    Hi Alls,
    I would like to set my service's url in actionScript (I don't
    want to use compiler option -services witch need to recompile swf
    if you change service's url).
    I search for a long time on google but I found nothing, and
    adobe documentation isn't very clear.
    Thank for help!!!

    If you are relying on a services-config.xml file, then this
    must be provided
    at compile time because the compiler uses it to generate
    code.
    If you're not using <mx:DataService>, you can actually
    avoid compiling against
    a services-config.xml file. This is because for the other
    services, such
    as <mx:RemoteObject> or <mx:WebService
    useProxy="true"> or <mx:HTTPService
    useProxy="true">, the main thing the compiler does from
    services-config.xml
    is to generate the code to instantiate the set of channels
    that should be
    used to contact a destination in LCDS.
    Well... you can do that programmatically in ActionScript...
    something like
    this:
    import mx.messaging.ChannelSet;
    import mx.messaging.channels.AMFChannel;
    private function channelInit():void
    var channelSet:ChannelSet = new ChannelSet();
    var channel:AMFChannel = new AMFChannel(null, "
    http://{server.name}:{server.port}/mycontext/messagebroker/amf");
    channelSet.addChannel(channel);
    myRemoteObject.channelSet = channelSet;
    Just make sure you call this initialization code before you
    make any service
    requests. If you're proxied WebServices, be sure that you use
    the ActionScript
    API instead of the MXML tag so that you can delay when
    loadWSDL() is called
    because you'll want to setup the channelSet first.
    Regards,
    Pete
    Hello FredFlex,
    > Hi Alls,
    >
    > I would like to set my service's url in actionScript (I
    don't want to
    > use compiler option -services witch need to recompile
    swf if you
    > change service's url).
    >
    > I search for a long time on google but I found nothing,
    and adobe
    > documentation isn't very clear.
    >
    > Thank for help!!!
    >

  • Setting remote credentials in services-config.xml

    Webservice and remoting calls can be restricted access to
    CFC's using usernames and passwords. And to 'authenticate', I'm
    having trouble setting the <remote-username> and
    <remote-password> elements in the services-config.xml
    A remoting fault event is dispatched because the tags
    (<remote-username> & <remote-password>) "shouldn't"
    be in the <properties> element in the destination definition.
    I would rather protect that info on my server than compile it in
    the swf inside a setRemoteCredentials call, so why isn't the
    example from the docs working?

    Look at this thread
    re:UIX/XML: XSS styleSheets
    There is mention of a bug regarding the element to use - <style-sheet> instead of <style-sheet-name>. There might be some other stuff of interest in there as well.
    Cheers
    Ian

  • Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml.

    Hi,
    I am tryng to create a Flex Project, but got stuck with an error....
    The Error is  Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml.
    Initially I download jboss-5.1.0.GA and placed it in C folder.
    While creating project, I selected J2EE server,  selected remote object access service and LiveCycle Data Services...
    In the next step, I de-selected the use default location for local  LiveCycle Data Services server.
    In the root folder - C:\jboss-5.1.0.GA
    for Root URL:  http://localhost:8700/flex/
    Context Root: /flex
    when I clicl Validate Configuration.. this is the error I get  Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml.
    I can't understand what is going wrong here....any ideas....
    Thanks for the Help.....
    Thanks

    Run the wizard, select ColdFusion as the server technology, but don't
    check the option to use remote object access service. Then, open the
    project properties dialog, go to the Flex Compiler page, and add a the
    compiler flag: -services
    "C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml" (obviously
    changing the path as appropriate). This flag is what gets set by the
    wizard when you opt to use Flash Remoting.  -http://www.feed-squirrel.com/index.cfm?evt=viewItem&ID=77732
    Above is a work-around/solution that was successful for me.  Below are screen shots of how I initially configured the project, following the above solution.
    In the image above, notice how I didn't tick the "Use remote object access service" checkbox.
    For the image below, the 'Y:\' value is a mapped network directory to my server (IIS) webroot, which is "\\windowsserver/Inetpub/wwwroot/".  Root URL is the name of my server.  Fill in the fields with correct values and hit finish.
    Then navigate ( Project>Properties>Flex Compiler ) to this project's 'Flex Compiler context menu.
    And 'W:\' is another mapped network directory that points obviously to my Coldfusion's WEB-INF\flex.
    I hope that this helps.  As you may see, I'm hoping that this will help you and others that are likely to come across problem.

  • WEB-INF/flex/services-config.xml???

    I am confused about this file and it's location. In my
    environment (MX
    7.02/Apache/Linux) the WEB-INF/flex/ folder resides here:
    /opt/coldfusionmx7/wwwroot/WEB-INF/flex/
    However, the server is configured to serve web pages from
    this location:
    /apache/html/
    my /CFIDE/ folder is located at /apache/html/CFIDE/ but I
    have no WEB-INF
    folder except in the default location that isn't served up by
    the web
    server. As I understand it, for flash remoting to work, I
    must have the
    WEB-INF/flex/ folder in the root of my web server or in the
    working folder
    of my flex project ON the web server? Is this correct? If so,
    must I copy
    the WEB-INF folder to my working web document root folder?
    I'm very
    confused and so far have had HORRIBLE luck trying to get the
    most simple
    examples to run between Flex and Coldfusion. I am hoping
    someone can tell
    me what I'm doing wrong or at least point me to some
    documentation that
    doesn't appear to assume you are running Coldfusion in
    Developer mode from
    your local workstation (which ALL the samples appear to do).
    Thanks for any help, I configured the coldfusion servers here
    so I can make
    the needed changes, if I only knew what they were and the
    documentation
    hasn't helped me much.
    ...Brad

    Run the wizard, select ColdFusion as the server technology, but don't
    check the option to use remote object access service. Then, open the
    project properties dialog, go to the Flex Compiler page, and add a the
    compiler flag: -services
    "C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml" (obviously
    changing the path as appropriate). This flag is what gets set by the
    wizard when you opt to use Flash Remoting.  -http://www.feed-squirrel.com/index.cfm?evt=viewItem&ID=77732
    Above is a work-around/solution that was successful for me.  Below are screen shots of how I initially configured the project, following the above solution.
    In the image above, notice how I didn't tick the "Use remote object access service" checkbox.
    For the image below, the 'Y:\' value is a mapped network directory to my server (IIS) webroot, which is "\\windowsserver/Inetpub/wwwroot/".  Root URL is the name of my server.  Fill in the fields with correct values and hit finish.
    Then navigate ( Project>Properties>Flex Compiler ) to this project's 'Flex Compiler context menu.
    And 'W:\' is another mapped network directory that points obviously to my Coldfusion's WEB-INF\flex.
    I hope that this helps.  As you may see, I'm hoping that this will help you and others that are likely to come across problem.

  • Services-config.xml with actionscript

    I am amazed there is no half way simple method for creating a RTMP consumer without the need for this services-config.xml file. I have to be able to change, on the fly, what server the Flex client subscribes to and have multiple channels open to multiple servers. Maybe this is beyond the scope or capabilities of the RemoteObject, but we should be able create a consumer, channels, adapters and anything else we need without having to use the services-config.xml file.
    So here is the actual problem, I have everything working with the exception of messages being returned from the server are never received. I can set up the channels and channelsets, the consumer, and can subscribe and get an ack message back saying it is connected, but no messages ever come back. And yes, we have confirmed the service is getting the subscription and is sending data back to the client if we use the services-config.xml methodology and watch server logs.
    In our services-config.xml, I see
    <adapters>
         <adapter-definition id="messagingAdapter" class="FluorineFx.Messaging.Services.Messaging.MessagingAdapter" default="true"/>
    </adapters>
    Is there some way via actionscript to set up these adapters? Even if it means creating custom XML on the fly for the objects to parse thru, which I'm already doing in some places. Where are the adapters definable other than the services-config.xml?
    Thanks.
    Well the apadters have nothing to do with it as I can remove the mention from the xml and doing things via mxml still works and the AS3 stuff still doesn't work.
    Message was edited by: SchmaltzyMann

    Ah I see they've included it in a seperate file:
    <?xml version="1.0" encoding="UTF-8"?>
    <service id="remoting-service"
        class="flex.messaging.services.RemotingService"
        messageTypes="flex.messaging.messages.RemotingMessage">
        <adapters>
            <adapter-definition id="cf-object" class="coldfusion.flash.messaging.ColdFusionAdapter" default="true"/>
            <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter"/>
        </adapters>
        <default-channels>
            <channel ref="my-cfamf"/>
        </default-channels>
        <destination id="ColdFusion">
            <channels>
                <channel ref="my-cfamf"/>
            </channels>
            <properties>
                <source>*</source>
            </properties>
        </destination>
    </service>

  • No services-config.xml file

    What is the process that installs this file on my server? I
    dont have this file in my web directory

    are you running flex data services, or just using the Flex
    SDK? If you are just using the SDK (or Flex Builder) than you don't
    need to have the file on your server. It just needs to be available
    during compile-time.
    If you are using ColdFusion keep reading...
    I included a ColdFusion services-config.xml file below. You
    would just need to replace [INSERT YOUR URL] with your actual CF
    server URL. You could copy this file locally to your MXML
    components and include the path in the compiler options using the
    -services "c:\fullpath\to\services-config.xml"
    compiler switch.
    **** SERVICES-CONFIG.XML *****
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
    <services>
    <service id="coldfusion-flashremoting-service"
    class="flex.messaging.services.RemotingService"
    messageTypes="flex.messaging.messages.RemotingMessage">
    <adapters>
    <adapter-definition id="cf-object"
    class="coldfusion.flash.messaging.ColdFusionAdapter"
    default="true"/>
    </adapters>
    <destination id="ColdFusion">
    <channels>
    <channel ref="my-cfamf"/>
    </channels>
    <properties>
    <source>*</source>
    <!-- define the resolution rules and access level of the
    cfc being invoked -->
    <access>
    <!-- Use the ColdFusion mappings to find CFCs, by default
    only CFC files under your webroot can be found. -->
    <use-mappings>false</use-mappings>
    <!-- allow "public and remote" or just "remote" methods
    to be invoked -->
    <method-access-level>remote</method-access-level>
    </access>
    <property-case>
    <!-- cfc property names -->
    <force-cfc-lowercase>false</force-cfc-lowercase>
    <!-- Query column names -->
    <force-query-lowercase>false</force-query-lowercase>
    <!-- struct keys -->
    <force-struct-lowercase>false</force-struct-lowercase>
    </property-case>
    </properties>
    </destination>
    </service>
    </services>
    <channels>
    <channel-definition id="my-cfamf"
    class="mx.messaging.channels.AMFChannel">
    <endpoint uri="
    http://[INSERT YOUR URL]/flex2gateway/"
    class="flex.messaging.endpoints.AMFEndpoint"/>
    <properties>
    <polling-enabled>false</polling-enabled>
    <serialization>
    <instantiate-types>false</instantiate-types>
    </serialization>
    </properties>
    </channel-definition>
    </channels>
    <logging>
    <target class="flex.messaging.log.ConsoleTarget"
    level="Error">
    <properties>
    <prefix>[Flex] </prefix>
    <includeDate>false</includeDate>
    <includeTime>false</includeTime>
    <includeLevel>false</includeLevel>
    <includeCategory>false</includeCategory>
    </properties>
    <filters>
    <pattern>Endpoint.*</pattern>
    <pattern>Service.*</pattern>
    <pattern>Configuration</pattern>
    <pattern>Message.*</pattern>
    </filters>
    </target>
    </logging>
    <system>
    </system>
    </services-config>

  • FB3B2 services-config.xml stopped working

    My App worked fine in FlexBuilder3 (Beta 1 I suppose –
    yes, I'm sure it wasn't FlexBuilder2).
    I upgraded to FB3B2 and I now get the compiler error:
    Invalid endpoint port '' specified for channel definition
    'my-amfphp'
    I've attached my services-config.xml
    if I take out -services "services-config.xml" from my
    compiler options in flexbuilder my app compiles fine and runs
    (though of course it can't retrieve data from the server).
    What can I do to resolve this problem? I'm using Cairngorm
    2.2.1 Beta and CairngormEnterprise 2.2.1 Beta (though I'm not sure
    I really need that)

    Ok, this is not good at all...adding the port as I described
    works great if you have the new Flash Player, but breaks the flash
    remoting connection on Firefox if you have Flash Player 9.0.47.0!!!
    This is not good since this is the shipping flash player and the
    one that most of our customers are currently using!!!
    To fix this problem for our customers I had to go back to
    Flex Builder 3 Beta 1 so that I could build my product without the
    port!
    Is this just a "strict" compiler issue? If so, can you please
    make this error go away? My app has been working without strictly
    naming the port in the URL for a long time!
    Thanks

  • Services-config.xml for AIR application

    Hello,
    I am relatively new to flex. I am primarily a .net developer. I want to know how can I make a sample applicaion which uses services-config.xml
    Is there a tutorial which can help me...
    Any help is appriciated on this.
    Regards,
    Pavas

    The information in the compiled swf needs to match the information used at
    server runtime. It basically uses the endpoint URL and perhaps a few other
    tidbits from the config.
    We have tokens in the URL for server, port and context root, which help the
    'portability' of the swf, but if you change the MessageBroker servlet
    mapping for instance, this will probably break the swf.
    You *can* however, control the endpoint used by the client by using
    Actionscript APIs (see the docs), but you still of course have to code that
    in to the compiled application unless you prompt the user for that info.
    Does that help?
    Tom Jordahl
    Adobe

  • Tomcat: prefix in services-config.xml must be unique?

    Hi all, I've been trying to get my flex application communicating with Tomcat and now have it working
    Just trying to confirm something that took me many hours to get right and may help others along the way..
    Originally I modified the BlazeDS webapp by updating the remoting xml and putting in my own classes and it worked without any problems
    I then removed the BlazeDS webapp directory out the tree and created a new one carefully checking each step.. but there was nothing written to catalina log file at any time when running the app or any sign of communication even in debug mode
    I then moved the sample BlazeDS webapp back and when starting Tomcat it complained of duplicate ID's (here is the message: Exception: flex.messaging.config.ConfigurationException: Can not add destination with id 'insert your remoting destination id' to service with id 'proxy-service' because another service with id 'remoting-service' already has a destination with the same id)
    Eventually I noticed in services-config.xml logging section for my new webapp that the <prefix> was still set to BlazeDS - changed this to the new webapp directory name and not only did the exceptions disappear but everything now worked
    So I'm thinking that the prefix is much more important than just a logging descriptor as the XML tag suggests
    Can anyone confirm this behaviour or shed some light?
    PS I should make clear the above problems were not when running the turnkey but on a fresh install of tomcat 6.0.29 on Centos linux using apache proxypass/reverseproxypass to redirect port 80 to 8080
    PS2 - I realise this is not a pure Flex question but it's related due to Adobe crafting a turnkey Flex/Tomcat install with Blaze and it's in the flex configuration files)
    I hope I've covered all bases in the question and look forward to knowing more... CHEERS!

    Hi all, I've been trying to get my flex application communicating with Tomcat and now have it working
    Just trying to confirm something that took me many hours to get right and may help others along the way..
    Originally I modified the BlazeDS webapp by updating the remoting xml and putting in my own classes and it worked without any problems
    I then removed the BlazeDS webapp directory out the tree and created a new one carefully checking each step.. but there was nothing written to catalina log file at any time when running the app or any sign of communication even in debug mode
    I then moved the sample BlazeDS webapp back and when starting Tomcat it complained of duplicate ID's (here is the message: Exception: flex.messaging.config.ConfigurationException: Can not add destination with id 'insert your remoting destination id' to service with id 'proxy-service' because another service with id 'remoting-service' already has a destination with the same id)
    Eventually I noticed in services-config.xml logging section for my new webapp that the <prefix> was still set to BlazeDS - changed this to the new webapp directory name and not only did the exceptions disappear but everything now worked
    So I'm thinking that the prefix is much more important than just a logging descriptor as the XML tag suggests
    Can anyone confirm this behaviour or shed some light?
    PS I should make clear the above problems were not when running the turnkey but on a fresh install of tomcat 6.0.29 on Centos linux using apache proxypass/reverseproxypass to redirect port 80 to 8080
    PS2 - I realise this is not a pure Flex question but it's related due to Adobe crafting a turnkey Flex/Tomcat install with Blaze and it's in the flex configuration files)
    I hope I've covered all bases in the question and look forward to knowing more... CHEERS!

  • [svn] 3867: Add new user-agent info to the sample services-config.xml file.

    Revision: 3867
    Author: [email protected]
    Date: 2008-10-24 07:13:10 -0700 (Fri, 24 Oct 2008)
    Log Message:
    Add new user-agent info to the sample services-config.xml file.
    Modified Paths:
    blazeds/trunk/resources/config/services-config.xml

    Resolved! The problem was in the php code the wizard had generated as an example and that I had edited in Dreamweaver. I had tried to start a session and set session objects in the php code. I developed if() { statements} to check the session variable before executing the function in some of my data services. Apparently the wizard does not like this. I removed all references to session. I reconfigured the input types and the return types for each service. With the code now clean the wizard created the example code and placed the proper package in the scr.services package. I still have custom php code and it executes.
    Things I learned:
    If the php code stops when a session variable is not available in the if statement and the data service is refreshed, the wizard will not "look" beyond the if statement.
    Functions downstream of a session variable misshap will show in the data services window but the functions will have a circle icon to the left of the function name and each variable to be passed to the php code will be declared as type = Object in Flashbuilder. The input types and return types will have to be reconfigured for each non-functioning function. Simply commenting out a portion of the php code and attempting a refresh will not make it work again.
    When the wizard is unable to refresh properly because of a stop in the php code it stops working completely so additional refreshes or creation of code is not carried out.
    I decided to create a My SQL table for user and other identifiers rather than attempting the session object again.
    Sorry, I did not make screen shots as I solved this problem. I hope the solution is not hard to visualize.
    Thanks for looking and considering how to help me. I hope my solution works for you.

Maybe you are looking for