Flash Builder SOAP service generation quirks?

Is there some documentation on the generated value object classes?  I noticed a couple things today while trying to debug the generated value objects/service:
When a value object contains only a single property, it does not generate the value object.  Ie, if class named "serviceClass" has a property named "serviceProperty" of type ServiceProperty, and ServiceProperty is a class with just a String.  The generated "ServiceClass" value object will have a serviceProperty of type String.
When the service returns a single value object, flex returns with ObjectProxy rather than the specified strong type.  When there's more than one, it returns with ArrayCollection with strong typed elements.
I'm wondering if there's something stupid I'm doing?
Thanks in advance

Is there some documentation on the generated value object classes?  I noticed a couple things today while trying to debug the generated value objects/service:
When a value object contains only a single property, it does not generate the value object.  Ie, if class named "serviceClass" has a property named "serviceProperty" of type ServiceProperty, and ServiceProperty is a class with just a String.  The generated "ServiceClass" value object will have a serviceProperty of type String.
When the service returns a single value object, flex returns with ObjectProxy rather than the specified strong type.  When there's more than one, it returns with ArrayCollection with strong typed elements.
I'm wondering if there's something stupid I'm doing?
Thanks in advance

Similar Messages

  • Flash Builder autogenerated service code explanation

    Hi
    When you connect to some backend via the Flash Builder "service inspector", it autogenerates alot of code, which seems to be giving you some additionel intellisense. I'm very interested in some documents that describe whats actually being autogenerated and for what reasons. Because when you don't use the service helper, you can connect to a backend in like 2-3 lines of code.
    Best Regards
    Martin Andersen

    Generally, the more specific you can be in programming the more efficient and less error prone the code is. The downside is that explicit declarations require much more typing.
    The auto generator attempts to generate code that is as specific as possible, and provides you some strongly typed methods to wrap the calls in. The VO objects probably look the most strange, but I think a lot of that is just explicit binding declarations. There is also some functionality added for advanced server setups (like lazy loading and such).

  • SSL Error while Consuming Java build SOAP services using Dotnet Console App

    Hi, I want to consume a SOAP service developed in JAVA. I don't have any control on Service side. I have to just consume the SOAP service using my client Application which is in DotNet Console Application using C#. Here is the detail about the service:
    1. The service has SSL configured.
    2. End point looks like: https://xyz.com:443
    3. I am able to connect the service using SOAP UI Tool by configuring the Tool with the certs given by Java developer.
    4. Basically there are two certs used, one for "client authentication" purpose and the second cert is for "WS security" purpose.
    5. When i add the WSDL to my client app as a service Reference, the generated App.config file looks as shown below:
    <configuration>
    system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="Hello_HTTPBinding">
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="http://localhost:8080/" binding="basicHttpBinding"
    bindingConfiguration="Hello_HTTPBinding"
    contract="Proxy_Hello" name="Hello_HTTPPort" />
    </client>
    </system.serviceModel>
    </configuration>
    6. Basically I need to pass two certs, one cert used for "client authentication" purpose and the second cert is used for "WS security purpose".
    7. I have changed the above client configuration as below marked in RED color text:
    <configuration>
    system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="Hello_HTTPBinding">
    <security mode="TransportWithMessageCredential" >
    <transport clientCredentialType="Certificate" proxyCredentialType="Basic" realm="" />
    <message clientCredentialType="Certificate" algorithmSuite="Basic128" />
    </security>
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="https://xyz.com:443"
    binding="basicHttpBinding"
    bindingConfiguration="Hello_HTTPBinding"
    contract="Proxy_Hello" name="Hello_HTTPPort" behaviorConfiguration="NewBehavior"/>
    </client>
    <behaviors>
    <endpointBehaviors>
    <behavior name="NewBehavior">
    <clientCredentials >
    <clientCertificate findValue="clientxyz.com" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName" />
    <serviceCertificate>
    <defaultCertificate findValue="helloabc.com" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName"/>
    </serviceCertificate>
    </clientCredentials>
    </behavior>
    </endpointBehaviors>
    </behaviors>
    </system.serviceModel>
    </configuration>
    8. I am assuming the cert required for WS security  will be passed using in<serviceCertificate> element, but not fully sure....correct me if I am wrong.
    9. By creating proxy object of the service when I am trying to call the required method I am getting this Error: "Could not establish
    secure channel for SSL/TLS with authority "******xyz.com."
    10. Its working perfect in SOAP UI Tool, generating the Raw XML as shown below in ORANGE color Text:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:gw-headers-100" xmlns:urn1="urn:gw-util-100">
    <soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
    wsu:Id="X509-35309F239B754D9BA414230227616161">
    aaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbccccccccccccccccccccc********dddddddddddd*****eeeeeeeeee
    </wsse:BinarySecurityToken>
    <ds:Signature Id="SIG-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ds:SignedInfo>
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
    <ec:InclusiveNamespaces PrefixList="soapenv urn urn1" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </ds:CanonicalizationMethod>
    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    <ds:Reference URI="#id-1">
    <ds:Transforms>
    <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
    <ec:InclusiveNamespaces PrefixList="urn urn1" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </ds:Transform>
    </ds:Transforms>
    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <ds:DigestValue>
    abcabcabcabc******gggggg
    </ds:DigestValue>
    </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>gggggg888******8sdsdsdss</ds:SignatureValue>
    <ds:KeyInfo Id="KI-38488AAAA222">
    <wsse:SecurityTokenReference wsu:Id="STR-ggggjj57557575">
    <wsse:Reference URI="#X509-74747477" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
    </wsse:SecurityTokenReference>
    </ds:KeyInfo>
    </ds:Signature>
    </wsse:Security>
    </soapenv:Header>
    <soapenv:Body wsu:Id="id-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <urn1:xxxxxxx>
    </urn1:xxxxxx>
    </soapenv:Body>
    </soapenv:Envelope>
    11. Using Dotnet Tracing I am able to see the Request XML generated from the console Application as shown below in BLUE color text: But getting the SSL error as: Could not establish secure channel
    for SSL/TLS with authority "******xyz.com.
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
    <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <u:Timestamp u:Id="_0" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <u:Created>2015-02-04T04:19:29.825Z</u:Created>
    <u:Expires>2015-02-04T04:24:29.825Z</u:Expires>
    </u:Timestamp>
    <o:BinarySecurityToken>
    <!-- Removed-->
    </o:BinarySecurityToken>
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
    <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
    <Reference URI="#_0">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
    <DigestValue>aaaaaa****dddddd=</DigestValue>
    </Reference>
    </SignedInfo>
    <SignatureValue>ssssddddd888fffff****=</SignatureValue>
    <KeyInfo>
    <o:SecurityTokenReference>
    <o:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-93e09c54-aee8-4f45-a8a4-d63d8a2d63fb-1"></o:Reference>
    </o:SecurityTokenReference>
    </KeyInfo>
    </Signature>
    </o:Security>
    </s:Header>
    </s:Envelope>
    12. I want to Generate the Request XML from my Dotnet console Application simiar to the SOAP UI generated XML(refer #10).. Also want to get rid of SSL error....Appreciate your Suggestion..

    Hi tksdotnet,
    This forum is used to discuss the questions about the WCF web service, for java web services questions, it will be better to post in this forum:
    #WCF, ASMX and other Web Services:
    http://forums.asp.net/28.aspx/1?WCF+ASMX+and+other+Web+Services .
    Thanks for your understanding.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Flash Builder 4.5 Data Services Wizard, setting up REST service call returns Internal Error Occurred

    Dear all -
    I am writing with the confidence that someone will be able to assist me.
    I am using the Flash Builder Data Services Wizard to access a Server that utilizes REST type calls and returns JSON objects. The server is a JETTY server and it apparantly already works and is returning JSON objects (see below for example). It is both HTTP and HTTPS enabled, and right now it has a cross-domain policy file that is wide open (insecure but its not a production server, it's internal).
    The crossdomain file looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
       <allow-http-request-headers-from domain="*" headers="*" secure="false"   />
       <allow-access-from domain="*" to-ports="*" secure="false"/>
       <site-control permitted-cross-domain-policies="master-only" />
    </cross-domain-policy>
    The crossdomain file is in the jetty server's root directory and is browseable via HTTP and HTTPS (i.e. browsing to it returns the xml)
    Now before all of you say that using wizards sucks (generally) I thought I would utilize the FB Data Services Wizard as at least it would provide a template for which I could build additional code against, or replace and improve the code it produces.
    With that in mind, I browse to the URL of the Jetty Server with any web browser (for example, Google Chrome, Firefox or IE) with a URL like this (the URL is a little confidential at the moment, but the structure is the same)
    https://localhost:somePort/someKey/someUser/somePassword/someTask
    *somePort is the SSL port like 8443
    *someKey is a key to access the URL's set of services
    returns a JSON object as a string in the web browser and it appears like the following:
    {"result":success,"value":"whatEverTheValueShould"}
    Looks like the JSON string/object is valid.
    I went through the Flash Builder Data Services Wizard to set up HTTP access to this server. The information that I filled in is described below:
    Do you want to use a Base URL as a prefix for all operation URLs?
    YES
    Base URL:
    https://localhost:8443/someKey/
    Name                    : someTask
    Method                    : POST
    Content-Type: application/x-www-form-urlencoded
    URL                              : {someUser}/{somePassword}/someTask
    Service Name: SampleRestapi
    Services Package: services.SampleRestapi
    datatype objects: valueObjects:
    Completing the wizard, I run the Test Operation command. Remember, no authentication is needed to get a JSON string.
    It returns:
    InvocationTargetException: Unable to connect to the URL specified
    I am thinking - okay, but the URL IS browseable (as I originally was able to browse to it, as noted above).
    I continue to test the service by creating a Flex application that accepts a username and password in a form. when the form is submitted, the call to the service is invoked and an event handler returns the result. The code is below (with some minor changes to mask the actual source).
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     xmlns:SampleRestapi="services.SampleRestapi.*"
                                     minWidth="955" minHeight="600">
              <fx:Script>
                        <![CDATA[
                                  import mx.controls.Alert;
                                  import mx.rpc.events.ResultEvent;
                                  protected function button_clickHandler(event:MouseEvent):void
                                            isUserValidResult.token = SampleRestAPI.isUserValid(userNameTextInput.text,passwordTextInput.text);
                                  protected function SampleRestAPI_resultHandler(event:ResultEvent):void
                                            // TODO Auto-generated method stub
                                            // print out the results
                                            txtAreaResults.text = event.result.message as String;
                                            // txtAreaResults.appendText( "headers \n" + event.headers.toString() );
                        ]]>
              </fx:Script>
              <fx:Declarations>
                        <SampleRestapi:SampleRestAPI id="SampleRestAPI"
                                                                                                 fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
                                                                                                 result="SampleRestAPI_resultHandler(event)"
                                                                                                 showBusyCursor="true"/>
                        <s:CallResponder id="isUserValidResult"/>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
              <s:Form defaultButton="{button}">
                        <s:FormItem label="UserName">
                                  <s:TextInput id="userNameTextInput" text="q"/>
                        </s:FormItem>
                        <s:FormItem label="Password">
                                  <s:TextInput id="passwordTextInput" text="q"/>
                        </s:FormItem>
                        <s:Button id="button" label="IsUserValid" click="button_clickHandler(event)"/>
                        <s:FormItem  label="results:">
                                  <s:TextArea id="txtAreaResults"/>
                        </s:FormItem>
              </s:Form>
    </s:Application>
    It's a simple application to be sure. When I run it , I get the following returned in the text area field txtAreaResults:
    An Internal Error Occured.
    Which is equivalent to the following JSON string being returned:
    {"success":false,"value":"An Internal Error Occured"}
    It appears that the call is being made, and that a JSON object is being returned... however it does not return the expected results?
    Again the URL constructed is the same:
    https://www.somedomain.com:somePort/someKey/someUser/somePassword/someTask
    So I am wondering what the issue could be:
    1) is it the fact that I am browsing the test application from an insecure (http://) web page containing the Flex application and it is accessing a service through https:// ?
    2) is the JSON string structurally correct? (it appears so).
    3) There is a certificate enabled for HTTPs. it does not match the test site I am using ( the cert is for www.somedomain.com but I am using localhost for testing). Would that be an issue? Google Chrome and IE just asks me to proceed anyway, which I say "yes".
    Any help or assistance on this would be appreciated.
    thanks
    Edward

    Hello everyone -
    Since I last posted an interesting update happened. I tested my  Flex application again, it is calling a Jetty Server that returns a JSON object, in different BROWSERS.  I disabled HTTPS for now, and the crossdomain.xml policy file is wide open for testing (ie. allowing every request to return data). So the app accessing the data using HTTP only. Browsers  -  IE, Opera, Firefox and Chrome. Each browser contained the SAME application, revision of the Flash Player (10.3.183.10 debugger for firefox, chrome, opera, safari PC; 11.0.1.129 consumer version in IE9,) take a look at the screen shot (safari not shown although the result was the same as IE and chrome)
    Note that Opera and Firefox returned successful values (i.e. successful JSON objects) using the same code generated from the Data Services Wizard. Chrome, IE and, Safari failed with an Internal error. So I am left wondering - WHY? Is it something with the Flash Player? the Browsers?  the Flex SDK? Any thoughts are appreciated. Again, the code is found in the original thread above.

  • Flex Application Only Compiles in Flash Builder

    Hello,
        I am a newbie trying to become familiar with Flex.  I am starting by building and running some sample applications.  For some reason, the applications will execute inside of FlashBuilder, but I am getting a compile error when I compile them on my linux box. The I used the Flash Builder remote services finder to generate the code for the remote service.  The class that produces the error was generated by Flash Builder.  I have appended the class at the bottom of this post.  Any suggestions?  Thanks in advance.
    --Marco
    [mjmatch@mjmatch-linux flexsphi]$ ant
    Buildfile: build.xml
    compile-flex:
        [mxmlc] Loading configuration file /opt/tools/flex-sdk/4.1/frameworks/flex-config.xml
        [mxmlc] /opt/tools/blazeds/4.0.0/tomcat/webapps/flexsphi/src/client/services/_Super_Foo.as(20): col: 68 Error: The definition of base class RemoteObjectServiceWrapper was not found.
        [mxmlc] internal class _Super_Foo extends com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper
        [mxmlc]                                                                    ^
    BUILD FAILED
    /opt/tools/blazeds/4.0.0/tomcat/webapps/flexsphi/build.xml:16: mxmlc task failed
    Environment
    =========
    Flex SDK 4.1
    Flash Builder 4
    ant compile tasks
    ============
        <property name="FLEX_HOME" value="/opt/tools/flex-sdk/4.1"/>
        <property name="DEPLOY_DIR" value="/opt/tools/blazeds/4.0.0/tomcat/webapps/flexsphi"/>
        <property name="CONTEXT_ROOT" value="flexsphi"/>
        <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"  />
        <target name="compile-flex">
            <mxmlc file="src/client/Main.mxml"
                    services="${DEPLOY_DIR}/WEB-INF/flex/services-config.xml"
                    context-root="${CONTEXT_ROOT}"
                    output="${DEPLOY_DIR}/flexsphi.swf"/>
        </target>
    _Super_Foo
    =========
    * This is a generated class and is not intended for modification.  To customize behavior
    * of this service wrapper you may modify the generated sub-class of this class - Foo.as.
    package services
    import com.adobe.fiber.core.model_internal;
    import com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper;
    import com.adobe.serializers.utility.TypeUtility;
    import mx.rpc.AbstractOperation;
    import mx.rpc.AsyncToken;
    import mx.rpc.remoting.Operation;
    import mx.rpc.remoting.RemoteObject;
    import valueObjects.Bar;
    import mx.collections.ItemResponder;
    import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
    [ExcludeClass]
    internal class _Super_Foo extends com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper
        // Constructor
        public function _Super_Foo()
            // initialize service control
            _serviceControl = new mx.rpc.remoting.RemoteObject();
            // initialize RemoteClass alias for all entities returned by functions of this service
            valueObjects.Bar._initRemoteClassAlias();
            var operations:Object = new Object();
            var operation:mx.rpc.remoting.Operation;
            operation = new mx.rpc.remoting.Operation(null, "getBars");
             operation.resultElementType = valueObjects.Bar;
            operations["getBars"] = operation;
            operation = new mx.rpc.remoting.Operation(null, "addBar");
            operations["addBar"] = operation;
            _serviceControl.operations = operations;
            _serviceControl.convertResultHandler = com.adobe.serializers.utility.TypeUtility.convertResultHandler;
            destination = "foo";
             model_internal::initialize();
          * This method is a generated wrapper used to call the 'getBars' operation. It returns an mx.rpc.AsyncToken whose
          * result property will be populated with the result of the operation when the server response is received.
          * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
          * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
          * @see mx.rpc.AsyncToken
          * @see mx.rpc.CallResponder
          * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
        public function getBars() : mx.rpc.AsyncToken
            var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getBars");
            var _internal_token:mx.rpc.AsyncToken = _internal_operation.send() ;
            return _internal_token;
          * This method is a generated wrapper used to call the 'addBar' operation. It returns an mx.rpc.AsyncToken whose
          * result property will be populated with the result of the operation when the server response is received.
          * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
          * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
          * @see mx.rpc.AsyncToken
          * @see mx.rpc.CallResponder
          * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
        public function addBar(arg0:String) : mx.rpc.AsyncToken
            var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("addBar");
            var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(arg0) ;
            return _internal_token;

    The SWC files are within the resource directory of LCDS.
    For example:
    C:\lcds31\resources\lcds_swcs\FlexSDK4\frameworks\locale\en_US
    fiber_rb.swc
    C:\lcds31\resources\lcds_swcs\FlexSDK4\frameworks\libs
    fiber.swc and fds.swc
    You can use the following within ANT.
    <!-- Get default compiler options. -->
              <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                <!-- List of path elements that form the roots of ActionScript
                class hierarchies. -->
                <source-path path-element="${FLEX_HOME}/frameworks"/>
              <!-- List of SWC files or directories that contain SWC files. -->
                <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs" />
                    <include name="../bundles/{locale}" />
                </compiler.library-path>

  • Flash Builder 4.5 SOAP call for images using Base64 Encoding

    I am trying to load some image meta data in a flash builder mobile application by making a SOAP call to .Net service. I am able to test the web service successfully using a .Net console application. However when I make the call from flash builder mobile client I get a null result. What am I doing wrong? I am using SOAP 1.1 ByteArray didn't work for Flash builder. So converted the ByteArray to Base64 format and tried to obtain result that way. Both ways worked from a .Net Client but not working from Flash mobile.
    Here is the code
    <fx:Script>
            <![CDATA[          
                import mx.graphics.ImageSnapshot;
                import mx.graphics.codec.JPEGEncoder;
                import mx.graphics.codec.PNGEncoder;
                import mx.rpc.AsyncToken;
                import mx.utils.Base64Encoder;         
                import services.exifimagemetadata1.ExifImageMetaData1;         
                import spark.components.Image;     
                public var metaData:ExifImageMetaData1 = new ExifImageMetaData1();         
                public var imageBytes:ByteArray = new ByteArray();
                public var gpsData:String;
        private function getBase64EncodedImage():String
                    var myEncoder:Base64Encoder = new Base64Encoder();
                    myEncoder.encodeBytes(getImageBytes());            
                    var image64BitText:String = myEncoder.toString();                          
                    return image64BitText;
        public function GetMetaDataFromExif():void{
                    var imageToken:AsyncToken = metaData.GetExifBase64Data(getBase64EncodedImage());               
                    gpsData = imageToken.result.toString();
                    metaResult.text = gpsData;
        protected function GetImageMetaDataFromExif(event:MouseEvent):void
                    GetMetaDataFromExif();         
            ]]>
        </fx:Script>
    <s:layout>
            <s:VerticalLayout>         
            </s:VerticalLayout>
        </s:layout>
        <s:HGroup>
            <s:Image id="test" width="130" height="140" source="@Embed(source='assets/p1000106.jpg')"/>
        </s:HGroup>
        <s:HGroup>
        <s:Label width="100" height="140" backgroundColor="Blue" click="GetImageMetaDataFromExif(event)">
            <s:text/>
        </s:Label>
        </s:HGroup>
        <s:HGroup>
            <s:Label id="metaResult" width="200" height="140" backgroundColor="yellow"/>           
        </s:HGroup>

    Hello everyone -
    Since I last posted an interesting update happened. I tested my  Flex application again, it is calling a Jetty Server that returns a JSON object, in different BROWSERS.  I disabled HTTPS for now, and the crossdomain.xml policy file is wide open for testing (ie. allowing every request to return data). So the app accessing the data using HTTP only. Browsers  -  IE, Opera, Firefox and Chrome. Each browser contained the SAME application, revision of the Flash Player (10.3.183.10 debugger for firefox, chrome, opera, safari PC; 11.0.1.129 consumer version in IE9,) take a look at the screen shot (safari not shown although the result was the same as IE and chrome)
    Note that Opera and Firefox returned successful values (i.e. successful JSON objects) using the same code generated from the Data Services Wizard. Chrome, IE and, Safari failed with an Internal error. So I am left wondering - WHY? Is it something with the Flash Player? the Browsers?  the Flex SDK? Any thoughts are appreciated. Again, the code is found in the original thread above.

  • Flash builder 4 - web services error

    good day,
         I'm trying out flash builder 4 beta connect to a simple web service I've created (gsoap calc example).  using the connect data/service
    tab, I choose the web service and enter the service name and wsdl location (on localhost).  fb4 retrieves the wsdl and shows all the methods
    available but when I click finish I get a terse unresolved model error message any suggestions thanks in advance.  The web service is runs
    on the local host so I don't think its a cross domain issue

    sigh, sorry for the problems:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="calc"
    targetNamespace="http://doune.llnl.gov/cgi-bin/calcserver"
    xmlns:tns="http://doune.llnl.gov/cgi-bin/calcserver"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns="urn:calc"
    xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
    xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <schema targetNamespace="urn:calc"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:ns="urn:calc"
      xmlns="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="unqualified"
      attributeFormDefault="unqualified">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
    </schema>
    </types>
    <message name="addRequest">
    <part name="a" type="xsd:double"/>
    <part name="b" type="xsd:double"/>
    </message>
    <message name="addResponse">
    <part name="result" type="xsd:double"/>
    </message>
    <message name="subRequest">
    <part name="a" type="xsd:double"/>
    <part name="b" type="xsd:double"/>
    </message>
    <message name="subResponse">
    <part name="result" type="xsd:double"/>
    </message>
    <message name="mulRequest">
    <part name="a" type="xsd:double"/>
    <part name="b" type="xsd:double"/>
    </message>
    <message name="mulResponse">
    <part name="result" type="xsd:double"/>
    </message>
    <message name="divRequest">
    <part name="a" type="xsd:double"/>
    <part name="b" type="xsd:double"/>
    </message>
    <message name="divResponse">
    <part name="result" type="xsd:double"/>
    </message>
    <message name="powRequest">
    <part name="a" type="xsd:double"/>
    <part name="b" type="xsd:double"/>
    </message>
    <message name="powResponse">
    <part name="result" type="xsd:double"/>
    </message>
    <portType name="calcPortType">
    <operation name="add">
      <documentation>Sums two values</documentation>
      <input message="tns:addRequest"/>
      <output message="tns:addResponse"/>
    </operation>
    <operation name="sub">
      <documentation>Subtracts two values</documentation>
      <input message="tns:subRequest"/>
      <output message="tns:subResponse"/>
    </operation>
    <operation name="mul">
      <documentation>Multiplies two values</documentation>
      <input message="tns:mulRequest"/>
      <output message="tns:mulResponse"/>
    </operation>
    <operation name="div">
      <documentation>Divides two values</documentation>
      <input message="tns:divRequest"/>
      <output message="tns:divResponse"/>
    </operation>
    <operation name="pow">
      <documentation>Raises a to b</documentation>
      <input message="tns:powRequest"/>
      <output message="tns:powResponse"/>
    </operation>
    </portType>
    <binding name="calc" type="tns:calcPortType">
    <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="add">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    <operation name="sub">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    <operation name="mul">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    <operation name="div">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    <operation name="pow">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
         <SOAP:body use="encoded" namespace="urn:calc" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    </binding>
    <service name="calc">
    <documentation>Simple calculator service</documentation>
    <port name="calc" binding="tns:calc">
      <SOAP:address location="http://doune.llnl.gov/cgi-bin/calcserver"/>
    </port>
    </service>
    </definitions>

  • Are Flash Builder 4 data services production grade, or demo grade?

    I've experimented a bit with the data services feature that Flash builder 4 beta 2 offers. Frankly they seem to be just about what I was waiting for. We build a lot of data centric applications and anything that reduces the amount of code required to wire things up is great. I do have some questions re the data services as implmented in beta 2, and forward. Note I've almost no hands on with Flex, any version, at this point.
    With Flex Builder 3, there was a crud wizard. From what I read the code it generated was not considered production grade. I hope that the data services feature shown with beta 2 would be considered robust enough to use in production? I am sure that there are many different ways of handling data services in general with Flex, so I am not asking if it's the best approach or makes any other approach redundant. I just mean, could the tooling around the data services feature of flash builder 4 remain a viable approach for getting at data, once a flex developer was past the training wheels stage?
    Another aspect I'm curious about is whether the data services features of Flash Builder 4 would remain relevant if one was using some other data access system? I can't really phrase this question properly because I don't really understand Flex or the various data access technologies that everyone is using. Hopefully the quesiton makes sense...if one was NOT using the data services wizard or whatever it's called, would whatever data services one was using show in the data services area of builder? It would be cool of course if they did.

    Hi,
       When it comes to runtime performance of the applications created using Data Centric Development ( DCD ) wizards, they perform same as the ones created without using DCD.
       Even the code generated by these wizards are easy to read & maintain with proper inheritance, packages & overriding. But, if you are planning to use any of the MVC style frameworks, the generated code may not fit so well right now. We are already working on improving the experience for people who are using these frameworks.
       Overall, using DCD gives a lot of productivity gain with its unified wizards & advanced UI Authoring workflows including Automatic Form Generation, Charts, Master-Detail views, Paging, Client Side Data Management etc.
      Please let us know if you have any specific concerns in the generated code.
    Regards
    Srinivas Annam
    http://srinivasannam.wordpress.com

  • Flash Builder 4, Data Services, PHP issue

    I have installed a fresh Galileo + Fb4 plugin + WST for eclipse on my dev server/workstation.
    I have installed a standalone Fb4 on my laptop.
    When I use the shwanky new Data services feature and create a PHP service... I can create the service fine... but there are no methods showing up for the data service/class. The class shows up in the Data/Services list -- and when I right-click -> Refresh (other options are greyed out) I get the following alert Error message:
    java.lang.IllegalArgumentException: protocol = http host = null
    I click OK and procede in my ignorance to scour the internet for a solution...
    I feel like a teenager who was given a brand new Corvette (Fb4)... only.... the key doesn't seem to fit the ignition.  I CANT WAIT to drive it!
    On a side note.... my laptop works fine? Go figure. I can right click and get all the goodies (Configure Return Type, etc.) that I'm suppose to get on that installation...
    I would like to get this working on my dev workstation. Is it something to do with Fb4 as a plugin on top of Zend PDT?
    Does anyone know where to look (maybe a config file or setting) that sets the value for this:
    java.lang.IllegalArgumentException: protocol = http host = null
    I know that I had to edit my shortcut and add:  -vm "C:\Program Files\Java\jre6\bin\javaw" to get the java vm to work correctly and launch Gallileo

    I don't know where else to post  this question ...so apologies if this is not the proper spot
    I have created several classes in Flash 4 Professional and would like to know how do I create custom classes in Flash Builder 4
    this is one such class that i have created and wnat to use in FB 4..below
    package classes.choppingblock.video{
         import flash.events.*;
         import flash.display.*;
         import classes.*;
         public class YouTubeLoaderPlus extends YouTubeLoader {
              public static var PLAYER_READY:String = "playerReady";
              public static var VIDEO_READY:String = "videoReady";
              protected var _count:Number = 0;
              function YouTubeLoaderPlus() {
                   super();
                   this.addEventListener(Event.ENTER_FRAME, checkPlayerReady);
                   this.addEventListener(YouTubeLoaderPlus.PLAYER_READY, ytPlayerReady);
                   this.addEventListener(YouTubeLoaderPlus.VIDEO_READY, ytVideoReady);
              private function ytPlayerReady(e:Event) {
                   this.setSize(450, 370);
              private function ytVideoReady(e:Event) {
                   this.pause();           
              private function checkPlayerReady(e:Event) {
                   _count++;
                   if(_count >= 50){
                        this.removeEventListener(Event.ENTER_FRAME, checkPlayerReady);
                        dispatchEvent(new Event(YouTubeLoaderPlus.PLAYER_READY));
              private function checkVideoReady(e:Event) {
                   if(this.getDuration()){
                        this.removeEventListener(Event.ENTER_FRAME, checkVideoReady);
                        dispatchEvent(new Event(YouTubeLoaderPlus.VIDEO_READY));
              override public function loadVideoById (id:String, startSeconds:Number = 0):void{
                   super.loadVideoById(id, startSeconds);
                   this.addEventListener(Event.ENTER_FRAME, checkVideoReady);
    Where would i develop an analogy of this code in Flash Builder 4 for custom classes?

  • How to give Service locator in flash builder 4.5

    hi friends,
    In flex 3.0 we are giving service locator like this
    <?xml version="1.0" encoding="utf-8"?>
    <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:cairngorm="com.adobe.cairngorm.business.*">
    </cairngorm:ServiceLocator>
    How to give in flash builder 4.5 i tried in same way it is not recognizing ServiceLocator.
    How to do in 4.5

    Ya i tried by keeping <fx:Declarations> part but still it is throwing error,
    In flex3 we are making a component ex: <mx:canvas> and changeing that component to
    <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:cairngorm="com.adobe.cairngorm.business.*">
    </cairngorm:ServiceLocator>
    if any one used 4.5 with cairngorm let me know
    thanks

  • Using SSL in flash builder 4 data service with PHP

    I am converting a program I wrote with Flex 3 into Flash builder 4, and I wanted to try to use the built-in data services instead of using the httpservice as I was doing before. The one thing I cannot figure out is how to make it use a secure connection (https) when connecting to that data service. I have looked everywhere I can think of and cannot find where I can set this. Anyone know where and how to set this? The server I am connecting to only allows secure connections, so doing it any other way is not an option.
    Thanks.

    Having the same problem with a Java REST service using HTTPS requests, Adobe Air appears to ask to verify the certificate with every single request on windows ???  and on mac after accepting the certificate  we do not get a result?

  • Enhanced Flash Builder Code Generation Functionality

    For voting in JIRA:
    https://bugs.adobe.com/jira/browse/FB-27169
    The code generation feature FB 4 currently has is only really useful for quick throwaway prototyping or very simple forms. The generation should allow you to configure formatting via default templates, AND optionally utilize a dialog box (similar to that used in refactoring but with a few extras) so that you can configure the contents of each generated function and provide appropriate function names according to coding best practices. For example:
    -User initiates event handler generation
    (Optional, if Codegen dialog is enabled)
    -User is prompted with a dialog that allows them to customize the generated function name, and possibly specify whether they need an Event parameter passed to the function. (Default to NO event parameter, but this could be a pre-configured user option.)
    -FB utilizes the customized code generation format (customizable by the developer) to generate the new function
    If you need a "submitForm()" function and you want both a TextInput's enter action and a button's click action to call it, currently you're better off typing it all yourself, because auto-generation is going to put this long-named function that assumes you need 'event' passed to it. An event:MouseEvent parameter just gets in the way when you also want a TextInput's enter event to call that function, for example. Or perhaps we want to provide a more descriptive name to each handler (via dialog) without assigning IDs to each and every component: "datagrid1_changeHandler" or "button1_changeHandler" doesn't tell us what the function actually does. It's a basic coding best practice to name functions or methods after the actions they actually perform, and in a large application with complex forms auto-generated generic sounding function names are essentially useless from a maintainability standpoint.

    For anyone interested, I figured it out:
    to generate a CFC, you have to right-click a table in the RDS Dataview, then you can generate a CFC. You cannot generate a CFC from an AS class as described in the CF Builder help within Flash Builder.
    Adobe: it would be nice if this got fixed – and if someone there replied to posts like this. You do  know all this, don‘t you?

  • Flash Builder 4.6 - results of web service into arrayCollection?

    Hello,
    I'm coming from Flex 2 environment where it seemed easy to create an array collection from the data returned from my webservice using ArrayCollection and ArrayUtil.
    I've since switched over to flash builder 4 and am using the data services wizard to retrieve my data.  My problem is once i can retrieve my data, how can i access and manipulate it (besides dragging it into a datagrid etc).
    For example, i'd like to get the record count of items returned (ie - 32 items found).  When using an Array Collection & flex 2 i was able to simply access the ac.length parameter.
    Another example would be if i needed to access a specific item in the data (ie - username).  I previously (flex 2) was able to use something like ac.getItemAt(0).USERNAME
    Is the data returned from the webservice already in some type of array?  Can anybody shed some light for me?  I would appreicate any help.
    thank you.

    Have a resultHandler and in that resultHandler
    assign the returned to a ArrayCollection variable,
    assign your datagrid's dataprovider to the ArrayCollection
    data comes back as generic objects

  • Connect Flash Builder 4 to remote PHP service

    Hello i have seen some videos that explained how easy is connect Data/Services to local PHP server, and then extract the methods instantly. Also binding it to a datagrid, and everything was with wizard, easy and fast.
    I would like to do the same but my problem is that i always work with remote PHP (not localhost), and i don't know how to connect flash builder 4 to my remote PHP class.
    PS: I know how to do it manyally, but then i would not use the power of the wizards.
    ¿Is there any solution?
    thanks

    Would you mind giving me an example?:
    the server path is /httpdocs/
    and my website is for example: http://www.smspubli.com
    I though that maybe the solution is on mount a virtual folder that connects to my httpdocs via FTP (problem is that in mac os it lets you create virtual folders but only in read mode)...
    Please help me, there is no solution in all internet and then only way to use the power of flash builder 4 is connecting to localhost...

  • Tutorial: Flash Builder 4 beta 2 and PHP Data/Services for beginners

    Hi fellas,
    I've written this tutorial for total beginners to get quickly to FB4 and PHP. Comments welcome
    Flash Builder 4 and PHP Data/Services for beginners
    http://www.flashrealtime.com/flash-builder-4-and-php-data-services/

    Hi,
    The first issue will be the pathing differences between wamp/mamp/xampp, some use www as root others htdoc you need to setup the php services on your local machine rather than importing a project.
    The created services will have a connection array declared at the top of the code that points to the mysql server, in the project default debug folder you will have the config file that has the zend and webserver path
    top of service file
    ============
    var $username = "root";
    var $password = "";
    var $server = "localhost";
    var $port = "3306";
    var $databasename = "zend";
    var $tablename = "clients";
    var $connection;
    amfconfig.ini
    =========
    [zend]
    ;set the absolute location path of webroot directory, example:
    ;Windows: C:\apache\www
    ;MAC/UNIX: /user/apache/www
    webroot =C:/wamp/www
    ;set the absolute location path of zend installation directory, example:
    ;Windows: C:\apache\PHPFrameworks\ZendFramework\library
    ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework/library
    ;zend_path =
    [zendamf]
    amf.production = false
    amf.directories[]=Zender-debug/services
    In your main project folder you have a .model folder the file there is an *.fml file that contains your channel endpoints etc.
    David.

Maybe you are looking for

  • IPhone 5 - Can I swap out the sim card to use in China?

    Can I swap out the US Verizon sim card in my iPhone 5 to use in China with a local Chinese carrier?  What needs to happen? Thanks, Dxeph

  • Weird errors with wireless router

    I have a TP-Link router set up at my relatives' place. It works perfectly well with two iPhones and an iPad, with no problems whatsoever. My MacBook Pro is a different story. I have set it up with this router. When I manage to get it to work, it work

  • Linear interpolator

    i'm trying to design a linear interpolator as cleanly and performant as possible in pl/sql & sql imagine i have a trade table id and a trade_profile table id profile_point value which i expect for every trade to contain the profile_points 1, 2, 3, 4

  • This entry already exist in the following table " (ACPR) in SBO 2005A

    Hi All, I use training database of SBO 2005A SP 01 PL 39. When updating new business partner (BP), the error message appears from system is this entry already exist in the following table " (ACPR) [ODBC 2035] (message 131-138). This error is happened

  • Is my hard drive gone?

    After years of perfect performance with my eMac, 10.2.8, Photoshop unexpected quit, and the computer automatically restarted. The chime came on, but only a screen with the center Apple - no revolving wheel. I've reset the Pram by holding down the Com