RemoteObject Data Serialization - Boolean

I have the problem that a PHP boolean retrieved from a mySQL boolean field as "0" or "1", instead of "true" or "false".
As far as I understand, AS3 only recognizes "true" or "false" as boolean values, anything else will be interpreted as TRUE, except NULL as false.
How can I get around this problem? I'm using Zend Framework, if someone knows of a what to implement this fix in the PHP value object.
Thanks!

This is just a trial error suggestion --
why not use the 0 & 1 in the UI ? change the Boolean to String in the value object, when the data is passed from the php to the UI, the string would appear as is and you can use that how ever you want

Similar Messages

  • [svn] 1543: Bug: BLZ-152-lcds custom Date serialization issue - need to add java.io. Externalizable as the first type tested in AMF writeObject() functions

    Revision: 1543
    Author: [email protected]
    Date: 2008-05-02 15:32:59 -0700 (Fri, 02 May 2008)
    Log Message:
    Bug: BLZ-152-lcds custom Date serialization issue - need to add java.io.Externalizable as the first type tested in AMF writeObject() functions
    QA: Yes - please check that the fix is working with AMF3 and AMFX and you can turn on/off the fix with the config option.
    Doc: No
    Checkintests: Pass
    Details: The problem in this case was that MyDate.as was serialized to MyDate.java on the server but on the way back, MyDate.java was serialized back to Date.as. As the bug suggests, added an Externalizable check in AMF writeObject functions. However, I didn't do this for AMF0Output as AMF0 does not support Externalizable. To be on the safe side, I also added legacy-externalizable option which is false by default but when it's true, it restores the current behavior.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-152
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/AbstractEndpoint.ja va
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/io/SerializationContext.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/io/amf/Amf3Output.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/io/amfx/AmfxOutput.java
    blazeds/branches/3.0.x/resources/config/services-config.xml

  • Call flex remoteObject data in a loop

    here is simple explanation,
    I need to show some panel and some buttons in that panel.
    consider we have 5 panels, so i use for loop for 1 to 5.
    inside that panels Button name comes from java
    using remoteObject and blazeds.
    Now my problem is remote object method not returning any value since it has void return type.
    Following example may give u better understanding.
    for(var m:int=0;m<=4;m++)
    var outerPanel:Panel= new Panel;
    outerPanel.titile=m;
    this.addElement(outerPanel);
    // object of 2nd class which(Should fetch, but its not happening) fetch the value from remoteObject
      var rmObj:remoteObjectClass = new remoteObjectClass();
    var arc:ArrayCollection= new ArrayCollection();
      arc=rmObj.getRemoteData(m);
    for(var n:int=0;n<=arc.length;n++)
      var testBut:Button= new Button();
       testBut.name=arc[n];
    outerPanel.addElement(testBut);
    Now here is the functions in RemoteObjectClass
              public function  getObjective(m:Int):void   
                var  ro:RemoteObject= new mx.rpc.remoting.mxml.RemoteObject;   
                ro.destination="getEntity"; 
               // getobjectives(); is java method which return ArryList 
                ro.getobjectives(m);       
                ro.addEventListener(ResultEvent.RESULT,objectivesResultHandler);                     
            private function objectivesResultHandler(event:ResultEvent):ArrayCollection   
            {   var objectiveList:ArrayCollection= new ArrayCollection;   
                objectiveList=event.result as ArrayCollection;                 
                return objectiveList;   
    Hope you understand my problem

    Instead of   arc=rmObj.getRemoteData(m);
    You have to access the objectiveList to get the button data. It is not better way to access the remote object class inside the loop.

  • Date serialization

    Hi
    I have found interesing (??) problem with Date object serialization. Date object serialized on Sun JVM can't be correctly deserialized on IBM JVM !!
    Try run this example on Sun JVM.
    import java.io.*;
    import java.util.Date;
    public class Write {
         public static void main(String[] args) throws IOException {
              Date date = new Date(45,8,1);
              System.out.println("JVM Vendor ["+System.getProperty("java.vm.vendor")+"] Version ["+System.getProperty("java.vm.version")+"]");
              System.out.println("Date ["+date+"], Date time ["+date.getTime()+"]");
              System.out.println("Date timeZoneOffset:"+date.getTimezoneOffset());
              //Serialize date
              ByteArrayOutputStream bout = new ByteArrayOutputStream();
              ObjectOutputStream ous = new ObjectOutputStream(bout);
              ous.writeObject(date);
              ous.flush();
              //write to file
              File outFile = new File("date.bin");
              FileOutputStream fous = new FileOutputStream(outFile);
              fous.write(bout.toByteArray());
              fous.close();
    }Result should be:
    JVM Vendor [Sun Microsystems Inc.] Version [1.4.2_05-b04]
    Date [Sat Sep 01 00:00:00 CEST 1945], Date time [-767930400000]
    Date timeZoneOffset:-120
    And serialized date object should be written into date.bin file.
    Next run this code on IBM JVM:
    import java.io.*;
    import java.util.Date;
    public class Read {
         public static void main(String[] args) throws Exception {
              File inFile = new File("date.bin");
              FileInputStream fis = new FileInputStream(inFile);
              ObjectInputStream ois;
              ois = new ObjectInputStream(fis);
              Date date = (Date) ois.readObject();
              ois.close();
              fis.close();
              System.out.println("JVM Vendor ["+System.getProperty("java.vm.vendor")+"] Version ["+System.getProperty("java.vm.version")+"]");
              System.out.println("Date ["+date+"], Date time ["+date.getTime()+"]");
              System.out.println("Date timeZoneOffset:"+date.getTimezoneOffset());
    }On my IBM JVM result is:
    JVM Vendor [IBM Corporation] Version [1.4.1]
    Date [Fri Aug 31 23:00:00 CET 1945], Date time [-767930400000]
    Date timeZoneOffset:-60
    Why deserialized date object has different value then before serialization??
    Magic date is 1945-09-16, if I set date after - everytjing is ok, if I set date before - something is wrong.

    Hi
    I have found interesing (??) problem with Date object
    serialization. Date object serialized on Sun JVM
    can't be correctly deserialized on IBM JVM !!So what, serialization was not meant to be portable accross JVM implementations.

  • Gateway Service Builder and Data Source Boolean Mapping

    Hi folks,
    I am using the service builder to define my gateway ODATA services ...
    I have some data model fields which are booleans and are defined as type 'Edm.Boolean' ...
    I am unable to map those fields to RFC ABAP fields with domain 'BOOLEAN' (char 1) ... I am always getting the error:
    Data source attribute ACTIVE and model property IsActive have different types
    Message no. /IWBEP/SBDSP_DM031
    I looked at the help documentation and did some searches here  but I could not find any specific information on the requirements for this EDM type ...
    Thanks,
    Steven

    Hi Folks,
    Did some further debugging and to me this seems to be a BUG in the standard SAP code which determines the EDM type for the linked attribute data.
    Method 'get_ds_attr_edm_type' of class '/IWBEP/CL_SBDSP_UTILITY' creates an internal data type with the internal length ( = 2 ) for a type C length 1 in a unicode system ...
    when 'c' or 'n' or 'x'.
    create data lo_ds_dref type lv_ds_data_type) length lv_ds_int_length.
    Then in method 'get_edm_type_from_ddic_type' of class '/iwbep/cl_mgw_med_edm_util' the length needs to be 'one' in order to potentially qualify as a 'boolean' ... but it is always '2' for a type C length 1 ... hence the mismatch ...
    when cl_abap_typedescr=>typekind_char.
          rs_edm_type-core_type = /iwbep/if_mgw_med_odata_types=>gcs_edm_data_types-string.       "'Edm.String'.
          if ls_dfies is initial.         "Not a DDIC type, that is it is ABAP Core type
            rs_edm_type-length = rs_edm_type-length.  "number of characters
            rs_edm_type-internal_length = rs_edm_type-length * cl_abap_char_utilities=>charsize.  "length in bytes / Unicode needs double
         elseif rs_edm_type-length eq 1."boolean detection (guessing)
            if ls_dfies-domname cs 'BOOL'.
              rs_edm_type-core_type = /iwbep/if_mgw_med_odata_types=>gcs_edm_data_types-boolean.  "'Edm.Boolean'.
            endif.
          endif.
    Hopefully somebody from the SAP gateway team is watching this   Will see whether we can create an OSS customer request as well ...
    Regards,
    Steven

  • HR Master data serialization error

    Hi,
    I activated serialization on sender and receiver system:
    (Transaction SALE -> Modelling and Implementing Business Processes -> Configure Predefined ALE Business Processes -> Human Resource -> Master Data Distribution - > Serialize HR Master Data)
    After processing, some iDocs have status 51 - Serialization error for object &. Expected counter 000001 < 000002 in IDoc.
    I understand that when I get iDoc with too big serialization counter the iDoc should have status 66 (IDoc is waiting for preceding IDoc (Serialization)) and I should be able to reprocess the iDoc when I get iDocs with missing serialization counter. Am I right?
    So why do they have status 51 and not 66?
    Thanks for answer in advance.

    there is some inconsistency in the receiver system.
    for ex:
    sender system Company code is different from the receiver system. etc...
    Edited by: Ashok Kumar Reddy N on Feb 6, 2008 1:46 PM

  • Present string data as boolean !

    hello !
    i am recieving data from UDP READ FUNCTION as string and want to present it as bits (like 10011100-11001100.....)
    the string indicator allows me to see the data as HEX/CODES/ASCII only.
    your help please.
    Solved!
    Go to Solution.

    Himanshu Goyal wrote:
    Please see the attached VI. I hope you are looking for the same solution.
    Himanshu
    Your code is incorrect and much more complicated than needed.
    Instead of %b, you need to use format %08b, else the binary formatted strings lose their trailing zeroes and all information is lost.
    I don't understand the reason for the parts after the first loop. They do absolutely nothing! What were you thinking?
    After creating the faulty output string in the first for loop, you create an array containing the seperate characters, then use built array to convert it to exactly the same 1D array, then you use concatenate strings to merge it back into the single string you had after the first loop already.
    Here is a corrected version (your original code is on top for comparison) that could be used if the original poster is looking for an output containing no "-" delimiters.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    StringToBinaryFormattedString.png ‏11 KB

  • Variant to data boolean

    Hello everybody,
    I want to convert a variant data  into boolean. I use the Variant to Data control, but in order to extract the boolean data, I assume, I need to provide it with the type of the data I want this conversion to be performed (boolean, that is). There 's a terminal to do so, but I don;t know whether I should use a constant (what's the numerical constant for the boolean type) or what sort of boolean constant I should link the terminal with? Shortly, I don't know what I should link it with.
    THere's an enclosed picture coming with the post.
    Thank you,
    Dana
    Attachments:
    cannot wire_different data types.JPG ‏111 KB

    Hi JB,
    I tried so, and doesn't work.
    In essence, I have 12 cases frames, and I want them linked to the same Stop button.
    I have the code attached,
    Thanks for the idea.
    Dana
    Attachments:
    Acq_multiBS_statemachine_sound_int.vi ‏134 KB

  • Idoc Serialization for Transactional data

    Hi All,
    1. Please let me know if you have done IDOC serialization for Transactional data.
    If so please let me know the steps.
    2. How do we use serialiazation using object types. If you have done this please let me know the steps for this too.
    Thanks for your help.
    Srikanth.

    Hi Srikanth,
    Follow the steps below to set up serialization using object types:
    1.       In the SAP menu choose ® IDoc Interface/ALE ® Development ® BAPI ® Serialization ® Serialization Using Business Objects ® Determine Supported Business Objects (transaction BD105). Enter all the business object types relevant for serialization.
    2.       In the SAP menu choose ® IDoc Interface/ALE ® Development ® BAPI ® Serialization ® Serialization Using Business Objects ® Assign Message Type to a Business Object (transaction BD104). Assign the message types relevant for serialization to each business object type.
    3.       In Customizing (IMG) activate the serialized distribution in both the sending and receiving systems:
    ALE Implementation Guide (transaction SALE)
    Modeling and Implementing Business Processes
    Master Data Distribution
    Serialization for Sending and Receiving Data 
    Serialization Using Business Objects
    Execute activities Activate Outbound Business Objects and Activate Inbound Business Objects. Set the Serialization flag for the required business object types.
    If you want to do serialization by message type then
    1. go to BD44 and create a serialization group and assign messages and the serial number to each.
    2. Run the program RBDSER01.
    Award points if useful,
    Aleem.

  • Best way for Java/C++/C# to share data in a cache?

    I have an order processing application which listens for Order objects to be inserted in a cache. If I want Java, C# and C++ apps to be able to submit orders to that cache, what's the best way to set up that Order object? Orders currently have many Enum member variables. What happens when a C# or C++ app needs to put an Order object in the cache? how would it set those java enums? Also, the java Enum classes have a lot of Java specific code in 'em for convenience. I imagine for cross platform simplicity it might have been best if the Order object were just an array of Strings or a Map of Strings to values but I have too much code depending on the Order object being how it is currently. Should I extract an Order Interface? What about the Enums? My java enums aren't simple {RED,GREEN,BLUE} type enums, they contain references to other Enums, etc. - see below...
    A portion of my Order class looks like:
    public class Order implements Cloneable, Comparable, java.io.Serializable {
      private static Logger logger = Logger.getLogger(Order.class);
      private boolean clearedFromOpenOrdersTable = false; 
      private boolean trading_opened = false;
      private static Random generator = new Random();
      private static int nextID = generator.nextInt(1000000); //just for testing
      private int quantity = 0;
      private int open = 0;
      private int executed = 0;
      private int last = 0;
      private int cancelPriority = 0;
      private Integer sendPriority = 0;
    //enums
      private OrderSide side = OrderSide.BUY;
      private OrderType orderType = OrderType.MARKET;
      private OrderTIF tif = OrderTIF.DAY;
      private OrderStatus orderStatus = OrderStatus.PENDING_NEW;
      private OrderExchange orderExchange = null;
      private OOType ooType = OOType.NOTOO;
      private OOLevel ooLevel = OOLevel.NONE;
      private Float limit = new Float(0);
      private Float stop = null;
      private float avgPx = 0.0f;
      private float lastPx = 0.0f;
      private String account = null;
      private String symbol = null;
      private long submitTimestamp;
      private long fillTime = 0;
      private long ackTime = 0;
      private Timestamp submitSqlTimestamp;
      public /*final*/ static NamedCache cache;
      private ArrayList<OrderStatusChangeListener> statusChangeListeners =
        new ArrayList<OrderStatusChangeListener>();
      transient private Format formatter = new SimpleDateFormat("hh:mm:ss a");
      public static void connectToCache() {
        cache = CacheFactory.getCache("orders");
      public void send() {
        this.submitTimestamp = System.currentTimeMillis() ;
        this.submitSqlTimestamp = new Timestamp(submitTimestamp);
        cache.put(this.ID, this);
      public void setCancelCount(int i) {
        cancelCount = i;
      public int getCancelCount() {
        return cancelCount;
      public static class CancelProcessor extends AbstractProcessor {
        public Object process(InvocableMap.Entry entry) {
          Order o = (Order)entry.getValue();
          if (o.cancelCount == 0) {
            o.cancelCount = 1;
          } else {
            logger.info("ignoring dup. cancel req on " + o.symbol + " id=" + o.ID);
          return o.cancelCount;
      public void cancel() {
          // cache.invoke(this.ID, new CancelProcessor() ); // must this be a 'new' one each time?
          Filter f = new EqualsFilter("getCancelCount", 0);
          UpdaterProcessor up = new UpdaterProcessor("setCancelCount",new Integer(1) );
          ConditionalProcessor cp = new ConditionalProcessor(f, up);
          cache.invoke(ID, cp);
      NumberIncrementor ni1 = new NumberIncrementor("CancelCount", 1, false);
      public void cancelAllowingMultipleCancelsOfThisOrder() {
        System.out.println("cancelAllowingMultipleCancelsOfThisOrder symbol=" + symbol + " id=" + ID);
        cache.invoke(this.getID(), ni1);
      public Timestamp getSubmitSqlTimestamp(){
        return submitSqlTimestamp;
      boolean isWorking( ) {
           // might need to write an extractor to get this from the cache atomically
           if (orderStatus != null &&
                (orderStatus == OrderStatus.NEW || orderStatus == OrderStatus.PARTIALLY_FILLED ||
                    // including PENDING_CANCEL breaks order totals from arcadirect
                    // because they send a pending cancel unlike foc
                    // os.getValue() == OrdStatus.PENDING_CANCEL ||
                    orderStatus == OrderStatus.PENDING_NEW ||
                    orderStatus == OrderStatus.PENDING_REPLACE)) {
              return true;
            } else {
              return false;
      public long getSubmitTimestamp(){
        return submitTimestamp;
      private void fireStatusChange( ) {
              for (OrderStatusChangeListener x:statusChangeListeners) {
                    try {
                         x.dispatchOrderStatusChange(this );
                    } catch (java.util.ConcurrentModificationException e) {
                         logger.error("** fireStatusChange: ConcurrentModificationException "+e.getMessage());
                         logger.error(e.getStackTrace());
                         e.printStackTrace();
      public Order() {
          ID = generateID();
          originalID = ID;
      public Object clone() {
          try {
            Order order = (Order)super.clone();
            order.setOriginalID(getID());
            order.setID(order.generateID());
            return order;
          } catch (CloneNotSupportedException e) {
          return null;
        class ReplaceProcessor extends AbstractProcessor {
          // this is executed on the node that owns the data,
          // no network access required
          public Object process(InvocableMap.Entry entry) {
            Order o = (Order)entry.getValue();
            int counter=0;
            float limit=0f;
            float stop=0f;
            int qty=o.quantity;
            boolean limitChanged=false, qtyChanged=false, stopChanged=false;
            for (Replace r:o.replaceList) {
              if (r.pending) {
                counter++;
                if (r.limit!=null) {limit=r.limit; limitChanged=true;}
                if (r.qty!=null) {qty=r.qty; qtyChanged=true;}
                if (r.stop!=null) {stop=r.stop; stopChanged=true;}
            if (limitChanged) o.limit=limit;
            if (qtyChanged) o.quantity=qty;
            if (stopChanged) o.stop=stop;
            if (limitChanged || qtyChanged || stopChanged)
            entry.setValue(o);
            return counter;
      public void applyPendingReplaces() {
         cache.invoke(this.ID, new ReplaceProcessor());
      private List <Replace>replaceList;
      public boolean isReplacePending() {
        if (replaceList==null) return false; 
        for (Replace r:replaceList) {
          if (r.pending==true) return true;
        return false;
      class ReplaceAddProcessor extends AbstractProcessor {
        // this is executed on the node that owns the data,
        // no network access required
        Replace r;
        public ReplaceAddProcessor(Replace r){
          this.r=r;
        public Object process(InvocableMap.Entry entry) {
          Order o = (Order)entry.getValue();
          if (o.replaceList==null) o.replaceList = new LinkedList();
          o.replaceList.add(r);
          return replaceList.size();
      public void replaceOrder(Replace r) {
          //  Order.cache.invoke(this.ID, new ReplaceAddProcessor(r));
          Order o = (Order)Order.cache.get(this.ID);
          if (o.replaceList==null) o.replaceList = new LinkedList();
          o.replaceList.add(r);
          Order.cache.put(this.ID, o);
      public boolean isCancelRequestedOrIsCanceled() {
        // change to cancelrequested lock, not ack lock
        if (canceled) return true;
    //  ValueExtractor extractor = new ReflectionExtractor("getCancelCount");
    //  int cc = (Integer)cache.invoke( this.ID , extractor );
        Order o = (Order)cache.get(this.ID);
        int cc = o.getCancelCount();
        return cc > 0 || o.isCanceled();
        class Replace implements Serializable{
        boolean pending=true;
        public Float limit=null;
        public Float stop=null;
        public Integer qty=null;
        public Replace() {
      }and then a portion of my OrderExchange.java Enum looks like this:
    class SymbolPair implements java.io.Serializable {
      String symbol;
      String suffix;
      SymbolPair(String symbol, String suffix) {
        this.symbol = symbol;
        this.suffix = suffix;
      public boolean equals(Object o) {
        SymbolPair x = (SymbolPair)o;
        return (this.symbol == x.symbol && this.suffix == x.suffix);
      public int hashCode() {
        return (symbol + "." + suffix).hashCode();
      public String toString() {
        if (suffix == null)
          return symbol;
        return symbol + "." + suffix;
    public enum OrderExchange implements java.io.Serializable {
      SIM("S", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          return symbol + "." + suffix;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          return new SymbolPair(symbol, null);
      TSX("c", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      NYSE("N", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      ARCA("C", false, '.', OrderTIF.GTD) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      public abstract String getStandardizedStockSymbol(String symbol, String suffix);
      public abstract SymbolPair getExchangeSpecificStockSymbol(String symbol);
      private static Map<SymbolPair, String> externalSymbolPairToInternalSymbolMap_GS = new HashMap<SymbolPair, String>();
      private static Map<SymbolPair, String> externalSymbolPairToInternalSymbolMap_ARCA = new HashMap<SymbolPair, String>();
      private static Map<String, SymbolPair> internalSymbolToExternalSymbolPairMap_GS = new HashMap<String, SymbolPair>();
      private static Map<String, SymbolPair> internalSymbolToExternalSymbolPairMap_ARCA = new HashMap<String, SymbolPair>();
      private static Object[] toArrayOutputArray = null;
      static {
        String SQL = null;
        try {
          Connection c = MySQL.connectToMySQL("xxx", "xxx", "xxx", "xxx");
          SQL = "SELECT symbol, ARCASYMBOL, INETSYMBOL, ARCASYMBOLSUFFIX, INETSYMBOLSUFFIX from oms.tblsymbolnew";
          Statement stmt = c.createStatement();
          ResultSet rs = stmt.executeQuery(SQL);
          while (rs.next()) {
            String symbol = rs.getString("symbol");
            if (rs.getString("ARCASYMBOL") != null) {
              if (!symbol.equals(rs.getString("ARCASYMBOL")) || rs.getString("ARCASYMBOLSUFFIX") != null) {
                String suffix = rs.getString("ARCASYMBOLSUFFIX");
                SymbolPair sp = new SymbolPair(rs.getString("ARCASYMBOL"), suffix);
                internalSymbolToExternalSymbolPairMap_ARCA.put(symbol, sp);
                externalSymbolPairToInternalSymbolMap_ARCA.put(sp, symbol);
        } catch (Exception e) {
          System.out.println(SQL);
          e.printStackTrace();
          System.exit(0);
      static {
        populateSymbolToDestination();
      static Logger logger = Logger.getLogger(OrderExchange.class);
      private static HashMap<String, OrderExchange> symbolToDestination = new HashMap<String, OrderExchange>();
      private final String tag100;
      private final boolean usesSymbolSuffixTag;
      private final char symbolSuffixSeparator;
      private final OrderTIF defaultTif;
      private static final String soh = new String(new char[] { '\u0001' });
      private OrderExchange(String tag100, boolean usesSymbolSuffixTag, char symbolSuffixSeparator, OrderTIF defaultTif) {
        this.tag100 = tag100;
        this.defaultTif = defaultTif;
        this.usesSymbolSuffixTag = usesSymbolSuffixTag;
        this.symbolSuffixSeparator = symbolSuffixSeparator;
      public OrderTIF getDefaultTif() {
        return defaultTif;
      public String getTag100() {
        return tag100;
      public char getSymbolSuffixSeparator() {
        return symbolSuffixSeparator;
      public static OrderExchange getOrderExchangeByExchangeName(String name) {
        for (OrderExchange d : OrderExchange.values()) {
          if (d.toString().equalsIgnoreCase(name.trim())) {
            return d;
        return null;
      Thanks,
    Andrew

    Hi Andrew
    The only way to serialize object, so that they can be used by other languages than Java is to use the Portable Object Format.
    The implementation of this requires you to implement the PortableObject interface in Java. PortableObject defines two methods
    public void readExternal(PofReader reader);
    public void writeExternal(PofWriter writer);
    Also you need to add a POF config file that ties the type to a type id.
    In C++ each type needs two template methods implemented to seralize and deserialize. But first it needs to register the data type with the same type id as for the Java type using the COH_REGISTER_MANAGED_CLASS macro.
    Secondly analogs to Java implement the serializer stubs
    template<> void serialize<Type>(PofWriter::Handle hOut, const Type& type);
    template<> Type deserialize<Type>(PofReader::Handle hIn);
    For C# your serializable types need to implement IPortableObject, with it's two methods:
    void IPortableObject.ReadExternal(IPofReader reader);
    void IPortableObject.WriteExternal(IPofWriter writer);
    Similar to Java C# uses a POF configuration file, the same type id should bind to the corresponding C# type.
    For more information see
    POF Configuation: http://coherence.oracle.com/display/COH34UG/POF+User+Type+Configuration+Elements
    C++: http://coherence.oracle.com/display/COH34UG/Integrating+user+data+types
    C#: http://wiki.tangosol.com/display/COHNET33/Configuration+and+Usage#ConfigurationandUsage-PofContext
    Hope that helps!
    /Charlie
    Edited by: Charlie Helin on Apr 30, 2009 12:31 PM

  • AS3 Data Coercion Problem

    AS3 Data Coercion Problem
    From PHP server RemoteObject AMF3 serialization, I receive a
    photo object per below into my Flex client:
    package WPhoto {
    [Bindable]
    [RemoteClass(alias="WPhoto.PhotoObj")]
    public class PhotoObj {
    public var photo:*;
    public var photoWidth:int;
    public var photoHeight:int;
    The above 'photo' property String of a one-byte (UTF-8)
    '.jpg' photo data. Due to PHP's rather limited set of primitive
    data types this is the best I can do per returning photo data to
    the Flex client. (Extreme tries at PHP data structure chicanery
    hasn't worked for me.)
    I need photo property in a DisplayObject format such that I
    can render photo as a child of my App's DisplayObject. The AS3
    Loader class performs this task, when sourced from an AS3
    ByteArray.
    o Loader.loadBytes(bytes:ByteArray, context:LoaderContext =
    null):void
    Loads from binary data stored in a ByteArray object.
    My dilemma is "how to" convert a UTF-8 string of photo data
    into a ByteArray. I've been through the ByteArray.writeXXX() class
    methods without finding anything close to meeting my requirements.
    AS3 String readers expect UTF-16 data, so reading AS3 string
    reading is not a solution. AS3 has no Byte data type, accordingly
    reading my photo data UTF-8 string with a "for loop" into a AS3
    UTF-16 string, or whatever, is not viable. Is there a single-byte
    reader to 'whatever' writer I'm not aware of?
    If I was sourcing photos from a Java based server, my photo
    rendering dilemma would be over. The server to client packets would
    be "java.lang.Byte[]" => flash.utils.ByteArray and voilà we
    could easily and directly render photos via the Loader.loadBytes()
    method.
    I can tentatively extend one of the AS3 ByteArray class write
    methods if I thought there was a way to read UTF-8 streams. Before
    digging down into the ByteArray class on a feasibility basis, I
    thought it first best to ask around the experts per 1) can
    ByteArray be extended for my requirement, or 2) is there a better
    way to approach this, which I have not thought of?
    Pete Mackie
    Seaquest Software
    Adobe Community Expert - Flex

    Hi,
    Thanks for the quick reply.
    I simply don't get it.
    I have a root class which adds two different children of
    different classes. One child dispatched an event, and the other is
    supposed to get it. Both of the are now supposed to be in the
    instance hirrarchy, or am I wrong?
    Logically, I'd figure this should work smooth and simple
    without any need for any looping or such.
    Right now, the root class can recieve the event dispatched by
    child1, but I can't make child2 recieve any event dispatched by
    either the root or child1.
    I'd appreciate if you could show me the way...
    thanks again,
    EZ42

  • What's wrong with dynamic data?

    I am starting this thread to showcase what I might call "dynamic data abuse": The use of dynamic data where it has no business to be used (does it ever?).
    Everybody is invited to contribute with their own examples!
    One of the problems when operating on dynamic data is its opacity. We can never really tell what's going on by looking at the code. It also seems to hide serious programming mistakes by adapting in ways to mask horrendous code and making it seemingly functional, glossing over the glaring programming errors.
    To get it all started, here are a few recent sightings:
    (A)
    (Seen here). No Kidding! The users joins a scalar with a waveform, then wires the resulting dynamic data to the index input of "replace array subset". He cannot see anything wrong, because the program actually works (coercing the dynamic data to a scalar will, by a happy coincidence, return the value of the scalar joined earlier. I have no idea what thought process led to this code in the first place (maybe just randomly connecting functions until the result is as expected? ).
    (B)
    (seen here)
    What's wrong with simply branching the wire???
    (C)
    I don't remember the link, but here's how somebody transposed a 2D array a while ago (bottom part of image). No way to tell from looking at the code picture! (The "FromDDT" and "ToDDT" need to be configured just right ...).
    ARRRRGH!
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    join.png ‏2 KB
    split.png ‏3 KB
    DynamicTranspose.png ‏18 KB

    Here's another one for you.  Found here:http://forums.ni.com/t5/LabVIEW/Program-unresponsive-after-a-dialog-box-input/m-p/2447608#U2447608
    Put a bunch of booleans into a Combine Signals and then do a Dynamic Data to Boolean Array.
    I supplied the much more cleaned up version of the code below.
    EDIT:  I just realized I needed to subtract 1 frm the power before using the Scale by Power of 2.  Oops.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Button Press Decoder_BD.png ‏41 KB

  • Data is not updating in calss & Convert vi reference to strictly type reference vi

    Hi,
    In the attached project file there is a Class called 'ClassSample.lvclass' having 3 different data types Boolean, Numeric and Variant(not really sure, Variant can be use for strict data type reference). From this three we careated the 'VIs for data member access' you can see them in project file
    My questions are,(Please refer attached screenshot)
    1. Though member of same class, why value is not updating at probe 16 ?
    2. How to convert vi reference to strictly type reference vi ?
    Thank you.
    Attachments:
    Capture.JPG ‏426 KB
    ClassSample Project.zip ‏116 KB

    It depends a bit on your final intention. Bascially you have a shared state that you want to access asynchronously from different places. If you know that the actual object is only created once (terminilogie here is a bit shaky as every wire split would create a copy of the LVOOP object but I hope you know what I mean), you could use a global or Action Engine to store the state. Using a DVR for this state and adding the DVR to your object class data is however a more scalable approach as it will allow you to instantiate more than one object of that class and each one will contain its own DVR that will reference the same value for the specific object instance even if you split the object wire, creating actually two copies of that object (but for the purpose of this discussion they would be still the same object instance).
    Queues could work if you create a single element queue but you would always need to use Preview Queue rather than Dequeue in order to maintain the value in there.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to consume the webservice if it returns the data in dataset format

    Dear All,
    We have a requirement to consume webservice created in .NET platform. In that webservice they are returning data in dataset format. In this case i am not able to create a proxy. It is showing the following information.
    Cannot generate proxy (object schema mis
    WSDL, see long text)                   
      <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:import namespace="http://www.w3.org/2001/XMLSchema" />
    - <s:element name="getTaskEffort">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="SPRProjectId" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="getTaskEffortResponse">
    - <s:complexType>
    - <s:sequence>
    - <s:element minOccurs="0" maxOccurs="1" name="getTaskEffortResult">
    - <s:complexType>
    - <s:sequence>
      <s:element ref="s:schema" />
      <s:any />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="getTaskEffortSoapIn">
      <wsdl:part name="parameters" element="tns:getTaskEffort" />
      </wsdl:message>
    - <wsdl:message name="getTaskEffortSoapOut">
      <wsdl:part name="parameters" element="tns:getTaskEffortResponse" />
      </wsdl:message>
    - <wsdl:portType name="OntimeWSSoap">
    - <wsdl:operation name="getTaskEffort">
      <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">This method.</documentation>
      <wsdl:input message="tns:getTaskEffortSoapIn" />
      <wsdl:output message="tns:getTaskEffortSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="OntimeWSSoap" type="tns:OntimeWSSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <wsdl:operation name="getTaskEffort">
      <soap:operation soapAction="http://tempuri.org/getTaskEffort" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="OntimeWS">
      <documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
    - <wsdl:port name="OntimeWSSoap" binding="tns:OntimeWSSoap">
      <soap:address location="http://hts-pcs-0808/OntimeData/Ontime.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    I tried to consume webservice http://student.ohecampus.com/projects/group95/stud17/assignment7/validateEmail.asmx, which will return the data in boolean format. In this case, i am able to create a proxy and it is working fine. Can anyone help me out.
    Thanks in advance.
    Regards,
    Karthick

    Dear Raja,
    I checked with webservice owner who created the webservice. They are telling that there is no problem in XML file which they gave. The webservice they provided is consumed in many application and it is working fine. When in SAP, i tried to create a proxy it is showing the in information which i mentioned in earlier posted forum message.
    Kindly advice.
    Regards,
    Karthick

  • Error: ORA-16525: the Data Guard broker is not yet available

    Hi ,
    After upgrading from 11201 to 11203 ON AIX GI/RDBMS on standby but have not upgraded the primary db yet.I had set dg_broker_start=false and disable configuration before i started the upgrade .
    once the GI for oracle restart was upgraded i upgraded the rdbms binaries and brought up the standby on mount ,while trying to enable configuration its throwing the below error.I had already started the broker process.
    SQL> show parameter dg_
    NAME TYPE VALUE
    dg_broker_config_file1 string /u01/app/omvmxp1/product/11.2.
    0/dbhome_2/dbs/dr1mvmxs2.dat
    dg_broker_config_file2 string /u01/app/omvmxp1/product/11.2.
    0/dbhome_2/dbs/dr2mvmxs2.dat
    dg_broker_start boolean TRUE
    DGMGRL> show configuration;
    Configuration - Matrxrep_brkr
    Protection Mode: MaxAvailability
    Databases:
    mvmxp2 - Primary database
    mvmxs2 - Physical standby database
    Error: ORA-16525: the Data Guard broker is not yet available
    Fast-Start Failover: DISABLED
    Configuration Status:
    ERROR
    from drcmvmxs2.log
    Starting Data Guard Broker bootstrap <<Broker Configuration File Locations:
    dg_broker_config_file1 = "/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs/dr1mvmxs2.dat"
    dg_broker_config_file2 = "/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs/dr2mvmxs2.dat"
    12/19/2012 16:05:33
    Data Guard Broker shutting down
    DMON Process Shutdown <<12/19/2012 16:10:20
    Starting Data Guard Broker bootstrap <<Broker Configuration File Locations:
    dg_broker_config_file1 = "/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs/dr1mvmxs2.dat"
    dg_broker_config_file2 = "/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs/dr2mvmxs2.dat"
    ~
    Regards
    Edited by: Monto on Dec 19, 2012 1:23 PM

    Hi,
    I removed the configuration and removed the broker files from RAC primary(mvmxp2) and single instance standby(mvmxs2) and re-created back.i tried it many times but getting error "ORA-16532" .I needed to have this standby backup before i start upgrading the primary.
    SQL> alter system set dg_broker_start=true scope=both;
    System altered.
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    palmer60:/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs>dgmgrl
    DGMGRL for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - 64bit Production
    Copyright (c) 2000, 2009, Oracle. All rights reserved.
    Welcome to DGMGRL, type "help" for information.
    DGMGRL> connect sys@mvmxp2
    Password:
    Connected.
    DGMGRL> CREATE CONFIGURATION 'Matrxrep'
    AS
    PRIMARY DATABASE IS 'mvmxp2'
    CONNECT IDENTIFIER IS 'mvmxp2';> > >
    Configuration "Matrxrep" created with primary database "mvmxp2"
    DGMGRL> ADD DATABASE 'mvmxs2'
    AS
    CONNECT IDENTIFIER IS 'mvmxs2'
    ;Database "mvmxs2" added
    DGMGRL> SHOW CONFIGURATION;
    Configuration - Matrxrep
    Protection Mode: MaxPerformance
    Databases:
    mvmxp2 - Primary database
    mvmxs2 - Physical standby database
    Fast-Start Failover: DISABLED
    Configuration Status:
    DISABLED
    DGMGRL> ENABLE CONFIGURATION;
    Enabled.
    DGMGRL> SHOW DATABASE MVMXS2;
    Database - mvmxs2
    Role: PHYSICAL STANDBY
    Intended State: APPLY-ON
    Transport Lag: (unknown)
    Apply Lag: (unknown)
    Real Time Query: OFF
    Instance(s):
    mvmxs2
    Database Status:
    DGM-17016: failed to retrieve status for database "mvmxs2"
    ORA-16532: Data Guard broker configuration does not exist
    ORA-16625: cannot reach database "mvmxs2"
    DGMGRL>
    tailed the drcmvmxs2.log during stop and start of the broker
    palmer60:/u01/app/omvmxp1/diag/rdbms/mvmxs2/mvmxs2/trace>tail -f drcmvmxs2.log
    12/19/2012 20:32:20
    drcx: cannot open configuration file "/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs/dr1mvmxs2.dat"
    ORA-27037: unable to obtain file status
    IBM AIX RISC System/6000 Error: 2: No such file or directory
    Additional information: 3
    12/19/2012 20:32:55
    drcx: cannot open configuration file "/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs/dr2mvmxs2.dat"
    ORA-27037: unable to obtain file status
    IBM AIX RISC System/6000 Error: 2: No such file or directory
    Additional information: 3
    12/19/2012 20:59:10
    Data Guard Broker shutting down
    DMON Process Shutdown <<12/19/2012 20:59:35
    Starting Data Guard Broker bootstrap <<Broker Configuration File Locations:
    dg_broker_config_file1 = "/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs/dr1mvmxs2.dat"
    dg_broker_config_file2 = "/u01/app/omvmxp1/product/11.2.0/dbhome_2/dbs/dr2mvmxs2.dat"
    Not sure how to fix this one.
    Regards

Maybe you are looking for

  • CLIENT_SEND_FAILED

    Hi,There We are SP 18,patch level 2. After we adapted to SP 18(17->18), Some problem occured. We are using "Proxy". This Problem is Sender Proxy of R/3 side. Problem is blow. This "CLIENT_SEND_FAILED" occur hardly ever, not always. And After Auto-ret

  • Error while running report builder

    Title is RWBLD60.exe Ordinal not found Error Message is The ordinal 11100 could not be located in the dynamic link liberary UIW60.dll

  • Unable to update or modify the UDFs after upgradation of PL 19............

    Hi Experts............. After upgrdation to PL 19 I'm not able to update the UDF fields particularly in Outgoing excise invoice , Incoming excise invoive after creation of AR invoice and AP invoice respectively........... Before creation of AR invoic

  • FLVPlayback Built-In Functions listing

    I would really like to find a listing of all the things that I can call on a FLVPlayback things like FLVPlayback.play FLVPlayback.pause I can't find anywhere that lists them all and I am getting sick of looking.... anyone out there know where I can f

  • Is there a way to get a wallpaper without it being zoomed in?

    The wallpapers that come with the PB are ok but I can find better ones I like on google and download them and I have pictures of my car I took and both the downloaded ones and the camera pictures are very zoomed in when I set them as wallpaper. That