Announcement Announcement Module
Collapse
No announcement yet.
Need some explanation on a configuration fix I made from the spring flex test drive Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need some explanation on a configuration fix I made from the spring flex test drive

    I have setup the Spring Flex test drive and have used that to setup a test project. I had to make the following changes to get the application to work. Can someone explain theoretically what I fixed to get the following two configurations to work.
    Doesn't work
    Code:
    <flex:message-broker mapping-order="1">
      <flex:mapping pattern="/messagebroker/*"/>
      <flex:message-service
        default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
      <flex:secured />
    </flex:message-broker>
    PageNotFound  W org.springframework.web.servlet.DispatcherServlet noHandlerFound 
    No mapping found for HTTP request with URI 
    [/TestProject/messagebroker/amf] in DispatcherServlet with name 'flex'
    Works - Removed the flex:mapping pattern
    Code:
    <flex:message-broker mapping-order="1">
      <flex:message-service
        default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
      <flex:secured />
    </flex:message-broker>
    2) I had fixed the call to the remote object from the default one in the test drive. I had to change the first remote call from "my-amf" to "amf" or had to remove the endpoint to get it to work. Why is that ?
    Code:
    // Fails
    // MessageBroker E org.springframework.flex.servlet.MessageBrokerHandlerAdapter handle 
    Received invalid request for endpoint path '/messagebroker/my-amf'.
    <mx:RemoteObject id="productService" destination="productService"
    	 endpoint="http://localhost:9084/HROnBoardingWeb/messagebroker/my-amf">
    </mx:RemoteObject>
    // Successful
    <mx:RemoteObject id="industryService" destination="industryService">
    </mx:RemoteObject>
    Even though my-amf is defined in my services-config and the flex-servlet as
    Code:
    <services>
    	<default-channels>
    		<channel ref="my-amf"/>
    	</default-channels>
    </services>
    
    <flex:remoting-destination ref="productService" />
    
    @Service("industryService")
    @RemotingDestination(channels = { "my-amf" })
    public class IndustryDAO implements IIndustryDAO
Working...
X