You should add back the normal AMFChannel definition (that transports messages over HTTP) as it will coexist with the SecureAMFChannel definition (that transports messages over HTTPS). As stated before, because both channels use the same servlet mapping in their endpoint addresses the message broker requires that the distinguish themselves with further information - in J2EE this is achieved by adding path info after the servlet mapping. I think you've got a handle on this now.
 
So, let's turn to destination configuration. You assign more than one channel definition to a destination when you are unsure whether one (or more) of the endpoints will be available. An example would be a MessageService destination that hopes to use RTMP for real-time communication but in the event that this protocol is not supported it could fall back to an AMFChannel with polling set to true. Another example would be a RemotingService destination that hopes to use AMF over HTTP for more efficient communication due to the compact binary format used by the AMFChannel, but in the event that a deployment blocks non-text MIME types it could fall back to an HTTPChannel as it uses an XML based format for communication. The key point, however, is that only one channel will be used and it will be the first one that successfully connects.
 
If you're finding keeping compile time configuration in sync with runtime server configuration problematic then you have other options. You can consider not compiling in services configuration and instead programmatically construct a ChannelSet for a RemoteObject using the ActionScript APIs and add one or more appropriate instances of a Channel implementation (such as AMFChannel or SecureAMFChannel). The ChannelSet instance is assigned via the channelSet property of RemoteObject. The same is true for any RPC Service in Flex. Moreover, if you don't want to deal with ChannelSets you can use the legacy endpoint attribute on the <mx:RemoteObject> tag - this will create for you a default ChannelSet using the AMFChannel if the URL starts with http:// or the SecureAMFChannel if the URL starts with https://. Note, however, that this attribute exists to support old styled app syntax from Flex 1.5 and is only available on RemoteObject and only available on the MXML API for RemoteObject.
 
If any of the terminology is not clear, the architectural components of enterprise messaging are well summarized here:
 
 
Note that RPC services represent a special use of enterprise messaging... they send remote procedure calls as a message to a destination using a Producer and wait for an asynchronously acknowledgement message that correlates to the request message. (This differs from publish/subscribe messaging as the RPC services do not allow other consumers to subscribe to the results).
 
