Flex & Tutorials 19 Jan 2008 02:51 pm

Building SOAP Clients with Flex Builder 3

The Flex platform has always had native support for interacting with Web Services. Flex Builder 3 has taken it one step further with the introspection wizard. Using a modified version of Apache Axis framework, the new wizard generates proxy classes that takes care of Web Service data transfer and event plumbing. With this new tool, an application developer could build a Web Service enabled Flex client in minutes!

Using the Web Service Introspection Wizard

After opening a Flex project, go to File > Import or Data > Import Web Service. The wizard will ask for the WSDL and a path to save the generated code.

WSDL introspection

The Manage Web Services dialog box is useful for updating and deleting WSDL information, as well as managing multiple web services associated with a project. It could be found under Data > Manage Web Services,

manage web services

Understanding the Generated Code

Depending on the complexity of the WSDL, there could be overwhelming number of classes been generated. The actual mechanics of the generated classes is quite simple.

The first class you should look for is the <Service Name>.as file. It’s the proxy class that you would use to drive the Web Service calls. Note that we are no longer using the WebService class in Flex. All the service calls are made through <Service Name>.as.

All the Web Service members are listed in <Service Name>.as as public functions. There are two ways you could invoke a service call,

  • Attach event handler to a service call. If you came from a Java/.NET background, this is would be the most intuitive approach. After instantiating the main service class, attach an event handler to the service call and proceed to invoke the service call,
    [code lang="actionscript"]
    private var weather:USWeather = new USWeather();

    private function getMyWeather1():void
    {
    // Attach the event handler
    weather.addgetWeatherReportEventListener(handleWeather);
    // Invoke the service call
    weather.getWeatherReport("37217");
    }

    private function handleWeather(event:GetWeatherReportResultEvent):void
    {
    trace(event.result);
    }

    [/code]

  • Bind to the last result. This approach leverages the Flex data binding feature and simplifies your code. To make a service call, pass the parameters via <method>_Request_var and invoke <method>_send. The return data will be stored in <method>_lastResult.
    [code lang="actionscript"]
    [Bindable]
    private var weather:USWeather = new USWeather();

    private function getMyWeather2():void
    {
    // Set the input parameter
    var req:GetWeatherReport_request = new GetWeatherReport_request();
    req.ZipCode = "37217";
    weather.getWeatherReport_request_var = req;
    // Invoke the method
    weather.getWeatherReport_send();
    }

    [/code]

All data exchange is done via strongly typed data structures. For example, if you were making a call to getCustomer, which returns a CutomerInfo object, the object type would be define by CutomerInfoType.as class.

Some web service endpoints require basic authentication. To set the credentials, go to the base class, Base<Service Name>.as, find private function “call”. setCredentials(), setRemoteCredentials(), and logout(), are all available under the AsyncRequest object “inv”.

Conclusion

The new Web Service introspection tool has made developing SOAP clients effortless in Flex. The strongly typed message passing not only give you a water-tight communication pipe, but it also makes coding a lot easier in the IDE. The service call mechanism could be a little hairy if you are not used to working with SOAP clients. Check out the sample code attached.
Flex 3 SOAP Client Sample Code

Want to make a cool Obama poster with your own photo? Check out the Citrify Photo Editor.

