@Test public void testMarchal_withJaxbObject_shouldReturnSourceInferNameWithoutNamespacePrefix() throws Exception { final Object testObject = createComplexNode("123"); final Source saxSource = new JaxbBuilder(testObject).build(); final String xmlString = toString(saxSource); assertThat(xmlString, startsWith("<complexNode")); assertThat(xmlString, containsString("<Id>123</Id>")); }
@Override public Source build() { try { if (marshaller == null) { createDefaultMarshaller(); } final Object jaxbObject = getPreparedJaxbObject(); final JAXBSource jaxbSource = new JAXBSource(marshaller, jaxbObject); jaxbSource.setInputSource(null); return jaxbSource; } catch (final JAXBException e) { throw new DataBindingException(e); } }
JaxbBuilder implements Builder { @Override public Source build() { try { if (marshaller == null) { createDefaultMarshaller(); } final Object jaxbObject = getPreparedJaxbObject(); final JAXBSource jaxbSource = new JAXBSource(marshaller, jaxbObject); jaxbSource.setInputSource(null); return jaxbSource; } catch (final JAXBException e) { throw new DataBindingException(e); } } }
JaxbBuilder implements Builder { @Override public Source build() { try { if (marshaller == null) { createDefaultMarshaller(); } final Object jaxbObject = getPreparedJaxbObject(); final JAXBSource jaxbSource = new JAXBSource(marshaller, jaxbObject); jaxbSource.setInputSource(null); return jaxbSource; } catch (final JAXBException e) { throw new DataBindingException(e); } } protected  JaxbBuilder(final Object object); }
JaxbBuilder implements Builder { @Override public Source build() { try { if (marshaller == null) { createDefaultMarshaller(); } final Object jaxbObject = getPreparedJaxbObject(); final JAXBSource jaxbSource = new JAXBSource(marshaller, jaxbObject); jaxbSource.setInputSource(null); return jaxbSource; } catch (final JAXBException e) { throw new DataBindingException(e); } } protected  JaxbBuilder(final Object object); JaxbBuilder withMarshaller(final Marshaller marshaller); JaxbBuilder useObjectFactory(); @Override Source build(); }
JaxbBuilder implements Builder { @Override public Source build() { try { if (marshaller == null) { createDefaultMarshaller(); } final Object jaxbObject = getPreparedJaxbObject(); final JAXBSource jaxbSource = new JAXBSource(marshaller, jaxbObject); jaxbSource.setInputSource(null); return jaxbSource; } catch (final JAXBException e) { throw new DataBindingException(e); } } protected  JaxbBuilder(final Object object); JaxbBuilder withMarshaller(final Marshaller marshaller); JaxbBuilder useObjectFactory(); @Override Source build();  }