As for why <add-no-cache-headers>false</add-no-cache-headers> fixes the problem - I know of two issues with MSIE 6 and HTTPS. The first is that the presence of the HTTP response header "Pragma: no-cache" seems to cause MSIE to drop the binary data of the response body before the Flash Player can get access it (and thus it can't deserialize the result(s) to your outstanding request(s)). The second appears to be due to an HTTP response header Expires with a time set to before the current time. Although this technique is often used to immediately expire content so that it isn't cached, it seems MSIE doesn't handle this. A fix would be to set the Expires header to a very short time in the future, say 2 seconds... however the FDS channel-definition configuration does not yet provide a way to set individual response headers. As such, just stopping the channels from setting any caching settings will fix the issues in MSIE - though one may still fine tune the caching behavior of the client using a J2EE servlet filter that intercepts requests made to the message broker servlet.
 
Pete


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of syndrake7
Sent: Wednesday, October 04, 2006 8:42 AM
To: [email protected]
Subject: [flexcoders] Re: HTTP Status 500 Error using SSL endpoint


Peter,

I believe the <add-no-cache-headers>false</add-no-cache-headers>
property was the fix. I mentioned this on the Adobe forum post, too,
for others who might have a similar problem.

I think I understand what you mean by unique endpoint mappings. I
have not yet tried this, though. My latest attempts had been using
only one channel - I had replaced the non-ssl channel (default) with
an ssl channel.

SSL is now working with one channel after adding the no-cache
property.

The next step for me is to determine how to keep this working after
adding back the standard non-ssl channel. And, using the Flex - CF
wizard, how to instruct it to use a specific channel with the
default destination of ColdFusion. The wizard writes all
RemoteObject calls using that default destination. Like this:

<mx:RemoteObject
id="dataManager"
showBusyCursor="true"
destination="ColdFusion"
source="MyArtDemo.components.cfgenerated.Artists">
<mx:method name="getMasterQuery"
result="getMasterQuery_result(event)" fault="server_fault(event)" />
<mx:method name="deleteItem"
result="deleteItem_result(event)" fault="server_fault(event)" />
</mx:RemoteObject>

So, in a nutshell, if I have multiple channels defined under the
ColdFusion destination, how do I indicate which channel the wizard
should use? I see that the RemoteObject class has an endpoint
property, but trying to edit the wizard's default code with every
build defeats the purpose of having a wizard. I'm probably missing
something obvious.

Anyway, thanks for helping me get SSL using RemoteObject working!

-Tony

--- In [EMAIL PROTECTED]ups.com, "Peter Farland" <[EMAIL PROTECTED].>
wrote:
>
> I replied to the Adobe forums - the requirement to add some path
info to
> your secure AMF channel endpoint was, in spirit, correct... here's
what
> I posted:
>
> "I just want to restate knallore's poste regarding channel
definitions
> as it is essentially correct, but the issue was that he didn't
realize
> that /flex2gateway was the servlet mapping already (not the context
> root).
>
> In general, if you have two channels defined that use the same
servlet
> mapping then the endpoints must be unique from the servlet mapping
> onwards, so you should add some path info to the endpoint URI to
> distinguish between the secure and normal AMF channels:
>
> SecureAMFChannel endpoint:
> https://me.com/flex2gateway/secureamf
>
> AMFChannel endpoint
> https://me.com/flex2gateway/amf
>
> Also, in web.xml the servlet mapping must allow for path info...
here is
> what it is in FDS:
>
> <servlet-mapping>
> <servlet-name>MessageBrokerServlet</servlet-name>
> <url-pattern>/messagebroker/*</url-pattern>
> </servlet-mapping>
>
> Notice the /* at the end of the servlet mapping pattern. Please
check
> that your equivalent entry for ColdFusion 7.0.2's web.xml (i.e. for
> /flex2gateway/*) includes the /*.
>
> Also, as always, please ensure that you don't have a dirty
classpath
> with older versions of CF Mystic and/or beta versions of FDS too."
>
>
> Also, can you try adding the following property to your
> <channel-definition> <properties> section:
>
> <add-no-cache-headers>false</add-no-cache-headers>
>
> ...restart the server and try again?
>
> Note that you can use something like Paros Proxy on the client to
debug
> SSL / HTTPS requests... but you could also rely on <mx:TraceTarget
> level="0"> and the debug Flash Player / flashlog.txt to see what
was
> being sent.
>
>
>
>
> ________________________________
>
> From: [EMAIL PROTECTED]ups.com
[mailto:[EMAIL PROTECTED]ups.com] On
> Behalf Of syndrake7
> Sent: Friday, September 29, 2006 4:34 PM
> To: [EMAIL PROTECTED]ups.com
> Subject: [flexcoders] Re: HTTP Status 500 Error using SSL endpoint
>
>
>
>
> I'm having some difficulty getting a sniffer going due to security
> limitations here. However, I did get some web log info:
>
> 2006-09-29 20:04:43 W3SVC699396293 #.#.#.# POST /flex2gateway/ -
> 443 - #.#.#.# Mozilla/4.0+
>
(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322;+InfoPa
> th.1;+.NET+CLR+2.0.50727) https://me.com/myartdemo/bin/main.swf
> <https://me.com/myartdemo/bin/main.swf> 200
> 0 0
>
> Seems like my swf is getting the all-clear from the web server,
> which is returning a 200 code. Flex thinks it's not connecting,
> though.
>
> -Tony
>
> --- In [EMAIL PROTECTED]ups.com <mailto:flexcoders%
40yahoogroups.com>
> , Tom Chiverton <tom.chiverton@>
> wrote:
> >
> > On Wednesday 27 September 2006 16:58, syndrake7 wrote:
> > > (mx.rpc:Fault)
> > > faultCode = "Client.Error.MessageSend"
> > > faultDetail = "Channel.Connect.Failed error
> > > NetConnection.Call.Failed: HTTP: Failed"
> > > faultString = "Send failed"
> > > details = "https://me.com/flex2gateway/
> <https://me.com/flex2gateway/> "
> > > level = "error"
> >
> > Can you stick a network sniffer in there and see what is going
> past on the
> > wire ?
> >
> > > On the Adobe forum, someone posted that "The endpoint URI for
the
> > > secureAMFchannel definition should be:
> > > https://me.com/flex2gateway/messagebroker/amfsecure
> <https://me.com/flex2gateway/messagebroker/amfsecure> " but that
> >
> > I don't think it should be that either.
> >
> > It's worth pointing out I was never able to get this to work at
> all using
> > CF7.0.2 on SuSE 10.
> >
> > --
> > Tom Chiverton
> > Helping to carefully synergize integrated infrastructures
> >
> > ****************************************************
> >
> > This email is sent for and on behalf of Halliwells LLP.
> >
> > Halliwells LLP is a limited liability partnership registered in
> England and Wales under registered number OC307980 whose
registered
> office address is at St James's Court Brown Street Manchester M2
> 2JF. A list of members is available for inspection at the
> registered office. Any reference to a partner in relation to
> Halliwells LLP means a member of Halliwells LLP. Regulated by the
> Law Society.
> >
> > CONFIDENTIALITY
> >
> > This email is intended only for the use of the addressee named
> above and may be confidential or legally privileged. If you are
not
> the addressee you must not read it and must not use any
information
> contained in nor copy it nor inform any person other than
Halliwells
> LLP or the addressee of its existence or contents. If you have
> received this email in error please delete it and notify
Halliwells
> LLP IT Department on 0870 365 8008.
> >
> > For more information about Halliwells LLP visit
www.halliwells.com.
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to