コード例 #1
0
  /** databinding method to get an XML representation of this object */
  public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
      throws org.apache.axis2.databinding.ADBException {

    // We can safely assume an element has only one type associated with it

    if (localArrayOfCurrencyInfo == null) {
      return new org.apache.axis2.databinding.utils.reader.NullXMLStreamReader(MY_QNAME);
    } else {
      return localArrayOfCurrencyInfo.getPullParser(MY_QNAME);
    }
  }
コード例 #2
0
  public void serialize(
      final javax.xml.namespace.QName parentQName,
      final org.apache.axiom.om.OMFactory factory,
      org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
      boolean serializeType)
      throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException {

    // We can safely assume an element has only one type associated with it

    if (localArrayOfCurrencyInfo == null) {
      java.lang.String namespace = "http://api.eyeblaster.com/V1/DataContracts";

      if (!namespace.equals("")) {
        java.lang.String prefix = xmlWriter.getPrefix(namespace);

        if (prefix == null) {
          prefix = generatePrefix(namespace);

          xmlWriter.writeStartElement(prefix, "ArrayOfCurrencyInfo", namespace);
          xmlWriter.writeNamespace(prefix, namespace);
          xmlWriter.setPrefix(prefix, namespace);

        } else {
          xmlWriter.writeStartElement(namespace, "ArrayOfCurrencyInfo");
        }

      } else {
        xmlWriter.writeStartElement("ArrayOfCurrencyInfo");
      }

      // write the nil attribute
      writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter);
      xmlWriter.writeEndElement();
    } else {
      localArrayOfCurrencyInfo.serialize(MY_QNAME, factory, xmlWriter);
    }
  }