During server startup, the MessageBrokerServlet should be initialized and you 
could enabled Debug level logging in your services-config.xml to verify.
Once the web app is running, before making any requests for a *.mxml file, try 
making a request to one of your endpoints directly; start with a channel 
endpoint URL from your services-config.xml file, replace any tokens (i.e. 
{server.name}) with actual values, and request it directly in a browser. You 
should get back an empty 200 OK.
Once you have that working, then proceed with further debugging of the 
FlexMxmlServlet.

Seth

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of sk_acura
Sent: Thursday, May 22, 2008 6:48 AM
To: [email protected]
Subject: [flexcoders] Re: RemoteObject connections over HTTPS fails..

Hi Seth,

Till now we have used Flex SDK2.0.1. And we are now trying to
migrate to Flex SDK3.0.0. ( As we were having issues in enabling
access to our app on https and also we would like to use new features
in Flex 3 like ADG).

We have tried the Flex3 SDK Version (3.0.0.447) with BlazeDS
3.0.0.544) and here is the web.xml we have got..

[CODE]
<web-app>
<display-name>DPA UI</display-name>
<description>DPA UI Web Application</description>

<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/propfileConfig.xml
/WEB-INF/classes/dpaApplicationContext.xml
/WEB-INF/classes/dpaCommonBeansContext.xml
classpath:/applicationConfig.xml
</param-value>
</context-param>

<context-param>
<param-name>flex.class.path</param-name>
<param-value>
/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars
</param-value>
</context-param>
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>

<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>
flex.messaging.MessageBrokerServlet
</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>PDFResourceServlet</servlet-name>
<display-name>
Helper for retrieving dynamically generated PDF documents.
</display-name>
<servlet-class>
flex.samples.pdfgen.PDFResourceServlet
</servlet-class>
</servlet>

