Ejemplo n.º 1
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static LifecycleManager parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      LifecycleManager object = null;

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"LifecycleManager".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (LifecycleManager)
                  org.apache.axis2.transaction.xsd.ExtensionMapper.getTypeObject(
                      nsUri, type, reader);
            }

            throw new org.apache.axis2.databinding.ADBException(
                "The an abstract class can not be instantiated !!!");
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
Ejemplo n.º 2
0
 public static TimeZone fromString(
     javax.xml.stream.XMLStreamReader xmlStreamReader, java.lang.String content) {
   if (content.indexOf(":") > -1) {
     java.lang.String prefix = content.substring(0, content.indexOf(":"));
     java.lang.String namespaceUri =
         xmlStreamReader.getNamespaceContext().getNamespaceURI(prefix);
     return TimeZone.Factory.fromString(content, namespaceUri);
   } else {
     return TimeZone.Factory.fromString(content, "");
   }
 }
Ejemplo n.º 3
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static DebugLevel parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      DebugLevel object = null;
      // initialize a hash map to keep values
      java.util.Map attributeMap = new java.util.HashMap();
      java.util.List extraAttributeList =
          new java.util.ArrayList<org.apache.axiom.om.OMAttribute>();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        while (!reader.isEndElement()) {
          if (reader.isStartElement() || reader.hasText()) {

            nillableValue =
                reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
            if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
              throw new org.apache.axis2.databinding.ADBException(
                  "The element: " + "DebugLevel" + "  cannot be null");
            }

            java.lang.String content = reader.getElementText();

            if (content.indexOf(":") > 0) {
              // this seems to be a Qname so find the namespace and send
              prefix = content.substring(0, content.indexOf(":"));
              namespaceuri = reader.getNamespaceURI(prefix);
              object = DebugLevel.Factory.fromString(content, namespaceuri);
            } else {
              // this seems to be not a qname send and empty namespace incase of it is
              // check is done in fromString method
              object = DebugLevel.Factory.fromString(content, "");
            }

          } else {
            reader.next();
          }
        } // end of while loop

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
 public static EnumMWSAttributeFormCategories_type0 fromString(
     javax.xml.stream.XMLStreamReader xmlStreamReader, java.lang.String content) {
   if (content.indexOf(":") > -1) {
     java.lang.String prefix = content.substring(0, content.indexOf(":"));
     java.lang.String namespaceUri =
         xmlStreamReader.getNamespaceContext().getNamespaceURI(prefix);
     return EnumMWSAttributeFormCategories_type0.Factory.fromString(content, namespaceUri);
   } else {
     return EnumMWSAttributeFormCategories_type0.Factory.fromString(content, "");
   }
 }
Ejemplo n.º 5
0
 public static java.lang.String getGroupFromCounterName(java.lang.String s) {
   int i = s.indexOf("group: ");
   if (i < 0) {
     return null;
   }
   int j = s.indexOf('/', i);
   if (j < 0) {
     return null;
   } else {
     java.lang.String s1 = s.substring(i + 7, j);
     return s.substring(6, i - 1) + " " + s1;
   }
 }
