[flexcoders] Re: Choice of backend systems - which provides best functionality
WS-Security is the standard spec for securing web service calls. Most web service stacks have some level of support for it. Among the things it offers are username/token style security and encryption of some/all of the SOAP envelope. There is an overview and a few good links here: http://www-128.ibm.com/developerworks/library/specification/ws- secure/ Also, see the Adobe AS3 UsernameToken support in the corelibs project here: http://weblogs.macromedia.com/as_libraries/docs/corelib/ Hope that helps, Derek --- In flexcoders@yahoogroups.com, Darren Houle [EMAIL PROTECTED] wrote: Franck, Makes sense to me. Do you (or does anyone) know of any open/standards based architecture for this SOAP token security? Any OOTB solutions out there, or do I need to redesign the wheel? Thanks! Darren -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: WSDLError:Element not resolvable
I use a similar system in my app for disabling the controls until the service is loaded. In the "load" handler, I add handlers for faults and results for the various operations (I don't use operation tags, but instead manually register everything in AS). Here is the general idea... !-- Web service connector -- mx:WebService id="MyWebService" wsdl="http://services.cadtel.com/jbpm-webapp/wsdl/jbpm.wsdl" useProxy="false" showBusyCursor="true" concurrency="multiple" load="MyJbpmWebService.init(); Dashboard.enabled=true;" fault="MyJbpmWebService.defaultFault(event);" / The "init()" method looks like this... public function init():void { service.addEventListener("fault", defaultFault); service.GetProcessDefinitions.addEventListener("result", getProcessDefinitionsResponse); service.GetProcessInstances.addEventListener("result", getProcessInstancesResponse); service.NewProcessInstance.addEventListener("result", newProcessInstanceResponse); service.SignalProcessInstance.addEventListener("result", signalProcessInstanceResponse); } ... and the method that is failing looks like this ... /** * Create XML and send apos;getProcessInstancesapos; message to web service. */ public function getProcessInstances(definitionId:int):void { var xml:XML = new XML( "jbpm:GetProcessInstances xmlns:jbpm=\"http://org.jbpm/service\" " + " xmlns:typ=\"http://org.jbpm/types\"" + " definitionId=\"" + definitionId + "\"/"); service.GetProcessInstances.request = xml; service.GetProcessInstances.resultFormat = "e4x"; try { service.GetProcessInstances.send(); } catch (e:WSDLError) { // TODO: Nasty hack to get around first call failing... service.GetProcessInstances.send(); } } /** * Handles response from getProcessInstances() web service call. */ protected function getProcessInstancesResponse(event:ResultEvent):void { if (!checkForFault(XMLList(event.result))) { controller.receivedGetProcessInstancesResponse( XML(event.result[0].types::ProcessInstances)); } } Note the try...catch block that resubmits the message. Ths fixes the problem, but seems like a huge hack. I have no idea why all of the other operations work fine, but the first call to that particular one always fails. It would be nice to have the source for the WebService class so that I could trace into it, but that doesn't seem to be included in the SDK. Thanks,Derek Adams --- In flexcoders@yahoogroups.com, "Marco Casario" [EMAIL PROTECTED] wrote: I often use a "light system", that is an actionscript class who traces me the status of async processes (with RemoteObject or WebServices). If the light is red, all flex controls involved in invoking any webservice methods are disabled (I used mx:states to handle with it). When the light is green I make controls enabled. Hope that helps, Marco Casario http://casario.blogs.com- Original Message - From: Franck de Bruijn To: flexcoders@yahoogroups.com Sent: Monday, August 07, 2006 6:33 AM Subject: [Norton AntiSpam] RE: [flexcoders] Re: WSDLError:Element not resolvableHi,I am not sure if my answer is really the answer, since I personally don't use the Webservice tag, but the webservice action script classes.When a webservice is initialized, it will load the wsdl from an URL. This can take some time and is an asynchronous process. This means that the webservice loads the WSDL in the background. If it is not finished loading/parsing the wsdl and you try to invoke an operation it will return errors.Try to wait a few seconds and invoke it then, if the error still remains, then this is the reason. How to solve it? I did it like this:secWsImpl = new WebService(); secWsImpl.addEventListener(LoadEvent.LOAD, handleWsLoaded); secWsImpl.addEventListener("fault", handleWsError); secWsImpl.loadWSDL("/FlexTestWebServices/wsdl/SecurityWebServiceRpcEnc8080.wsdl");In the method 'handleWsLoaded' you can then invoke an operation if you'd like, or enable a button or something like that.Cheers, Frnack -- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Derek Adams Sent: Sunday, August 06, 2006 11:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: WSDLError:Element not resolvableDid you have any luck figuring this one out? I am having the same problem. The first call to a particular operation always fails, then all calls after that work fine. Even weirder is the fact that a call to another operation on the same service is successful right before the other call fails. --- In flexcoders@yahoogroups.com, "flexava" flexava@ wrote: I ran into a strange problem when I was trying to call a w
[flexcoders] Re: Spring Enable Flex
You can emulate a lot of what Spring provides without adding anything to Flex. For instance, you can use dependency injection by exposing a public variable on a class and using data binding to inject the object/value from MXML. I guess what I am getting at is that MXML pretty much becomes the Spring config file. --- In flexcoders@yahoogroups.com, Allen Riddle [EMAIL PROTECTED] wrote: I'm not having any issues, it's just nice because it's one less configuration format to learn. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Gianninas Sent: Thursday, July 13, 2006 2:06 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Spring Enable Flex Probably not can u describe the problem/issue you are having? Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Allen Riddle Sent: Thursday, July 13, 2006 10:41 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Spring Enable Flex Does anybody (Adobe developers???) know if Adobe has any plans to Spring enable Flex? I think it would really help out with configuration. Allen Riddle Sofware Development x3217 AVIS IMPORTANT WARNING Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur. This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: How to parse web services response doc containing namespace
I have been successful in doing that by declaring the namespace as a local variable in ActionScript, then using it in the e4x query. For instance: private var aps:Namespace = new Namespace (http://cadtel.com/APWebService;); model.currentOrderPaths = results.aps::Order.aps::RelatedPaths.aps::Paths.aps::NetworkPath; Hope that helps, Derek --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Tracy, can you post a more complete example? I would be very interested in something that does what you explained but am not totally sure I understand your description. Thanks, Ben --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: I just discovered something that might help. (This is with beta 3 though) If you do not set resultFormat as e4x, but instead do: var xmlResult:XML = newXML(result.toString()) for me, that created an xml object without the namespace stuff. Let me know if it works. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kevntrace Sent: Thursday, July 13, 2006 2:25 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to parse web services response doc containing namespace I am a complete newbie to Flex, ActionScript et al, so please forgive me if my questions appear simplistic. I've implemented, and got working, the sample app which invokes a web service and displays the Top 5 popular posts from a blog service. I now want to modify this app so it calls my own homegrown web service. I have been able to get the invocation working, and I get a valid response, which I confirmed by displaying the lastResult object in a textbox. My problem now is I want to parse through the result document, which contains a namespace, and populate items on the form - I have not yet been successful in my attempts. Here is the source code to my MXML application, followed by the WS response document; MXML App ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute creationComplete=wsBlogAggr.getMostPopularPosts.send() mx:Script ![CDATA[ import mx.controls.Alert; private namespace csw = http://kevin.company.com/services/webservices/adobe/blogSvc/blogPo http://kevin.company.com/services/webservices/adobe/blogSvc/blogPo rt; use namespace csw; ]] /mx:Script mx:WebService id=wsBlogAggr wsdl=http://localhost:9400/services/adobe?wsdl http://localhost:9400/services/adobe?wsdl useProxy=false mx:operation name=getMostPopularPosts resultFormat=e4x mx:request format=xml ns1:getMostPopularPosts xmlns:ns1=http://kevin.company.com/services/webservices/adobe/blogSv http://kevin.company.com/services/webservices/adobe/blogSv c/blogPort ns1:daysBack10.0/ns1:daysBack ns1:limit5.0/ns1:limit /ns1:getMostPopularPosts /mx:request /mx:operation /mx:WebService mx:Panel x=10 y=10 width=475 height=400 layout=absolute title=Most Popular Posts mx:TextArea text={wsBlogAggr.getMostPopularPosts.lastResult}/ mx:ComboBox x=48 y=30 id=cbxNumPosts change=wsBlogAggr.getMostPopularPosts.send() mx:Object label=Top 5 data=5/ mx:Object label=Top 10 data=10/ mx:Object label=Top 15 data=15/ /mx:ComboBox mx:DataGrid x=48 y=80 id=dgTopPosts columnWidth=400 dataProvider={wsBlogAggr.getMostPopularPosts.lastResult} width=350 mx:columns mx:DataGridColumn headerText=Top Posts dataField=*::getMostPopularPostsResponse.*::ColumnList.*::row.*::ite m/ mx:DataGridColumn headerText=Clicks dataField=getMostPopularPostsResponse.ColumnList.row.item width=75/ /mx:columns /mx:DataGrid mx:LinkButton x=48 y=264 label=Select an item and click here for full post click=navigateToURL(new URLRequest (dgTopPosts.selectedItem.postLink));/ /mx:Panel /mx:Application WS Response Doc --- ns1:getMostPopularPostsResponse xmlns:soap- env=http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/ xmlns:ns1=http://kevinobrien.composite.com/services/webservices/adob http://kevinobrien.composite.com/services/webservices/adob e/blogSvc/blogPort xmlns:xsi=http://www.w3.org/2001/XMLSchema- http://www.w3.org/2001/XMLSchema- instance ns1:ColumnList ns1:row ns1:itempostId/ns1:item /ns1:row ns1:row ns1:itemclicks/ns1:item /ns1:row ns1:row ns1:itemdateTimeAggregated/ns1:item /ns1:row ns1:row ns1:itemfeedId/ns1:item /ns1:row ns1:row ns1:itemfeedName/ns1:item /ns1:row ns1:row ns1:itempostTitle/ns1:item /ns1:row ns1:row ns1:itempostExcerpt/ns1:item /ns1:row ns1:row ns1:itempostLink/ns1:item /ns1:row /ns1:ColumnList /ns1:getMostPopularPostsResponse I tried
[flexcoders] Re: FileReference and mimetypes
I had the same problem with mime types. My solution was to use the file suffix to figure out the content type. I was using a servlet on the backend, so I just called getServletContext().getMimeType(filename). In your case, you may want to pass the mime type in a separate variable on the URL and use that to override the content type in the backend processing logic. Something like this: var vars:URLVariables = new URLVariables();vars.sessionId = manager.getSessionId();vars.contentType = overridingContentType;uploadRequest = new URLRequest();uploadRequest.url = ""http://my-upload-processor/upload">http://my-upload-processor/upload";uploadRequest.data = "">file.upload(uploadRequest); Hope that helps, Derek --- In flexcoders@yahoogroups.com, "Geoffrey Williams" [EMAIL PROTECTED] wrote: Changing the content type is not supported in uploads. This is documented in the URLRequest class. --- In flexcoders@yahoogroups.com, "pmarstonuoa" p.marston@ wrote: Hi Jeff,I'm having the same problem. According to the Flex2 documentation the content type defaults to "application/octet-stream", but you can set the contentType of the request:var request:URLRequest = new URLRequest("myURL"); request.contentType = "image/jpeg"; myFileReference.upload(request); __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___