Skip to content

webservice appfuse flex spring authentication

get this here to work:
http://appfuse.org/display/APF/Web+Services

make a flex project with flexbuilder: if you are a student get flexbuilder for free at https://freeriatools.adobe.com/flex/

now edit the mxml file like this

in flexbuilder go to DATA->imort webservices and get everything from http://127.0.0.1:8080/services/PersonService?wsdl

start the flex client and see the person object return!

for adding security do this:

cp target/tutorial-service-2.0.2/WEB-INF/security.xml src/main/webapp/WEB-INF/

in case you havent set the syntax highlighting in vim then vim ~/.vimrc with this:
syntax on
set ruler
set number

edit the security.xml file so it looks like this

comment out the init-params for the securityFilter in web.xml

now start the server again with mvn jetty:run-war

in flex open the BasePersonService.as and add the following line to the method “private function call(operation:WSDLOperat…”
after the var inv:AsyncRequest = new AsyncRequest(); is instanciated:
inv.setRemoteCredentials(“rod1″,”vertikal”);

restart the flex app and see the login dialog enter there “rod” and “vertikal”

from:

security.xml modified from: http://raibledesigns.com/rd/entry/upgrading_to_spring_security_2
i added the beans:bean tag and beans:property …
flex credentials for webservice from http://www.flexlive.net/?p=79

Categories: AppFuse, spring.

Tags: , , , , , , ,

Comment Feed

One Response

  1. Good work! Thank you very much!
    I always wanted to write in my site something like that. Can I take part of your post to my site?
    Of course, I will add backlink?

    Sincerely, Your Reader



Some HTML is OK

or, reply to this post via trackback.