Ejemplo n.º 6
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static hr.ponge.pfa.axis.core.operations.CreateDocumentReq parse(
        javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {
      hr.ponge.pfa.axis.core.operations.CreateDocumentReq object =
          new hr.ponge.pfa.axis.core.operations.CreateDocumentReq();
      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {
        while ((!(reader.isStartElement())) && (!(reader.isEndElement()))) reader.next();
        if ((reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type"))
            != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if ((fullTypeName.indexOf(":")) > (-1)) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;
            java.lang.String type = fullTypeName.substring(((fullTypeName.indexOf(":")) + 1));
            if (!("CreateDocumentReq".equals(type))) {
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return ((hr.ponge.pfa.axis.core.operations.CreateDocumentReq)
                  (hr.ponge.pfa.axis.ExtensionMapper.getTypeObject(nsUri, type, reader)));
            }
          }
        }
        java.util.Vector handledAttributes = new java.util.Vector();
        reader.next();
        while ((!(reader.isStartElement())) && (!(reader.isEndElement()))) reader.next();
        if ((reader.isStartElement())
            && (new javax.xml.namespace.QName(
                    "http://ponge.hr/pfa/axis/core/operations", "document")
                .equals(reader.getName()))) {
          object.setDocument(hr.ponge.pfa.axis.core.Document.Factory.parse(reader));
          reader.next();
        } else {
          throw new org.apache.axis2.databinding.ADBException(
              ("Unexpected subelement " + (reader.getName())));
        }
        while ((!(reader.isStartElement())) && (!(reader.isEndElement()))) reader.next();
        if (reader.isStartElement())
          throw new org.apache.axis2.databinding.ADBException(
              ("Unexpected subelement " + (reader.getName())));

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }
      return object;
    }
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static EnumMWSAttributeFormCategories_type0 parse(
        javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {
      EnumMWSAttributeFormCategories_type0 object = null;
      // initialize a hash map to keep values
      java.util.Map attributeMap = new java.util.HashMap();
      java.util.List extraAttributeList = new java.util.ArrayList();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        // Note all attributes that were handled. Used to differ normal
        // attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        while (!reader.isEndElement()) {
          if (reader.isStartElement() || reader.hasText()) {

            java.lang.String content = reader.getElementText();

            if (content.indexOf(":") > 0) {
              // this seems to be a Qname so find the namespace
              // and send
              prefix = content.substring(0, content.indexOf(":"));
              namespaceuri = reader.getNamespaceURI(prefix);
              object =
                  EnumMWSAttributeFormCategories_type0.Factory.fromString(content, namespaceuri);
            } else {
              // this seems to be not a qname send and empty
              // namespace incase of it is
              // check is done in fromString method
              object = EnumMWSAttributeFormCategories_type0.Factory.fromString(content, "");
            }

          } else {
            reader.next();
          }
        } // end of while loop

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static GetServerListForActivity parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      GetServerListForActivity object = new GetServerListForActivity();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"getServerListForActivity".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (GetServerListForActivity)
                  org.wso2.carbon.bam.ExtensionMapper.getTypeObject(nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
Ejemplo n.º 9
0
 private static final java.lang.String mangle(java.lang.String s, Ceylon ann) {
   int i = s.indexOf("$");
   if (i > 0) {
     s = s.substring(0, i) + s.substring(i + 1);
   }
   if (s.endsWith("_") && ann != null) {
     s = s.substring(0, s.length() - 1);
   }
   return s;
 }
Ejemplo n.º 10
0
 protected java.lang.String doRequest(java.lang.String s, boolean flag, java.lang.String s1)
     throws java.lang.Exception {
   if (s == null) {
     throw new Exception("Paramater uri cannot be null");
   }
   com.dragonflow.Utils.SocketSession socketsession =
       com.dragonflow.Utils.SocketSession.getSession(null);
   java.lang.StringBuffer stringbuffer = new StringBuffer(10000);
   java.lang.String s2 = "http://" + getConnID() + s;
   jgl.Array array = null;
   if (s1 != null) {
     array = new Array();
     array.add("Custom-Content: " + s1);
   }
   long al[] =
       com.dragonflow.StandardMonitor.URLMonitor.checkURL(
           socketsession,
           s2,
           null,
           null,
           null,
           null,
           null,
           array,
           null,
           null,
           null,
           stringbuffer,
           0x989680L,
           null,
           0,
           60000,
           null);
   java.lang.String s3 =
       com.dragonflow.StandardMonitor.URLMonitor.getHTTPContent(stringbuffer.toString());
   if (al[0] == 200L) {
     s3 = s3.trim();
     if (s3.startsWith("<") && flag) {
       java.lang.String s5 = s3.substring(0, 50);
       java.lang.String s4;
       if (s3.indexOf("<P>") >= 0) {
         xmlKeys = xmlShortKeys;
         s4 = "J2EEGetListShort.xsl";
       } else {
         xmlKeys = xmlLongKeys;
         s4 = "J2EEGetList.xsl";
       }
       return J2EEConnection.transform(s3, "templates.applications/" + s4);
     } else {
       return s3;
     }
   } else {
     throw new Exception(com.dragonflow.StandardMonitor.URLMonitor.lookupStatus(al[0]));
   }
 }
Ejemplo n.º 11
0
  /**
   * RatesSetting de-serialization from input byte array
   *
   * @param ab Byte Array
   * @throws java.lang.Exception Thrown if RatesSetting cannot be properly de-serialized
   */
  public RatesSetting(final byte[] ab) throws java.lang.Exception {
    if (null == ab || 0 == ab.length)
      throw new java.lang.Exception("RatesSetting de-serializer: Invalid input Byte array");

    java.lang.String strRawString = new java.lang.String(ab);

    if (null == strRawString || strRawString.isEmpty())
      throw new java.lang.Exception("RatesSetting de-serializer: Empty state");

    java.lang.String strSerializedRatesSetting =
        strRawString.substring(0, strRawString.indexOf(getObjectTrailer()));

    if (null == strSerializedRatesSetting || strSerializedRatesSetting.isEmpty())
      throw new java.lang.Exception("RatesSetting de-serializer: Cannot locate state");

    java.lang.String[] astrField =
        org.drip.math.common.StringUtil.Split(strSerializedRatesSetting, getFieldDelimiter());

    if (null == astrField || 5 > astrField.length)
      throw new java.lang.Exception("RatesSetting de-serializer: Invalid reqd field set");

    // double dblVersion = new java.lang.Double (astrField[0]);

    if (null == astrField[1]
        || astrField[1].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[1]))
      throw new java.lang.Exception("RatesSetting de-serializer: Cannot locate Trade Currency");

    _strTradeDiscountCurve = astrField[1];

    if (null == astrField[2]
        || astrField[2].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[2]))
      throw new java.lang.Exception("RatesSetting de-serializer: Cannot locate Coupon Currency");

    _strCouponDiscountCurve = astrField[2];

    if (null == astrField[3]
        || astrField[3].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[3]))
      throw new java.lang.Exception("RatesSetting de-serializer: Cannot locate Principal Currency");

    _strPrincipalDiscountCurve = astrField[3];

    if (null == astrField[4]
        || astrField[4].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[4]))
      throw new java.lang.Exception(
          "RatesSetting de-serializer: Cannot locate Redemption Currency");

    _strRedemptionDiscountCurve = astrField[4];

    if (!validate()) throw new java.lang.Exception("RatesSetting de-serializer: Cannot validate!");
  }
