Hi, responded here:
https://stackoverflow.com/questions/56071757/how-to-talk-to-spring-blazeds-services-from-apache-royale-uisng-remoteobject/56081929#56081929 but you should also ado our mailing list in royale and search for AMF/RemoteObject, and check our wiki, and examples, since many things was already solved there. thanks! :) El vie., 10 may. 2019 a las 8:19, Ravics32 (<raviau...@gmail.com>) escribió: > Hi Carlos, > Thank you so much for your quick response. I have question > here > Right now I am least worried about UI for now. > My ultimate goal is to talk to Spring Services(BlazeDS destinations which > are defined in remoting-config.xml) from Apache Royale remote object. > > I have started my work like in this way. > 1) I have created method in my existing spring service which is integrated > with balzeDs as mentioned earlier. > 2) I have written one new project using apache royale it is just trying to > talk to spring service. Then after I have deployed 2 WARS in same tomcat > but > I am unable to talk to my service from apache royale because it is giving > an > error. > > MY MXML: > > <fx:Declarations> > > > <mx:RemoteObject id="loaderService" > endpoint="http://localhost:8081/STARS/messagebroker/amf" > > destination="reportService" result="handleLoadResult(event)" > fault="handleFault(event)" showBusyCursor="true" /> > > <mx:RemoteObject id="remoteObject" > destination="helloWorldRemotingService" > endpoint="http://localhost:8081/STARS/messagebroker/amf" > > result="handleLoadResult(event)" fault="handleFault(event)" > showBusyCursor="true"/> > > > > </fx:Declarations> > > > > > > > <mx:VBox width="400"> > <mx:HBox> > <mx:VBox> > <mx:Label text="Name to send via AMF"/> > <mx:TextInput id="name_txt"/> > </mx:VBox> > <mx:Button label="Send to Name" > click="loaderService.welcome()"/> > </mx:HBox> > <mx:Label text="{loaderService.welcome.lastResult}" height="15"/> > </mx:VBox> > > > > MY ERRor: > > > Exception: java.lang.NullPointerException > at > java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) > at > flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1373) > at > > flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1005) > at > > flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103) > at > flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158) > at > flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44) > at > > flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67) > at > > flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:166) > at > > flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291) > at > flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:353) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) > at > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) > at > > org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:107) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) > at > > org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) > at > > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) > at > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > at > > org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) > at > > org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) > at > > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) > at > > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) > at > > com.sp.cpem.filter.ExceptionHandlerFilter.doFilterInternal(ExceptionHandlerFilter.java:25) > at > > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) > at > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) > at > > org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660) > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) > at > org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) > at > > org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) > at > > org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) > at > org.apache.tomcat.util.net > .NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) > at > org.apache.tomcat.util.net > .SocketProcessorBase.run(SocketProcessorBase.java:49) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at > > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:748) > > > [ > errorReply: Flex Message (flex.messaging.messages.ErrorMessage) > clientId = 470F44C5-680A-3F0D-D58C-605A866C0B1F > correlationId =BlazeDS]Unhandled error when processing a message: > java.lang.NullPointerException > incomingMessage: Flex Message (flex.messaging.messages.RemotingMessage) > operation = null > clientId = 470F44C5-680A-3F0D-D58C-605A866C0B1F > destination = null > messageId = > timestamp = 1557396783081 > timeToLive = 0 > body = > [ > {headers={DSMessagingVersion=1, DSId=nil}, timeToLive=0, > clientId=null, destination=, > messageId=4CC0F8ED-8234-AEA2-F9B4-5CD3FD2D0DF0, > correlationId=, body={}, operat > ion=5, timestamp=0} > ] > hdr(DSEndpoint) = my-amf > destination = null > messageId = 470F4616-520F-9E4E-0484-14188756FFA6 > timestamp = 1557396783218 > timeToLive = 0 > body = null > code = Server.Processing > message = There was an unhandled failure on the server. > java.lang.NullPointerException > details = null > rootCause = null > body = null > extendedData = null > > > Service: > public class HelloWorldRemotingService { > > private static Log logger = > LogFactory.getLog(HelloWorldRemotingService.class); > > public HelloWorldRemotingService() { > super(); > > > logger.debug("#################################Helloworld###############################################################"); > } > > public String processHello(final String nameToSayHelloTo) > { > logger.debug("** Found @@@@@@@@@@@@@@@@@@@records:"); > return "Hello, " + nameToSayHelloTo + "!"; > } > > } > > > Remote-config.xml: > > <service id="remoting-service" > class="flex.messaging.services.RemotingService"> > > <adapters> > <adapter-definition id="java-object" > class="flex.messaging.services.remoting.adapters.JavaAdapter" > default="true"/> > </adapters> > > <default-channels> > <channel ref="my-amf"/> > </default-channels> > <destination id="alertHomeService"> > > <properties> > > <source>com.sp.cpem.service.AlertHomeService</source> > </properties> > </destination> > <destination id="helloWorldRemotingService"> > > <properties> > > <source>com.sp.cpem.service.HelloWorldRemotingService</source> > </properties> > </destination> > > > Please let me know If I am doing anything wrong. If you have example please > share me that I will appreciated. > > Thank you in advance. > > > > > > > -- > Sent from: http://apache-flex-users.2333346.n4.nabble.com/ > -- Carlos Rovira http://about.me/carlosrovira