Examples of JaxbIntros


Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

      populateBindingCustomization(introsConfigStream, null, customization);
   }

   public static void populateBindingCustomization(InputStream introsConfigStream, String namespace, Map<String, Object> customization)
   {
      JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
      IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
      String defaultNamespace = namespace != null ? namespace : jaxbIntros.getDefaultNamespace();

      customization.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
      if (defaultNamespace != null)
      {
         customization.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

         }
      }
     
      try {
         if(introsConfigStream != null) {
            JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
            IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
            String defaultNamespace = jaxbIntros.getDefaultNamespace();
            BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();

            jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
            if(defaultNamespace != null) {
               jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

      String reqString =
        "   <ns1:user xmlns:ns1='http://org.jboss.ws/provider' string='Kermit'>" +
          "      <qname>The Frog</qname>" +
          "    </ns1:user>";

      JaxbIntros config = IntroductionsConfigParser.parseConfig(
        new FileInputStream("resources/jaxws/jaxbintros/WEB-INF/jaxb-intros.xml")
      );
     
      IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
      Map<String, Object> jaxbConfig = new HashMap<String, Object>();
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

* @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
*/
public class IntroductionsConfigParserUnitTest extends TestCase {

    public void test() throws ConfigurationException {
        JaxbIntros config = IntroductionsConfigParser.parseConfig(getClass().getResourceAsStream("intro-config-01.xml"));

        assertEquals("http://jbossesb.x.jboss.org", config.getDefaultNamespace());
        assertEquals(2, config.getClazz().size());
        ClassIntroConfig classIntroConfig = config.getClazz().get(0);
        assertEquals(TestBean1.class.getName(), classIntroConfig.getName());
        assertEquals("http://jbossesb.y.jboss.org", classIntroConfig.getXmlType().getNamespace());
        assertEquals(1, classIntroConfig.getMethod().size());

        // Could add more tests here but we're OK for now... JAXB seems to be working fine and
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

* @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly@jboss.com</a>
*/
public class IntroductionsAnnotationReaderUnitTest extends TestCase {

    public void test_annotation_intro() throws ConfigurationException, NoSuchMethodException, NoSuchFieldException {
        JaxbIntros config = IntroductionsConfigParser.parseConfig(getClass().getResourceAsStream("intro-config-02.xml"));
        IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
        Method testBean1Method = TestBean1.class.getMethod("getOrderDate");
        Field testBean2Field = TestBean2.class.getField("orderNumber");

        assertTrue("Failed", reader.hasClassAnnotation(TestBean1.class, XmlType.class));
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

        xmlAttribute = reader.getFieldAnnotation(XmlAttribute.class, testBean2Field, null);
        assertEquals("http://jbossesb.org", xmlAttribute.namespace());
    }

    public void test_jaxb_unmarshal() throws ConfigurationException, JAXBException {
        JaxbIntros config = IntroductionsConfigParser.parseConfig(getClass().getResourceAsStream("intro-config-03.xml"));
        IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
        Map<String, Object> jaxbConfig = new HashMap<String, Object>();

        jaxbConfig.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.esb/namespace2");
        jaxbConfig.put(JAXBRIContext.ANNOTATION_READER, reader);
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

      String reqString =
         "   <ns1:user xmlns:ns1='http://org.jboss.ws/provider' string='Kermit'>" +
         "      <qname>The Frog</qname>" +
         "    </ns1:user>";

      JaxbIntros config = IntroductionsConfigParser.parseConfig(new FileInputStream(getResourceFile("jaxws/jaxbintros/WEB-INF/jaxb-intros.xml").getPath()));

      IntroductionsAnnotationReader reader = new IntroductionsAnnotationReader(config);
      Map<String, Object> jaxbConfig = new HashMap<String, Object>();

      jaxbConfig.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.ws/provider");
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

      try
      {

         if(introsConfigStream != null)
         {
            JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
            IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
            String defaultNamespace = jaxbIntros.getDefaultNamespace();
            BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();

            jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
            if(defaultNamespace != null) {
               jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

      try
      {

         if(introsConfigStream != null)
         {
            JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
            IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
            String defaultNamespace = jaxbIntros.getDefaultNamespace();
            BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();

            jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
            if(defaultNamespace != null) {
               jaxbCustomizations.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespace);
View Full Code Here

Examples of org.jboss.jaxb.intros.configmodel.JaxbIntros

/*    */       }
/*    */     }
/*    */     try
/*    */     {
/* 68 */       if (introsConfigStream != null) {
/* 69 */         JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
/* 70 */         IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
/* 71 */         String defaultNamespace = jaxbIntros.getDefaultNamespace();
/* 72 */         jaxbCustomizations = new JAXBBindingCustomization();
/*    */
/* 74 */         jaxbCustomizations.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
/* 75 */         if (defaultNamespace != null) {
/* 76 */           jaxbCustomizations.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNamespace);
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.