Ejemplo n.º 12
0
 public TreeNode(java.util.Map map, java.lang.String s) throws java.lang.Exception {
   this(map);
   int i = s.indexOf(": ");
   if (i < 0) {
     throw new Exception("Invalid node name, ': ' expected: " + s);
   } else {
     cls = s.substring(0, i);
     name = s.substring(i + 2);
     return;
   }
 }
  /**
   * TerminationSetting de-serialization from input byte array
   *
   * @param ab Byte Array
   * @throws java.lang.Exception Thrown if TerminationSetting cannot be properly de-serialized
   */
  public TerminationSetting(final byte[] ab) throws java.lang.Exception {
    if (null == ab || 0 == ab.length)
      throw new java.lang.Exception("TerminationSetting de-serializer: Invalid input Byte array");

    java.lang.String strRawString = new java.lang.String(ab);

    if (null == strRawString || strRawString.isEmpty())
      throw new java.lang.Exception("TerminationSetting de-serializer: Empty state");

    java.lang.String strSerializedTerminationSetting =
        strRawString.substring(0, strRawString.indexOf(getObjectTrailer()));

    if (null == strSerializedTerminationSetting || strSerializedTerminationSetting.isEmpty())
      throw new java.lang.Exception("TerminationSetting de-serializer: Cannot locate state");

    java.lang.String[] astrField =
        org.drip.quant.common.StringUtil.Split(
            strSerializedTerminationSetting, getFieldDelimiter());

    if (null == astrField || 4 > astrField.length)
      throw new java.lang.Exception("TerminationSetting de-serializer: Invalid reqd field set");

    // double dblVersion = new java.lang.Double (astrField[0]);

    if (null == astrField[1]
        || astrField[1].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[1]))
      throw new java.lang.Exception(
          "TerminationSetting de-serializer: Cannot locate perpetual flag");

    _bIsPerpetual = new java.lang.Boolean(astrField[1]);

    if (null == astrField[2]
        || astrField[2].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[2]))
      throw new java.lang.Exception(
          "TerminationSetting de-serializer: Cannot locate defaulted flag");

    _bIsDefaulted = new java.lang.Boolean(astrField[2]);

    if (null == astrField[3]
        || astrField[3].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[3]))
      throw new java.lang.Exception(
          "TerminationSetting de-serializer: Cannot locate exercised flag");

    _bHasBeenExercised = new java.lang.Boolean(astrField[3]);

    if (!validate())
      throw new java.lang.Exception("TerminationSetting de-serializer: Cannot validate!");
  }