<servlet>
<servlet-name>FlexMxmlServlet</servlet-name>
<display-name>MXML Processor</display-name>
<description>Servlet wrapper for the Mxml Compiler</description>
<servlet-class>flex.bootstrap.BootstrapServlet</servlet-class>
<init-param>
<param-name>servlet.class</param-name>
<param-value>
flex.webtier.server.j2ee.MxmlServlet
</param-value>
</init-param>
<init-param>
<param-name>webtier.configuration.file</param-name>
<param-value>
/WEB-INF/flex/flex-webtier-config.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>FlexSwfServlet</servlet-name>
<display-name>SWF Retriever</display-name>
<servlet-class>flex.bootstrap.BootstrapServlet</servlet-class>
<init-param>
<param-name>servlet.class</param-name>
<param-value>
flex.webtier.server.j2ee.SwfServlet
</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet>
<servlet-name>FlexForbiddenServlet</servlet-name>
<display-name>Prevents access to *.as/*.swc files</display-name>
<servlet-class>flex.bootstrap.BootstrapServlet</servlet-class>
<init-param>
<param-name>servlet.class</param-name>
<param-value>
flex.webtier.server.j2ee.ForbiddenServlet
</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>FlexInternalServlet</servlet-name>
<servlet-class>flex.bootstrap.BootstrapServlet</servlet-class>
<init-param>
<param-name>servlet.class</param-name>
<param-value>
flex.webtier.server.j2ee.filemanager.FileManagerServlet
</param-value>
</init-param>
<load-on-startup>10</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>PDFResourceServlet</servlet-name>
<url-pattern>/dynamic-pdf/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexMxmlServlet</servlet-name>
<url-pattern>*.mxml</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexSwfServlet</servlet-name>
<url-pattern>*.swf</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexForbiddenServlet</servlet-name>
<url-pattern>*.as</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexForbiddenServlet</servlet-name>
<url-pattern>*.swc</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexInternalServlet</servlet-name>
<url-pattern>/flex-internal/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
</web-app>
[/CODE]

i have downloaded the Flex_j2EE module from the Link 

http://flexorg.wip3.adobe.com/modules/FlexModule_j2ee.zip and copied
the JARS to /WEB-INF/lib

When i checked the web.xml that is in the samples provided by BlazeDS
all i see is the MessageBrokerServlet in web.xml. But we wanted the
autogeneration of SWF Files when a request is made for *.mxml Files..

Appreciate your help..

Thanks
Mars 

--- In [email protected], "Seth Hodgson" <[EMAIL PROTECTED]> wrote:
>
> What version of the product are you using?
> 
> Based on that stack trace, it looks like your FlexMxmlServlet is
attempting to load and init a MessageBrokerServlet. That seems odd.
How do you have these servlets configured in web.xml?
> 
> Seth
> 
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of sk_acura
> Sent: Wednesday, May 21, 2008 3:23 PM
> To: [email protected]
> Subject: [flexcoders] Re: RemoteObject connections over HTTPS fails..
> 
> Hi,
> 
> First of all thanks so much for your response..
> 
> I tried chaning my secure channel defintion as you suggested and
> now i am getting the following Error in the log..
> 
> [ERROR]
> flex.messaging.config.ConfigurationException: Invalid channel endpoint
> class 'flex.messaging.endpoints.AMFEndpoint' specified for
> 'channel-secure-amf'.
> 
> INFO: FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 155539
> May 21, 2008 6:16:59 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: StandardWrapper.Throwable
> flex.messaging.config.ConfigurationException: Invalid channel endpoint
> class 'flex.messaging.endpoints.AMFEndpoint' specified for
> 'channel-secure-amf'.
> at
>
flex.messaging.config.MessagingConfiguration.createEndpoints(MessagingConfiguration.java:141)
> at
>
flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java:82)
> at
> flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:105)
> at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
> at
>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> at java.lang.Thread.run(Thread.java:619)
> May 21, 2008 6:16:59 PM org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Allocate exception for servlet MessageBrokerServlet
> flex.messaging.config.ConfigurationException: Invalid channel endpoint
> class 'flex.messaging.endpoints.AMFEndpoint' specified for
> 'channel-secure-amf'.
> at
>
flex.messaging.config.MessagingConfiguration.createEndpoints(MessagingConfiguration.java:141)
> at
>
flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java:82)
> at
> flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:105)
> at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
> at
>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> at java.lang.Thread.run(Thread.java:619)
> 
> [/ERROR]
> 
> Here is the channel Def..
> 
> [CODE]
> 
> <channel-definition id="my-secure-amf"
> class="mx.messaging.channels.SecureAMFChannel">
> <endpoint
>
uri="https://{server.name}:{server.port}/{context.root}/messagebroker/amf";
> class="flex.messaging.endpoints.AMFEndpoint"/>
> </channel-definition>
> 
> [/CODE]
> 
> I tried even copying the Flex3 SDK Jars and the Jars from BalzeDS
> (3.0.544) build with no luck..
> 
> Thanks
> Mars
> 
> --- In [email protected], "Seth Hodgson" <shodgson@> wrote:
> >
> > If you have a proxy between the client and server that rewrites
> HTTPS requests to HTTP requests before forwarding to the app server
> you need you channel-definition to specify a secure client-side
> channel class and URL, and an insecure server side endpoint class. So,
> something like:
> > 
> > <channel-definition id="secure-amf"
> > class="mx.messaging.channels.SecureAMFChannel">
> > <endpoint
> >
>
uri="https://{server.name}:{server.port}/{context.root}/messagebroker/amf";
> > class="flex.messaging.endpoints.AMFEndpoint"/>
> > </channel-definition>
> > 
> > Note that the endpoint class is AMFEndpoint, not SecureAMFEndpoint.
> > 
> > Regarding the error you get when you hit the secure endpoint
> directly in the browser (flex.messaging.MessageException: No
> configured channel has an endpoint
> > path '/messagebroker/amfsecure'...); that's odd - are you sure you
> didn't edit your config file without restarting? 
> > 
> > Hope that helps,
> > Seth
> > 
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> On Behalf Of sk_acura
> > Sent: Wednesday, May 21, 2008 10:54 AM
> > To: [email protected]
> > Subject: [flexcoders] RemoteObject connections over HTTPS fails..
> > 
> > HI All,
> > 
> > We have a BalzeDS based web app deployed on tomcat working fine when
> > we use HTTP.
> > 
> > How ever when we try to expose our web app over extranet the swf files
> > that tries to connect to the Remote Object gets timed out..
> > 
> > Here are the channels that are configured in the services-config.xml
> > 
> > [CODE]
> > <channels>
> > <channel-definition id="my-amf"
> > class="mx.messaging.channels.AMFChannel">
> > <endpoint
> >
>
uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amf";
> > class="flex.messaging.endpoints.AMFEndpoint"/>
> > <properties>
> > <polling-enabled>false</polling-enabled>
> > </properties>
> > </channel-definition>
> > 
> > <channel-definition id="my-secure-amf"
> > class="mx.messaging.channels.SecureAMFChannel">
> > 
> > <endpoint
> >
>
uri="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure";
> > class="flex.messaging.endpoints.SecureAMFEndpoint"/>
> > </channel-definition>
> > 
> > <channel-definition id="my-polling-amf"
> > class="mx.messaging.channels.AMFChannel">
> > <endpoint
> >
>
uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling";
> > class="flex.messaging.endpoints.AMFEndpoint"/>
> > <properties>
> > <polling-enabled>true</polling-enabled>
> > <polling-interval-seconds>8</polling-interval-seconds>
> > </properties>
> > </channel-definition>
> > <channel-definition id="my-http"
> > class="mx.messaging.channels.HTTPChannel">
> > <endpoint
> >
>
uri="http://{server.name}:{server.port}/{context.root}/messagebroker/http";
> > class="flex.messaging.endpoints.HTTPEndpoint"/>
> > </channel-definition>
> > 
> > <channel-definition id="my-secure-http"
> > class="mx.messaging.channels.SecureHTTPChannel">
> > 
> > <endpoint
> >
>
uri="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure";
> > class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
> > </channel-definition>
> > </channels>
> > [/CODE]
> > 
> > And the default-channels set in remoting-config.xml and
> > proxy-config.xml are
> > 
> > [CODE]
> > <default-channels>
> > <channel ref="my-secure-amf"/>
> > <channel ref="my-secure-http"/>
> > <channel ref="my-amf"/>
> > <channel ref="my-http"/>
> > </default-channels>
> > [/CODE]
> > 
> > First of all do i need to enable the secure-channels ?? As the https
> > port is not enabled in the tomcat on which this web app is deployed..
> > 
> > How ever there is a proxy in between which rewrites the https requests
> > as http requests and redirects them to the tomcat..
> > 
> > When i add the secure channels ( amf and http) in my default-channel
> list
> > and i have included the trace target in my main mxml File..
> > 
> > It shows that it is pinging the my-secure-amf endpoint and doesn't get
> > any response..( i get the same when i connect using http i.e, from the
> > intranet)
> > 
> > Now when i remove the secure channels from my default channel list and
> > regenerate the .swf files (i have the servlet mapping configured to
> > regenerate them if they don't exists already..) i can connect to the
> > web app from intranet which uses my-amf channel.
> > 
> > How ever when i try to connect over https the trace shows it is not
> > getting any ping response from my-amf channel..
> > 
> > Also when i try the following URLs from my browser i get an Error..
> > 
> > http://localhost:8080/myapp/messagebroker/amfsecure
> > 
> > [ERROR]
> > flex.messaging.MessageException: No configured channel has an endpoint
> > path '/messagebroker/amfsecure'.
> > flex.messaging.MessageBroker.getEndpoint(MessageBroker.java:318)
> >
>
flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:329)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > [/ERROR]
> > 
> > I am getting this Error in both intranet (using HTTP) and Extranet
> > Environments (using Https)
> > 
> > I have read the blog posts related to this
> > (http://blog.crankybit.com/flex-remoting-over-ssl/)
> > and doing exactly as it is suggested still unable to resolve the
> > issue..!!
> > 
> > Thanks
> > Mars
> >
>
 

Reply via email to