Examples of AllTypesElementImpl


Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

    result.set(Calendar.SECOND, 11);
    return DateFormat.getTimeInstance().format(result.getTime());
  }

  public String getAllSimpleTypesElementString() {
    AllTypesElementImpl elem = new AllTypesElementImpl();
    String uri = elem.getQName().getNamespaceURI();
    return
      "<ex:AllSimpleTypesElement xmlns:ex=\"" + uri + "\">" +
        "<ex:StringElem>FOO</ex:StringElem>" +
        "<ex:IntElem>3</ex:IntElem>" +
        "<ex:LongElem>-23987982739273989</ex:LongElem>" +
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

        "<ex:FloatElem>-24234.234</ex:FloatElem>" +
      "</ex:AllSimpleTypesElement>";
  }

  public String getAllTypesElementString() {
    AllTypesElementImpl elem = new AllTypesElementImpl();
    String uri = elem.getQName().getNamespaceURI();
    return
      "<ex:AllTypesElement xmlns:ex=\"" + uri + "\">\n" +
      "  <ex:AllSimpleTypesElement>\n" +
      "    <ex:StringElem>FOO</ex:StringElem>\n" +
      "    <ex:IntElem>3</ex:IntElem>\n" +
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

    marshaller.init(getFactory());
    XMLWriter xw = new XMLWriterImpl();
    StringWriter sw = new StringWriter();
    xw.setWriter(sw);
    JMXmlSerializer.Data data = marshaller.getData((JMMarshaller) factory.createMarshaller(), xw);
    AllTypesElementImpl element = new AllTypesElementImpl();
    marshaller.marshal(data, new QName(element.getQName().getNamespaceURI(), "AllSimpleTypesElement"),
                       getAllSimpleTypesElement());
    String expected = getAllSimpleTypesElementString();
    String got = sw.toString();
    assertStringEquals(expected, got);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

    marshaller.marshal(jmElement, sw);
    assertStringEquals(getAllTypesElementString(), sw.toString());
  }

  public void testPrefixes() throws Exception {
    AllTypesElementImpl el = new AllTypesElementImpl();
    JMXmlSerializer ser = new AllTypesElementTypeSerializer();
    assertStringEquals("ex", ser.getPreferredPrefix(el.getQName().getNamespaceURI()));
    assertNull(ser.getPreferredPrefix("dummyURI"));
  }
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

    result.set(Calendar.SECOND, 11);
    return DateFormat.getTimeInstance().format(result.getTime());
  }

  public String getAllSimpleTypesElementString() {
    AllTypesElementImpl elem = new AllTypesElementImpl();
    String uri = elem.getQName().getNamespaceURI();
    return
      "<ex:AllSimpleTypesElement xmlns:ex=\"" + uri + "\">" +
        "<ex:StringElem>FOO</ex:StringElem>" +
        "<ex:IntElem>3</ex:IntElem>" +
        "<ex:LongElem>-23987982739273989</ex:LongElem>" +
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

        "<ex:FloatElem>-24234.234</ex:FloatElem>" +
      "</ex:AllSimpleTypesElement>";
  }

  public String getAllTypesElementString() {
    AllTypesElementImpl elem = new AllTypesElementImpl();
    String uri = elem.getQName().getNamespaceURI();
    return
      "<ex:AllTypesElement xmlns:ex=\"" + uri + "\">\n" +
      "  <ex:AllSimpleTypesElement>\n" +
      "    <ex:StringElem>FOO</ex:StringElem>\n" +
      "    <ex:IntElem>3</ex:IntElem>\n" +
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

    marshaller.init(getFactory());
    XMLWriter xw = new XMLWriterImpl();
    StringWriter sw = new StringWriter();
    xw.setWriter(sw);
    JMXmlSerializer.Data data = marshaller.getData((JMMarshaller) factory.createMarshaller(), xw);
    AllTypesElementImpl element = new AllTypesElementImpl();
    marshaller.marshal(data, new QName(element.getQName().getNamespaceURI(), "AllSimpleTypesElement"),
                       getAllSimpleTypesElement());
    String expected = getAllSimpleTypesElementString();
    String got = sw.toString();
    assertEquals(expected, got);
  }
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

    marshaller.marshal(jmElement, sw);
    assertEquals(getAllTypesElementString(), sw.toString());
  }

  public void testPrefixes() throws Exception {
    AllTypesElementImpl el = new AllTypesElementImpl();
    JMXmlSerializer ser = new AllTypesElementTypeSerializer();
    assertEquals("ex", ser.getPreferredPrefix(el.getQName().getNamespaceURI()));
    assertNull(ser.getPreferredPrefix("dummyURI"));
  }
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

    element.setAllSimpleTypesElement(getAllSimpleTypesElement());
    return element;
  }

  private String getAllTypesElementString() {
    AllTypesElementImpl elem = new AllTypesElementImpl();
    String uri = elem.getQName().getNamespaceURI();
    return
    "<ex:AllTypesElement xmlns:ex=\"" + uri + "\">\n" +
    "  <ex:AllSimpleTypesElement>\n" +
    "    <ex:StringElem>FOO</ex:StringElem>\n" +
    "    <ex:IntElem>3</ex:IntElem>\n" +
View Full Code Here

Examples of org.apache.ws.jaxme.test.misc.enumeration.impl.AllTypesElementImpl

  }

  /** Test for proper creation of prefixes.
   */
  public void testPrefixes() throws Exception {
    AllTypesElementImpl el = new AllTypesElementImpl();
    JMSAXDriver driver = new AllTypesElementTypeDriver();
    assertEquals("ex", driver.getPreferredPrefix(el.getQName().getNamespaceURI()));
    assertNull(driver.getPreferredPrefix("dummyURI"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.