57 Responses to “Building SOAP Clients with Flex Builder 3”

  1. on 26 Feb 2008 at 2:55 pm 1.Rob said …

    I’ve imported a webservice using WSDL from a secure web service.

    This web service is hosted by a third party and I do have the authentication detail in hand. I however cannot find a way of specifying the authentication credentials for this secure web service.

    The result is that I always get prompted to authenticate via the browser window whenever I initiate the web service call while running the application in a browser window.

    This is one area where I think the Flex team has dropped the ball. We need more examples of leveraging the web services introspection feature to communicate and interact with secure web services.

    Any thoughts?

    Thanks,

    Rob

  2. on 03 Mar 2008 at 12:57 am 2.Sven Dens said …

    Hey Rob,

    That’s what I struggled with too.
    The introspection works fine as long as the SOAP webservice is relatively simple and doesn’t require security. But once you need SOAP-headers it gets screwed up.

    I posted a blog entry on this, check it out at http://www.svendens.be/blog/archives/27.
    In my case I needed WS-Security for the authentication, but you could easily adapt the example to match your situation.

    Best of luck to you!

    Sven

  3. on 03 Mar 2008 at 10:34 am 3.Sphax said …

    Hi,

    I’m currently trying to call a web service from flex but I get a NullReferenceException inside the method call, cause an internal object (some “header” object) is null. I can’t figure out what’s happening.
    By the way in your sample (and so in my code) I can see nowhere the web service URL set. Shouldn’t we do something like that :

    private function getWeather(zipcode:String):void {
    var weather : USWeather = new USWeather();
    weather.wsUrl = http://www.webservicex.net/usweather.asmx; // this is what I think is missing (or I’m missing something :)

    weather.addgetWeatherReportEventListener(handleWeather);
    weather.getWeatherReport(zipcode);
    }

  4. on 06 Mar 2008 at 12:01 pm 4.Add News said …

    Calling a web service in Flex is a lot easier than developers think at first. Thanks for the direction.

  5. on 13 Mar 2008 at 12:43 pm 5.Ozkan said …

    Hi,

    We have a new product that creates a workable solution for using Web Services in Flex. You may want to check it from here: http://www.flextense.net
    It’s free also :)

    Hope you find it useful..

  6. on 20 Mar 2008 at 2:15 pm 6.Ken Rawlings » Blog Archive » Consuming a WCF service from Flex Builder 3 said …

    [...] the strongly typed client it generates, but it’s actually pretty straightforward. Check out Build SOAP Clients with Flex Builder 3 over on FlexLive.net. There’s also some good sample code in the [...]

  7. on 23 Mar 2008 at 11:17 am 7.Carl Mosca said …

    I am new to Flex Builder. I have built web services clients and services using a handful of languages. Certainly the generation of clients with FB3 is straightforward and about as intuitive as it gets. Unfortunately it’s generating code that contains errors for the web services we have written in Java and implemented using Axis 1.4. One of the issues is related to the existence of reserved word (such as “new”) in the complex data types. These same structures (classes) are not causing problems in the Java client or server implementations.

    There was at least one other compilation error in the generated code that was not related to reserved words (but I cannot recall what it was at this point). My question is, for those of you with experience with FB, is what type of priority do you sense Adobe might be giving to WS in FB? From what I can tell, WS were supported in FB2 and I would expect that it would be more mature at this point.

  8. on 04 Apr 2008 at 5:16 am 8.Cristi said …

    Hi everyone,

    I would like to add my thoughts on the web service introspection in Flex Builder, for each of the issues that were brought up here:

    1. You can pass headers to a web service call, if they are defined inside the wsdl – e.g. you cannot pass anonymous headers. I think this is the also the cause of one of the problems mentioned above – the NullReferenceException. My guess is that the web service defined headers for the operation inside the WSDL, and the typed wrapper expect the addOperationNameHeader(headers) method to be called before calling the method itself. This attaches the headers on the outgoing call.

    2. Basic authentication is not supported by the typed wrapper right now, but its rather simple to add it (to act like the default WebService component): open the Base.as class and open the call() method. Add your credentials on the inv invoker, like this:
    inv.setCredentials(username,password); or
    inv.setRemoteCredentials(…);
    where username & password should be either set as variables or hard-coded.

    3. The code compilation errors that occur when a variable matches a reserved word in AS is a bug, and the only workarounds are to either modify the wsdl or to use the Rename command in Flex Builder.

    4. WS-* is not supported at this time (including WS-Security). Add a bug on bugs.adobe.com/flex and vote for it so it will be much more visible to the team.

    As a side note, if the way an operation gets called does not work for you, but you still want to keep the strong types, you can combine the WebService.as calls with usage of the SchemaTypeRegistry, to bind a QName to a specific AS class (that got generated by the wizard).

    I hope this helps solve some of the issues that came up. Please report the issues you encounter on the bug tracker, with a sample wsdl and a sample XML response (what the service returns, captured with an HTTP proxy like Charles) because this is the safest way to make sure each problem gets considered, tested and eventually fixed. Plus, you can see the entire process (changes in the bug status, comments).

  9. on 21 Apr 2008 at 6:12 am 9.Len said …

    Thank you for the info provided here. I am developing a flex based thin client over a jboss webserver and still considering the communication technology bethween the server and the client. I have dismissed already RemoteObject because of the use of binary transport and I am still not decided between plain HttpService which would require some kind of custom java – xml transformation and the use of WS which I am afraid it’s a bit of overhead for my 10 something services. I have found this article by chance and I would be curious what is your opinion about this choice.
    Does the overhead of WS is justified by the use of a standard communication mechanism or a plain simple xml serving servlet is best?

    Thank you, Len

  10. on 08 May 2008 at 5:52 pm 10.Wendi Turner said …

    I would like to use this feature, but our webservices use SOAP 1.2, is their an upgrade available??

    Wendi
    wenditurner@gmail.com

  11. on 19 May 2008 at 5:39 pm 11.Nate said …

    Are the instructions provided here supposed to work with Apache’s Basic Auth mechanism? I’m pretty much getting the same things as #1 above. I get the auth popup in Safari and Firefox but nothing in IE. If you are not setting useProxy to true, setRemoteCredentials is ignored. If I use setCredentials I get “Authentication not supported on DirectHTTPChannel (no proxy)”. I’m up to my elbows in the generated code but I don’t see how to get this working.

  12. on 19 May 2008 at 6:07 pm 12.Nate said …

    PS. I downloaded Flextense. After cursory usage I seem to be running into the same problems.

  13. on 20 May 2008 at 12:50 pm 13.Nate said …

    I should note, finally, that I was able to get something working with flextense after updating to flash player 9.0.124.0 and adding to my crossdomain.xml file.

  14. on 22 Jun 2008 at 10:41 am 14.Marcela said …

    Thank you SO MUCH for sharing this! It saved me so much time! THANKS! :)
    Mars

  15. on 30 Jun 2008 at 12:10 pm 15.Phani said …

    Hi,

    Thank you for taking the time to write out this information.

    I have a serious issue with flex that is critical for us to decide whether to use Flex or not.

    The question is: How do I automatically generate web service proxies for a secure web service?

    I am using Flex builder 3 and the Data -> Import Web Service (WSDL) works only for unsecure web services. It is understandably unable to generate the actionscript proxies for a secure web service secured by a Basic Authentication mechanism.

    Have any of you guys faced this problem? If you solved it, could you please share the method? I’m at my wit’s end trying to solve this.

    Thank you!
    Phani

  16. on 07 Jul 2008 at 2:49 am 16.Denis said …

    Have you tried to set requestTimeOut for imported web service? I have tried to set 180 seconds but it does not work.

  17. on 09 Jul 2008 at 10:35 am 17.Phani said …

    Hey Denis,

    I am unable to even generate code using Import Web Service for a secure wsdl…so unless I can do that I can’t even try to setRequestTimeout on that.

  18. on 15 Jul 2008 at 1:04 pm 18.Brent said …

    Zee,

    Do you have any experience importing WSDL’s that import portions of there schema from other URLs?

    Specifically I need to import a WSDL generated by a WCF service. WCF services import portions of the schema from external URLs. I’m working to find a way to either:

    1) Generate a WSDL with all the schema info inline (on the WCF end of things)

    or

    2) Find a way for Flex Builder 3 to import all of the schema info, even from imported portions of the schema.

    If you have an experience/suggestions, they’d be appreciated!

    -Brent

  19. on 15 Jul 2008 at 3:54 pm 19.Nate said …

    Had to revisit the Basic Auth stuff again. Here’s the latest work around:

    In call(), instead of setting anything on inv, I set a custom header on the SOAPMessage:
    message.httpHeaders = new Object();
    message.httpHeaders['CUSTOM_AUTH_USERNAME'] = ‘username’;
    message.httpHeaders['CUSTOM_AUTH_PASSWORD'] = ‘password’;

    In my php proxy, I can get the headers via:
    $_SERVER['HTTP_CUSTOM_AUTH_USERNAME'];
    $_SERVER['HTTP_CUSTOM_AUTH_PASSWORD'];

    And send the values on to the actual server.

    It’s not perfect but it does gets around several flex annoyances related to this issue. If you’re not already going through a proxy this probably won’t help much.

  20. on 22 Jul 2008 at 8:21 am 20.Karim belbey said …

    An other solution that doesnt need any custom configuration on the server side

    // set the credentials
    if (login != null && pwd != null)
    {
    var encoder : Base64Encoder = new Base64Encoder();
    encoder.encode(login + “:” + pwd);
    var encodedCredentials : String = encoder.flush();
    if (message.httpHeaders == null)
    message.httpHeaders = {};
    message.httpHeaders["Authorization"] = “Basic ” + encodedCredentials;
    }

  21. on 28 Aug 2008 at 12:01 pm 21.Dova said …

    Thanks for the example, I am runnign into an unexpected problem. From your example I have imported the WSDL from webservicex.net. I create my service with :

    private var weather:GlobalWeather = new GlobalWeather();

    then I try:

    weather.getCitiesByCountry(“United States”);

    Flex Builder 3 says I have an error on this line, the parser says that I am trying to access an undefined property of `weather`.

    Any ideas what I have done wrong?

    full code:

  22. on 12 Sep 2008 at 6:28 am 22.Amit Thukral said …

    Hi,

    I am struggling with one question to find the answer.
    I am using Flex for front end development and will be using web services. I want to implement Web Service Security, can anybody tell if it is possible that I can use XML encryption library(available free on apache etc. sites) and integrate it with my Flex client application ?

    It will be a great help.

    Rgds,
    Amit

  23. on 22 Oct 2008 at 12:39 pm 23.Paul said …

    I am running into an issue when I try to display complex data type. The wsdl was created using Coldfusion 8. When you use a ColdFusion structure as an input or output parameter, the corresponding WSDL datatype is defined as a complex type named Map. This is necessary because the SOAP specification currently does not have an equivalent datatype for the ColdFusion structure. This complex type represents an arbitrary number of key/value pairs. The following code displays nothing when the button is clicked. Any help would greatly be appreciated.

  24. on 22 Oct 2008 at 12:42 pm 24.Paul (Code Post) said …

  25. on 10 Nov 2008 at 5:25 pm 25.Julio said …

    Hi man

    I have a couple of months that I started width flex, and I think is wonderful the SOAP protocol and the integration with flex, and how easy can be interact with the web service. But I have a little bit problem here: I’m developing a kiosk that the most part of the interaction logic is embedded inside a flash file. So, when I call the web service from flex and I try to pass the auto-generated strongly type classes (generated with the web service wizard ), like ArrayOfXMLClass than contains XMLClass objects, I have problems with the base class and some includes and imports inside this clases, because, I think, this only works width the Flex SDK, and I’m trying to consume them inside Flash.

    The question is: how can I… or can I use this types generated in flex inside flash.

  26. on 18 Nov 2008 at 2:35 am 26.amar shukla said …

    superb … very gud sample to learn web services .

    :)

    gr8 work !

  27. on 09 Dec 2008 at 5:51 am 27.webservice appfuse flex spring authentication « Snackycracky’s Techblog said …

    [...] i added the beans:bean tag and beans:property … flex credentials for webservice from http://www.flexlive.net/?p=79 Posted by nils petersohn Filed in AppFuse, spring Tags: AppFuse, basic authentication, flex, [...]

  28. on 29 Dec 2008 at 1:59 am 28.Lior Boord said …

    Great post! I’ve recently wrote a short tutorial and sample which demonstrates the benefits of integrating the Data Wizard artifacts with Cairngorm.

    http://flexonjava.blogspot.com/2008/12/integrating-cairngorm-with-fb3-data.html

  29. on 22 Jan 2009 at 8:41 pm 29.Stanley Guan said …

    Super! Based on your post, I have written this blog post: “Two Ways of Calling Web Service in Flex.”

    http://xmlandmore.blogspot.com/2009/01/two-ways-of-calling-web-service-in-flex.html

  30. on 28 Jan 2009 at 10:25 pm 30.Ed said …

    I’m trying to get the SOAP fault string from a webservice that throws a 500 error. Without luck… I’ve coded my own client with AS and MXML, tried the above example with the wizard… tried AIR tried Flex:

    Fault from the wizard code:

    Fault: [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://domain:8080/services/testService" errorID=2032]. URL: http://domain:8080/services/testService“]
    Message: faultCode:Server.Error.Request faultString:’HTTP request error’ faultDetail:’Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://domain:8080/services/testService" errorID=2032]. URL: http://domain:8080/services/testService

    Fault from my AS code:

    Fault: [RPC Fault faultString="SOAP Response cannot be decoded. Raw response: " faultCode="DecodingError" faultDetail="null"]
    Message: faultCode:DecodingError faultString:’SOAP Response cannot be decoded. Raw response: ‘ faultDetail:’null’

    The response I get from the Web Services Explorer in Eclipse:

    -
    -
    -
    codeNS:MustUnderstand
    Test Message
    TestService

    Any ideas would be most helpful… boss really mad – doesn’t understand…

    Thanks All!

  31. on 13 Feb 2009 at 8:56 am 31.Fayez said …

    Ed, After two days of going through documentation, and flex bugs, I found out that you cannot -in fact- introspect soap faults in Flex 2.0. Adobe claims that you can in Flex 3.2, but only in I.E. and using Flash 10; even then i’m still trying to get it to work for me. I’m using a CFC for my webservice, and i’m throwing an exception in there that I’m trying to correctly parse in Flex.

  32. on 24 Mar 2009 at 7:27 am 32.JonR said …

    I’ve found that the simple case works well (as is usually the case), but that if you import multiple web services into a project and the services share some common schema that the generator does not provide a way of identifying that the generated classes are in fact representations of the same types and allow the import to generate classes in the same package. This makes iterative development a real pain as the generated classes have to be manually merged after each new import. Is there a better way?

  33. on 01 Apr 2009 at 1:46 am 33.jindo said …

    I couldnot invoke any web service cause I am behind a proxy. How can I set up the code to pass the proxy and invoke WS ?

    What is the code that retrieves all of the input/output parameters and their types from any WSDL file ?

  34. on 07 Apr 2009 at 7:16 am 34.md said …

    As JonR said, one shared typed is repeatedly generated for multiple services. Each has a fully qualified name. I’ve found the Soap Decoder class incorrectly assigns namespaces when the service responses arrive close in time.
    Ultimately a shared class would solve it; however the decoder should handle this scenario. Anyone else have this problem?

  35. on 17 Apr 2009 at 12:06 pm 35.Airton said …

    Please help me not know what to do more ;-)

    http://jadlog.com.br:8088/JadlogWebService/services/PedidoBean?wsdl

    <!—->

  36. on 17 Apr 2009 at 12:12 pm 36.Airton said …

    import br.com.Consultar_request;
    import br.com.ConsultarResultEvent;
    import br.com.PedidoBeanService;
    import mx.managers.CursorManager;
    import mx.controls.Alert;

    [Bindable]
    private var consultarpedido:PedidoBeanService = new PedidoBeanService();

    private function getMyConsultar1():void
    {
    CursorManager.setBusyCursor();

    // Attach the event handler
    consultarpedido.addconsultarEventListener(handleConsultar);

    // Invoke the service call
    consultarpedido.consultar(08909022000180,”SEVENET”,”123″);

    }

    private function handleConsultar(event:ConsultarResultEvent):void
    {

    CursorManager.removeAllCursors();
    trace(event.result);
    }

    private function getMyWeather2():void
    {
    // Set the input parameter
    var req:Consultar_request = new Consultar_request();
    //req.ZipCode = “37217″;

    req.CodCliente = 08909022000180;
    req.Password = “SEVENET”;
    req.NrND = “1234567890″;

    consultarpedido.consultar_request_var = req;
    // Invoke the method
    consultarpedido.consultar_send();
    }

  37. on 18 Apr 2009 at 7:27 am 37.Tonté Pouncil said …

    High, I am having a problem of the introspection wizard not generating the right message part in the mc.rpc.wsdl.WSDLMessage. I would like to know is it possible to override the way the introspection wizard generates the [ClassName]Service.as class that extends Base[ClassName]Service.as?

    Thanks!

    Tonté

  38. on 18 Apr 2009 at 7:28 am 38.Tonté Pouncil said …

    Hi, I am having a problem of the introspection wizard not generating the right message part in the mc.rpc.wsdl.WSDLMessage. I would like to know is it possible to override the way the introspection wizard generates the [ClassName]Service.as class that extends Base[ClassName]Service.as?

    Thanks!

    Tonté

  39. on 29 May 2009 at 8:17 am 39.iulia said …

    Hello,
    I have the same problem as JonR, importing more than one web service in the same project does not properly work.
    When I import one web service, everything works properly. If I import the second web service, even the first fails. I am importing in different folders.

    Any ideas on how to solve this?

  40. on 29 May 2009 at 10:27 am 40.HalukO said …

    When I run the helloWS sample (using Flex Builder 3, SDK 3.2), no matter what zipcode I use, I get an empty (not null, just empty) response. It is as if the zipcode is not being passed correctly.

  41. on 25 Jun 2009 at 5:22 am 41.Rajat Pawar said …

    I have a strange problem to handle here.

    At one end MS Visual studio provides a utility function called as svcutil which takes WSDL file as a parameter and generates a proxy for client and a configuration file.WSDL file has the wcf services and not webservices.

    On the other hand, I am now required to call the WCF services from a flash client.Can some one help me with any proxy generator for Flash which could process the WSDL file.

    A prompt reply will be appreciated.

    -Rajat

  42. on 02 Jul 2009 at 4:20 pm 42.Clyde Farrugia said …

    hey rajat – is it me i’m missing, or you can emit WCF as soap webservices? just add a ?WSDL after your .svc url. that will solve your problems i guess.

    btw – i’m extremely new to flex, so don’t really trust my judgment :)

  43. on 14 Jul 2009 at 2:51 am 43.Rajat Pawar said …

    Hi Clyde
    Thanks for your suggestion but i have found a complete solution to that problem and would like to share it here.

    The problem was:
    “Can some one help me with any proxy generator for Flash which could process the WSDL file.”
    Solution:
    There is an add on in FLash 8.0 called as webservice connector which is able to decode the WSDL file for the webservices easily and provide the methods exposed with the parameters to be sent as input to the webservice.
    however since my problem was to decode a WSDL file for the WCF services,i had to create a consolidated merged WSDL file which could be read by the webservice connector component.The follwing blog helped me in that: : http://www.arquitecturadesoftware.org/blogs/antoniocruz/archive/2007/02/06/wsdl-merger.aspx.
    The blog is in portuguese so u may have to take the help of google translator.
    Happy coding.

  44. on 17 Jul 2009 at 3:18 pm 44.Scott said …

    Hi Clyde,

    Do you know how to get to the SOAP XML response directly in ActionScript? Because the WSDL generated ActionScript code is not unmarshalling all the data returned from server. I can write my own if I new how to get to the XML response.

    Scott

  45. on 20 Jul 2009 at 9:33 pm 45.David said …

    I have used the “Import Web Service Wizard” to access a currency converter and have got it working successfully locally but when I load it onto my server I get the security error. I have read about using a php proxy script to get around this problem but was wondering id anyone could show how to use it when using the import wizard. My code is as follows but I can’t figure out where to refernce my php script

  46. on 08 Aug 2009 at 11:11 pm 46.Neha said …

    I have installed adobe flex builder 3 almost thrice, but it always gives me an error=3 when i run the event manager. the error is:

    CreateProcess: “C:\Program Files\Safari\Safari.exe” “C:\Documents and Settings\user\My Documents\Flex Builder 3\EventManager\bin-debug\EventManager.html” error=3

    how do i resolve this problem. Please reply soon.

  47. on 10 Aug 2009 at 9:33 am 47.mace said …

    Thanks for posting this.

  48. on 24 Aug 2009 at 2:58 am 48.Sanoran Triamesh said …

    ‘Watertight’ is not a word I would use!

    The generated code does not seem to have the ‘glue’ code required to convert a response to the ‘type’ specified in a ‘complextype’ although it generates a class. Not sure if creating a class with a couple of fields is a big help, unless someone is new to Object oriented programming.

    I tried a simple example with sequence of type X (string, int string). It turns out the ‘result’ is returned as ‘Object’ which turns out to be an array, which turns out to contain ‘Object’s which turn out to be associative maps!

    The following code actually works!
    o:Object =event.result;
    var someValu:Stringe =o["someKey"];
    trace(someValue);

    and ‘o’ is still an Object, it cannot be cast into a Map or anything else for that matter.

    Not sure if Adobe has documented all this in its API docs for ‘Object’.

    But given such liberties taken by Adobe in using the English language to describe its classes, maybe the generated code is indeed watertight :)

  49. on 27 Aug 2009 at 9:48 am 49.Jesse said …

    Hey Guys. I am at the end of my rope with this. I have a C# 3.5 web service, and a Flex 3.0 application. It keeps throwing:

    Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost/ProjectTaskManagement/ProjectTaskManagementWS.asmx"]. URL: http://localhost/ProjectTaskManagement/ProjectTaskManagementWS.asmx

    when I try to access the webservice. I added the webservice using the auto generator to the project, have tried crossdomain files(even though it is in the same directory as my Flex app), and the web service works properly.

    In essence, I am getting and setting project objects that have lists underneath of them of tasks. The task is a complex object and so is the project.

    Is there any tags I need to add to the web service, any extra code I need to add to make it work, etc.? Any help would be appreciated. Thanks.

    Jesse

  50. on 06 Oct 2009 at 6:02 am 50.XML to VO – as easy as apple pie!? (demo included) - aron / philipp development blog said …

    [...] currently working with SOAP web services. While making adjustments to the classes of the wsdl Flex Builder class generator I discovered, that there is an easy way to decode / parse XML to VOs (value objects). The [...]

  51. on 14 Oct 2009 at 11:59 am 51.Flex, SOAP, Web Services « Techie Note said …

    [...] http://www.flexlive.net/?p=79 [...]

  52. on 21 Oct 2009 at 11:53 am 52.nivo said …

    hi I am new to adobe air… i was trying to use the webservice and stuck how to proceed.
    in java code example given it does…

    BaseXYZServce bxyz= new BaseXYZServce();
    XYZServce xyz = bxyz.getXYZServce(new URL(“http://…”));

    I dont know if this is necessary to do…

    next this service use authentication… i was trying
    to use xyz.getWebservice.setCredential(usrName,Pass,charset);
    Actually idont know hat the charset is what value should i give??? wen i tried null for charset it gave error..
    please help

  53. on 21 Oct 2009 at 11:33 pm 53.Uzair Shahid said …

    Can anyone tell me if SOAP 1.2 is supported with Flex builder web service tool?

  54. on 30 Oct 2009 at 2:59 pm 54.Josh said …

    Hello,

    After fighting for days trying to get flex to call a php proxy to relay wsdl info because of security issues (no cross domain on remote server), I finally talked the company into putting me on their crossdomain file. So, I’m thinking good, but I was wrong. I still get a security violation….

    FaultEvent fault=[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTPS"] messageId=null type=”fault” bubbles=true cancelable=true eventPhase=2

    What is up with that. I thought that the cross-domain file would handle that. Here is the cross domain file

    I am at https://www.shipnotic.com and am accessing a wsdl at https:// at well.

    anybody know why this is still happening with crossdomain support?

    Thns,

  55. on 28 Nov 2009 at 9:55 pm 55.saan said …

    I have installed adobe flex builder 3 almost thrice, but it always gives me an error=3 when i run the event manager. the error is:

    CreateProcess: “C:\Program Files\Opera\Opera.exe” “C:\Documents and Settings\user\My Documents\Flex Builder 3\EventManager\bin-debug\EventManager.html” error=2

    how do i resolve this problem. Please reply soon.

  56. on 26 Jan 2010 at 6:11 am 56.alessio said …

    I had the same problem, I solved in this way.
    Change the default web browser:
    Open Windows > Preferences dialog and select General > Web Browser.
    Select a browser that you have installed.

  57. on 02 Feb 2010 at 5:24 am 57.krunal said …

    i have configured my web service using wizard given by flex builder.

    I am not able to get the fault error when my connection is lost or any error at the time of retrieval of data.

    how can we validate that configured web service connection.

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply