Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Data Services
Viewing all articles
Browse latest Browse all 58696

Runtime configuation of services

$
0
0

I have two interdependat applications that I have inherited froma developer that has since left the company.

 

appA can launch appB as either an enbedded app using a SWFLoader or as a seperate app using navigateToURL.

 

These applications have been working fine when thay are compiled usig a services-config-xml file. I am trying to get away from compile-time endpoints. I now specify my service configuration at run-time and have mixed results:

 

1) appA works fine

2) appB works when launched via SWFLoader

3) appB DOES NOT work when launched as a seperate app via navigateToURL

 

As a seperate app appB gets an error when sending a request:

[MessagingError message='The channel class 'mx.messaging.channels.AMFChannel' specified was not found.']

 

I generated link reports for both applications with and without services-config-xml specified at compile-time. I see this reference to AMFChannel

 

    <script name="/Users/gorman/Documents/EclipseWorkspace/lib/FlexBuilder/sdks/3 .1.0/frameworks/libs/DAI-search.swc(mx/messaging/channels/AMFChannel)" mod="1214927763274" size="6724" optimizedsize="4093">
      <def id="mx.messaging.channels:AMFChannel" />
      <pre id="mx.messaging:MessageResponder" />
      <pre id="mx.messaging.channels:NetConnectionChannel" />
      <dep id="mx.resources:IResourceManager" />
      <dep id="mx.messaging.events:ChannelFaultEvent" />
      <dep id="mx.core:mx_internal" />
      <dep id="mx.messaging.messages:CommandMessage" />
      <dep id="mx.utils:ObjectUtil" />
      <dep id="mx.logging:Log" />
      <dep id="mx.resources:ResourceManager" />
      <dep id="mx.messaging.config:ConfigMap" />
      <dep id="AS3" />
      <dep id="mx.messaging:FlexClient" />
      <dep id="flash.events:IOErrorEvent" />
      <dep id="flash.net:Responder" />
      <dep id="flash.events:SecurityErrorEvent" />
      <dep id="mx.messaging.messages:AbstractMessage" />
      <dep id="en_US$messaging_properties" />
      <dep id="XML" />
      <dep id="mx.messaging.messages:IMessage" />
      <dep id="mx.messaging.config:ServerConfig" />
      <dep id="flash.events:NetStatusEvent" />
      <dep id="mx.messaging.messages:ErrorMessage" />
    </script>

 

I see this in the link report for appA whether or not services-config-xml is specified during compile. However, I only see this for appB  when services-config-xml is specified.

 

Does anyone have any theories about why mx.messaging.channels.AMFChannel is available in one app, but not the other. I have combed through all my code and configuration files. I can't  identify any noticible significant difference between the apps.

 

The approach I use to configure services at run time is simplistic. When I have the application compiled with the services-config-xml file, I trace the ServerConfig.xml property, which shows this:

 

<services>
  <service id="remoting-service">
    <destination id="dai-groupingList">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-popups-network">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-monumentation">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-archivedfiles">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-popups-operational">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-popupsname">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-campaigns">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-monuments">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-popups-monumentstyle">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-timecodes">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-funding">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-contact">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
    <destination id="dai-qc">
      <channels>
        <channel ref="my-amf"/>
      </channels>
    </destination>
  </service>
  <channels>
    <channel id="my-amf" type="mx.messaging.channels.AMFChannel">
      <endpoint uri="http://facility.unavco.org:9090/blazeds/messagebroker/amf"/>
      <properties/>
    </channel>
    <channel id="my-polling-amf" type="mx.messaging.channels.AMFChannel">
      <endpoint uri="http://facility.unavco.org:9090/blazeds/messagebroker/amfpolling"/>
      <properties>
        <polling-enabled>true</polling-enabled>
        <polling-interval-seconds>4</polling-interval-seconds>
      </properties>
    </channel>
    <channel id="my-secure-amf" type="mx.messaging.channels.SecureAMFChannel">
      <endpoint uri="https://facility.unavco.org:9090/blazeds/messagebroker/amfsecure"/>
      <properties/>
    </channel>
  </channels>
</services>

 

Now I simply compile without services-config-xml, read the above xml structure into the app at startup and assign it to the ServerConfig.xml property. As I said above. This works in one app, but not the other becuse for some reason mx.messaging.channels.AMFChannel is available in one and not the other. Furthermore, I find not explicit reference to mx.messaging.channels.AMFChannel in either application, but there is a reference to it in the link reports (for appA in all cases and in appB only when I specify services-config-xml).

 

Any thought??? This has bee driving me crazy!


Viewing all articles
Browse latest Browse all 58696

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>