Ejemplo n.º 14
0
 public java.lang.String getMetricList(java.lang.StringBuffer stringbuffer) {
   java.lang.String s;
   try {
     s = doRequest("/?id=10&type=0", true, null);
   } catch (java.lang.Exception exception) {
     stringbuffer.append(exception.getMessage());
     return "";
   }
   int i = s.indexOf("<browse_data>");
   if (i > 0) {
     s = s.substring(i);
   }
   return s;
 }
Ejemplo n.º 15
0
 public void getMetricData(boolean flag) {
   java.lang.String s;
   try {
     s = doRequest("/?id=11&type=0", false, null);
   } catch (java.lang.Exception exception) {
     com.dragonflow.Log.LogManager.log(
         "error",
         "J2EEConnection: Failed to retrieve data from target "
             + getConnID()
             + ": "
             + exception.getMessage());
     lastError = "Failed to retrieve data from server: " + exception.getMessage();
     return;
   }
   if (s.indexOf("Results are null. No measurements were selected") >= 0) {
     if (flag) {
       com.dragonflow.Log.LogManager.log(
           "RunMonitor",
           "J2EEConnection: No measuements were selected for target "
               + getConnID()
               + ". Reposting metric list.");
       postMetricList();
       getMetricData(false);
     } else {
       com.dragonflow.Log.LogManager.log(
           "error",
           "J2EEConnection: No measuements were selected for target "
               + getConnID()
               + ". Reposting metric list did not solve problem. Aborting...");
       lastError = "Internal error, see log for details";
     }
   } else {
     try {
       handleMetricData(s);
       lastError = null;
     } catch (java.lang.Exception exception1) {
       exception1.printStackTrace();
       com.dragonflow.Log.LogManager.log(
           "error",
           "J2EEConnection: Error while parsing metric data from "
               + getConnID()
               + ": "
               + exception1.getMessage());
       lastError = "Failed to parse metric data: " + exception1.getMessage();
     }
   }
 }
Ejemplo n.º 16
0
 public void addValue(
     com.beust.jcommander.Parameterized parameterized,
     java.lang.Object object,
     java.lang.Object value) {
   if (m_parameter != null) {
     parameterized.set(object, value);
   } else {
     java.lang.String a = m_dynamicParameter.assignment();
     java.lang.String sv = value.toString();
     int aInd = sv.indexOf(a);
     if (aInd == -1) {
       throw new com.beust.jcommander.ParameterException(
           "Dynamic parameter expected a value of the form a" + a + "b" + " but got:" + sv);
     }
     callPut(object, parameterized, sv.substring(0, aInd), sv.substring(aInd * 1));
   }
 }
Ejemplo n.º 17
0
  private boolean checkForInvalidTryBlock(ExceptionTable table, ArrayList list) {

    for (int z = 0; z < list.size(); z++) {
      ExceptionTable t = (ExceptionTable) list.get(z);
      if (t != table) {
        java.lang.String type = t.getHandlerBlockName();
        if (type != null && type.indexOf("Catch") != -1) {
          int cstart = t.getStartOfHandler();
          int tend = t.getEndPC();
          int thisStart = table.getStartPC();
          // java.lang.String thisType=table.getHandlerBlockName();
          if (thisStart > tend && thisStart < cstart && cstart == table.getStartOfHandler()) {
            return true;
          }
        }
      }
    }
    return false;
  }
  /**
   * De-serialize the FloatFloatComponent from the byte array
   *
   * @param ab Byte Array
   * @throws java.lang.Exception Thrown if the FloatFloatComponent cannot be de-serialized from the
   *     byte array
   */
  public FloatFloatComponent(final byte[] ab) throws java.lang.Exception {
    if (null == ab || 0 == ab.length)
      throw new java.lang.Exception("FloatFloatComponent de-serializer: Invalid input Byte array");

    java.lang.String strRawString = new java.lang.String(ab);

    if (null == strRawString || strRawString.isEmpty())
      throw new java.lang.Exception("FloatFloatComponent de-serializer: Empty state");

    java.lang.String strSerializedFloatFloatComponent =
        strRawString.substring(0, strRawString.indexOf(getObjectTrailer()));

    if (null == strSerializedFloatFloatComponent || strSerializedFloatFloatComponent.isEmpty())
      throw new java.lang.Exception("FloatFloatComponent de-serializer: Cannot locate state");

    java.lang.String[] astrField =
        org.drip.quant.common.StringUtil.Split(
            strSerializedFloatFloatComponent, getFieldDelimiter());

    if (null == astrField || 3 > astrField.length)
      throw new java.lang.Exception("FloatFloatComponent de-serializer: Invalid reqd field set");

    // double dblVersion = new java.lang.Double (astrField[0]).doubleValue();

    if (null == astrField[1] || astrField[1].isEmpty())
      throw new java.lang.Exception(
          "FloatFloatComponent de-serializer: Cannot locate visible floating stream");

    if (org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[1]))
      _floatReference = null;
    else _floatReference = new org.drip.product.rates.FloatingStream(astrField[1].getBytes());

    if (null == astrField[2] || astrField[2].isEmpty())
      throw new java.lang.Exception(
          "FloatFloatComponent de-serializer: Cannot locate work-out floating stream");

    if (org.drip.service.stream.Serializer.NULL_SER_STRING.equalsIgnoreCase(astrField[2]))
      _floatDerived = null;
    else _floatDerived = new org.drip.product.rates.FloatingStream(astrField[2].getBytes());
  }
  /**
   * De-serialization of DateAdjustParams from byte stream
   *
   * @param ab Byte stream
   * @throws java.lang.Exception Thrown if cannot properly de-serialize DateAdjustParams
   */
  public DateAdjustParams(final byte[] ab) throws java.lang.Exception {
    if (null == ab || 0 == ab.length)
      throw new java.lang.Exception("DateAdjustParams de-serialize: Invalid byte stream input");

    java.lang.String strRawString = new java.lang.String(ab);

    if (null == strRawString || strRawString.isEmpty())
      throw new java.lang.Exception("DateAdjustParams de-serializer: Empty state");

    java.lang.String strDAP = strRawString.substring(0, strRawString.indexOf(getObjectTrailer()));

    if (null == strDAP || strDAP.isEmpty())
      throw new java.lang.Exception("DateAdjustParams de-serializer: Cannot locate state");

    java.lang.String[] astrField =
        org.drip.analytics.support.GenericUtil.Split(strDAP, getFieldDelimiter());

    if (null == astrField || 3 > astrField.length)
      throw new java.lang.Exception("DateAdjustParams de-serialize: Invalid number of fields");

    // double dblVersion = new java.lang.Double (astrField[0]);

    if (null == astrField[1]
        || astrField[1].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equals(astrField[1]))
      throw new java.lang.Exception("DateAdjustParams de-serializer: Cannot locate roll mode");

    _iRollMode = new java.lang.Integer(astrField[1]).intValue();

    if (null == astrField[2]
        || astrField[2].isEmpty()
        || org.drip.service.stream.Serializer.NULL_SER_STRING.equals(astrField[2]))
      throw new java.lang.Exception("DateAdjustParams de-serializer: Cannot locate calendar");

    _strCalendar = astrField[2];
  }
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static DescribeSoqlListViewResult parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      DescribeSoqlListViewResult object = new DescribeSoqlListViewResult();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"DescribeSoqlListViewResult".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (DescribeSoqlListViewResult)
                  com.salesforce.soap.partner.sobject.ExtensionMapper.getTypeObject(
                      nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        java.util.ArrayList list1 = new java.util.ArrayList();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("urn:partner.soap.sforce.com", "describeSoqlListViews")
                .equals(reader.getName())) {

          // Process the array and step past its final element's end.
          list1.add(com.salesforce.soap.partner.DescribeSoqlListView.Factory.parse(reader));

          // loop until we find a start element that is not part of this array
          boolean loopDone1 = false;
          while (!loopDone1) {
            // We should be at the end element, but make sure
            while (!reader.isEndElement()) reader.next();
            // Step out of this element
            reader.next();
            // Step to next element event.
            while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
            if (reader.isEndElement()) {
              // two continuous end elements means we are exiting the xml structure
              loopDone1 = true;
            } else {
              if (new javax.xml.namespace.QName(
                      "urn:partner.soap.sforce.com", "describeSoqlListViews")
                  .equals(reader.getName())) {
                list1.add(com.salesforce.soap.partner.DescribeSoqlListView.Factory.parse(reader));

              } else {
                loopDone1 = true;
              }
            }
          }
          // call the converter utility to convert and set the array

          object.setDescribeSoqlListViews(
              (com.salesforce.soap.partner.DescribeSoqlListView[])
                  org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                      com.salesforce.soap.partner.DescribeSoqlListView.class, list1));

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
Ejemplo n.º 21
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static XGetUserOutput parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      XGetUserOutput object = new XGetUserOutput();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"XGetUserOutput".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (XGetUserOutput)
                  vng.zingme.payment.paymentgateway.push.ws.ExtensionMapper.getTypeObject(
                      nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("", "code").equals(reader.getName())) {

          java.lang.String content = reader.getElementText();

          object.setCode(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("", "userID").equals(reader.getName())) {

          java.lang.String content = reader.getElementText();

          object.setUserID(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static RemoveUserFromApplication parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      RemoveUserFromApplication object = new RemoveUserFromApplication();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"removeUserFromApplication".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (RemoveUserFromApplication)
                  org.wso2.carbon.appfactory.application.mgt.service.xsd.ExtensionMapper
                      .getTypeObject(nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName(
                    "http://service.mgt.application.appfactory.carbon.wso2.org", "applicationId")
                .equals(reader.getName())) {

          nillableValue =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
          if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {

            java.lang.String content = reader.getElementText();

            object.setApplicationId(
                org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          } else {

            reader.getElementText(); // throw away text nodes if any.
          }

          reader.next();

        } // End of if for expected property start element
        else {

        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName(
                    "http://service.mgt.application.appfactory.carbon.wso2.org", "userName")
                .equals(reader.getName())) {

          nillableValue =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
          if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) {

            java.lang.String content = reader.getElementText();

            object.setUserName(
                org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          } else {

            reader.getElementText(); // throw away text nodes if any.
          }

          reader.next();

        } // End of if for expected property start element
        else {

        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static DelUserProfileResponse parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      DelUserProfileResponse object = new DelUserProfileResponse();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"DelUserProfileResponse".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (DelUserProfileResponse)
                  edu.fiu.cis.acrl.virtuallabs.ws.ExtensionMapper.getTypeObject(
                      nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("http://acrl.cis.fiu.edu/virtuallabs/ws", "success")
                .equals(reader.getName())) {

          java.lang.String content = reader.getElementText();

          object.setSuccess(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("http://acrl.cis.fiu.edu/virtuallabs/ws", "reason")
                .equals(reader.getName())) {

          java.lang.String content = reader.getElementText();

          object.setReason(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
Ejemplo n.º 24
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static hr.ponge.pfa.axis.env.operations.UpdateUserResp parse(
        javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {
      hr.ponge.pfa.axis.env.operations.UpdateUserResp object =
          new hr.ponge.pfa.axis.env.operations.UpdateUserResp();
      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {
        while ((!(reader.isStartElement())) && (!(reader.isEndElement()))) reader.next();
        if ((reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type"))
            != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if ((fullTypeName.indexOf(":")) > (-1)) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;
            java.lang.String type = fullTypeName.substring(((fullTypeName.indexOf(":")) + 1));
            if (!("UpdateUserResp".equals(type))) {
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return ((hr.ponge.pfa.axis.env.operations.UpdateUserResp)
                  (hr.ponge.pfa.axis.ExtensionMapper.getTypeObject(nsUri, type, reader)));
            }
          }
        }
        java.util.Vector handledAttributes = new java.util.Vector();
        reader.next();
        java.util.ArrayList list2 = new java.util.ArrayList();
        while ((!(reader.isStartElement())) && (!(reader.isEndElement()))) reader.next();
        if ((reader.isStartElement())
            && (new javax.xml.namespace.QName("http://ponge.hr/pfa/axis/env/operations", "user")
                .equals(reader.getName()))) {
          object.setUser(hr.ponge.pfa.axis.env.User.Factory.parse(reader));
          reader.next();
        } else {
        }
        while ((!(reader.isStartElement())) && (!(reader.isEndElement()))) reader.next();
        if ((reader.isStartElement())
            && (new javax.xml.namespace.QName("http://ponge.hr/pfa/axis/env/operations", "errors")
                .equals(reader.getName()))) {
          list2.add(hr.ponge.pfa.axis.base.ErrorType.Factory.parse(reader));
          boolean loopDone2 = false;
          while (!loopDone2) {
            while (!(reader.isEndElement())) reader.next();
            reader.next();
            while ((!(reader.isStartElement())) && (!(reader.isEndElement()))) reader.next();
            if (reader.isEndElement()) {
              loopDone2 = true;
            } else {
              if (new javax.xml.namespace.QName("http://ponge.hr/pfa/axis/env/operations", "errors")
                  .equals(reader.getName())) {
                list2.add(hr.ponge.pfa.axis.base.ErrorType.Factory.parse(reader));
              } else {
                loopDone2 = true;
              }
            }
          }
          object.setErrors(
              ((hr.ponge.pfa.axis.base.ErrorType[])
                  (org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                      hr.ponge.pfa.axis.base.ErrorType.class, list2))));
        } else {
        }
        while ((!(reader.isStartElement())) && (!(reader.isEndElement()))) reader.next();
        if (reader.isStartElement())
          throw new org.apache.axis2.databinding.ADBException(
              ("Unexpected subelement " + (reader.getName())));

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }
      return object;
    }
Ejemplo n.º 25
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static DateTime parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      DateTime object = new DateTime();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"dateTime".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (DateTime)
                  org.apache.axis2.databinding.types.soapencoding.ExtensionMapper.getTypeObject(
                      nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        while (!reader.isEndElement()) {
          if (reader.isStartElement() || reader.hasText()) {

            if (reader.isStartElement() || reader.hasText()) {

              java.lang.String content = reader.getElementText();

              object.setDateTime(
                  org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(content));

            } // End of if for expected property start element
            else {
              // A start element we are not expecting indicates an invalid parameter was passed
              throw new org.apache.axis2.databinding.ADBException(
                  "Unexpected subelement " + reader.getLocalName());
            }

          } else {
            reader.next();
          }
        } // end of while loop

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
Ejemplo n.º 26
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static SimpleReference parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      SimpleReference object = new SimpleReference();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"SimpleReference".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (SimpleReference)
                  org.csapi.www.schema.parlayx.sms.send.v2_2.local.ExtensionMapper.getTypeObject(
                      nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("", "endpoint").equals(reader.getName())) {

          nillableValue =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
          if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
            throw new org.apache.axis2.databinding.ADBException(
                "The element: " + "endpoint" + "  cannot be null");
          }

          java.lang.String content = reader.getElementText();

          object.setEndpoint(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToAnyURI(content));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("", "interfaceName").equals(reader.getName())) {

          nillableValue =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
          if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
            throw new org.apache.axis2.databinding.ADBException(
                "The element: " + "interfaceName" + "  cannot be null");
          }

          java.lang.String content = reader.getElementText();

          object.setInterfaceName(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("", "correlator").equals(reader.getName())) {

          nillableValue =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
          if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
            throw new org.apache.axis2.databinding.ADBException(
                "The element: " + "correlator" + "  cannot be null");
          }

          java.lang.String content = reader.getElementText();

          object.setCorrelator(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static GetCityForecastByZIPResponse parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      GetCityForecastByZIPResponse object = new GetCityForecastByZIPResponse();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"GetCityForecastByZIPResponse".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (GetCityForecastByZIPResponse)
                  com.cdyne.ws.weatherws.ExtensionMapper.getTypeObject(nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName(
                    "http://ws.cdyne.com/WeatherWS/", "GetCityForecastByZIPResult")
                .equals(reader.getName())) {

          object.setGetCityForecastByZIPResult(
              com.cdyne.ws.weatherws.ForecastReturn.Factory.parse(reader));

          reader.next();

        } // End of if for expected property start element
        else {

        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
Ejemplo n.º 28
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static EchoArrayResponse parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      EchoArrayResponse object = new EchoArrayResponse();

      int event;
      javax.xml.namespace.QName currentQName = null;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";

      try {
        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        currentQName = reader.getName();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");

          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;

            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }

            nsPrefix = (nsPrefix == null) ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"echoArrayResponse".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);

              return (EchoArrayResponse)
                  edu.ucsb.cs.rpc.soap.service.types.ExtensionMapper.getTypeObject(
                      nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        java.util.ArrayList list1 = new java.util.ArrayList();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("http://base.rpc.cs.ucsb.edu", "return")
                .equals(reader.getName())) {
          // Process the array and step past its final element's end.
          list1.add(reader.getElementText());

          // loop until we find a start element that is not part of this array
          boolean loopDone1 = false;

          while (!loopDone1) {
            // Ensure we are at the EndElement
            while (!reader.isEndElement()) {
              reader.next();
            }

            // Step out of this element
            reader.next();

            // Step to next element event.
            while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

            if (reader.isEndElement()) {
              // two continuous end elements means we are exiting the xml structure
              loopDone1 = true;
            } else {
              if (new javax.xml.namespace.QName("http://base.rpc.cs.ucsb.edu", "return")
                  .equals(reader.getName())) {
                list1.add(reader.getElementText());
              } else {
                loopDone1 = true;
              }
            }
          }

          // call the converter utility  to convert and set the array
          object.set_return(
              (int[])
                  org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(
                      int.class, list1));
        } // End of if for expected property start element
        else {
          // 1 - A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()) {
          // 2 - A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());
        }
      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static CreateVpnGatewayResponseType parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      CreateVpnGatewayResponseType object = new CreateVpnGatewayResponseType();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"CreateVpnGatewayResponseType".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (CreateVpnGatewayResponseType)
                  com.amazon.ec2.ExtensionMapper.getTypeObject(nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName(
                    "http://ec2.amazonaws.com/doc/2009-10-31/", "requestId")
                .equals(reader.getName())) {

          java.lang.String content = reader.getElementText();

          object.setRequestId(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName(
                    "http://ec2.amazonaws.com/doc/2009-10-31/", "vpnGateway")
                .equals(reader.getName())) {

          object.setVpnGateway(com.amazon.ec2.VpnGatewayType.Factory.parse(reader));

          reader.next();

        } // End of if for expected property start element
        else {
          // A start element we are not expecting indicates an invalid parameter was passed
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());
        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getLocalName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }
Ejemplo n.º 30
0
    /**
     * static method to create the object Precondition: If this object is an element, the current or
     * next start element starts this object and any intervening reader events are ignorable If this
     * object is not an element, it is a complex type and the reader is at the event just after the
     * outer start element Postcondition: If this object is an element, the reader is positioned at
     * its end element If this object is a complex type, the reader is positioned at the end element
     * of its outer element
     */
    public static BBVA_GET_OPR parse(javax.xml.stream.XMLStreamReader reader)
        throws java.lang.Exception {
      BBVA_GET_OPR object = new BBVA_GET_OPR();

      int event;
      java.lang.String nillableValue = null;
      java.lang.String prefix = "";
      java.lang.String namespaceuri = "";
      try {

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
          java.lang.String fullTypeName =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
          if (fullTypeName != null) {
            java.lang.String nsPrefix = null;
            if (fullTypeName.indexOf(":") > -1) {
              nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":"));
            }
            nsPrefix = nsPrefix == null ? "" : nsPrefix;

            java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":") + 1);

            if (!"BBVA_GET_OPR".equals(type)) {
              // find namespace for the prefix
              java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
              return (BBVA_GET_OPR)
                  cl.bbva.indra.proyecto.webcomexfase2.ws.seic.ExtensionMapper.getTypeObject(
                      nsUri, type, reader);
            }
          }
        }

        // Note all attributes that were handled. Used to differ normal attributes
        // from anyAttributes.
        java.util.Vector handledAttributes = new java.util.Vector();

        reader.next();

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("http://www.bbva.cl/BBVA_GET_SEIC/", "strTypPdf")
                .equals(reader.getName())) {

          nillableValue =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
          if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
            throw new org.apache.axis2.databinding.ADBException(
                "The element: " + "strTypPdf" + "  cannot be null");
          }

          java.lang.String content = reader.getElementText();

          object.setStrTypPdf(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          reader.next();

        } // End of if for expected property start element
        else {

        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement()
            && new javax.xml.namespace.QName("http://www.bbva.cl/BBVA_GET_SEIC/", "strNumOpe")
                .equals(reader.getName())) {

          nillableValue =
              reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil");
          if ("true".equals(nillableValue) || "1".equals(nillableValue)) {
            throw new org.apache.axis2.databinding.ADBException(
                "The element: " + "strNumOpe" + "  cannot be null");
          }

          java.lang.String content = reader.getElementText();

          object.setStrNumOpe(
              org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));

          reader.next();

        } // End of if for expected property start element
        else {

        }

        while (!reader.isStartElement() && !reader.isEndElement()) reader.next();

        if (reader.isStartElement())
          // A start element we are not expecting indicates a trailing invalid property
          throw new org.apache.axis2.databinding.ADBException(
              "Unexpected subelement " + reader.getName());

      } catch (javax.xml.stream.XMLStreamException e) {
        throw new java.lang.Exception(e);
      }

      return object;
    }