Package org.jboss.ws.core.jaxrpc.binding.jbossxb

Examples of org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl


   private JBossXBMarshaller marshaller;

   public JBossXBSerializer() throws BindingException
   {
      // Get the JAXB marshaller for complex objects
      marshaller = new JBossXBMarshallerImpl();
   }
View Full Code Here


   private JBossXBMarshaller marshaller;

   public JBossXBSerializer() throws BindingException
   {
      // Get the JAXB marshaller for complex objects
      marshaller = new JBossXBMarshallerImpl();
   }
View Full Code Here

//      XSModel model = XsdBinder.loadSchema("<schema targetNamespace='http://org.jboss.ws/types' " + SCHEMA_NAMESPACES
//      + " xmlns:tns='http://org.jboss.ws/types'>" + " <complexType name='BigDecimalArray'>" + "  <sequence>"
//      + "   <element name='value' type='decimal' nillable='true' minOccurs='0' maxOccurs='unbounded'/>" + "  </sequence>"
//      + " </complexType>" + "</schema>", "UTF-8");
      StringWriter strwr;
      JBossXBMarshallerImpl marshaller = new JBossXBMarshallerImpl();
      marshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
      marshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
      marshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
      marshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

      strwr = new StringWriter();
      marshaller.marshal(objArr, strwr);

      String was = strwr.toString();
      assertNotNull("Resulting fragment cannot be null", was);
      assertTrue("Resulting fragment cannot be empty", was.length() > 0);
View Full Code Here

      Calendar[] objArr = new Calendar[] { cal1, cal2, cal3 };

      XSModel model = generateSchemaXSModel(xmlType, Calendar[].class);

      StringWriter strwr;
      JBossXBMarshallerImpl marshaller = new JBossXBMarshallerImpl();
      marshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
      marshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
      marshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
      marshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

      strwr = new StringWriter();
      marshaller.marshal(objArr, strwr);

      String was = strwr.toString();
      assertNotNull("Resulting fragment cannot be null", was);
      assertTrue("Resulting fragment cannot be empty", was.length() > 0);
View Full Code Here

      QName xmlName = new QName(TARGET_NAMESPACE, "SimpleUser", "ns1");
      QName xmlType = new QName(TARGET_NAMESPACE, "SimpleUserType", "ns1");

      XSModel model = generateSchemaXSModel(xmlType, SimpleUserType.class);
      StringWriter strwr;
      JBossXBMarshallerImpl marshaller = new JBossXBMarshallerImpl();
      marshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
      marshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
      marshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
      marshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

      strwr = new StringWriter();
      marshaller.marshal(obj, strwr);

      String was = strwr.toString();
      assertNotNull("Resulting fragment cannot be null", was);
      assertTrue("Resulting fragment cannot be empty", was.length() > 0);
      return was;
View Full Code Here

      XSModel model = generateSchemaXSModel(xmlType, SimpleUserType.class);

      StringWriter strwr;
      try
      {
         JBossXBMarshallerImpl marshaller = new JBossXBMarshallerImpl();
         marshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
         marshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
         marshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
         marshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

         strwr = new StringWriter();
         marshaller.marshal(obj, strwr);
         fail("The given root element name must be prefix qualified");
      }
      catch (RuntimeException ex)
      {
         // expected: The given root element name must be prefix qualified
View Full Code Here

      QName xmlType = new QName(TARGET_NAMESPACE, "echoString", "ns1");

      XSModel model = getSchemaModel();

      StringWriter strwr;
      JBossXBMarshallerImpl marshaller = new JBossXBMarshallerImpl();
      marshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
      marshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
      marshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
      marshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

      strwr = new StringWriter();
      marshaller.marshal(req, strwr);

      String exp = "<ns1:echoString xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>"
            + " <String_1>Hello</String_1>" + " <String_2>world!</String_2>" + "</ns1:echoString>";
      String was = strwr.toString();
View Full Code Here

            new QName("http://ns4", "local4", "ns4") };

      XSModel model = generateSchemaXSModel(xmlType, QName[].class);

      StringWriter strwr;
      JBossXBMarshallerImpl marshaller = new JBossXBMarshallerImpl();
      marshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
      marshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
      marshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
      marshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

      strwr = new StringWriter();
      marshaller.marshal(objArr, strwr);

      String was = strwr.toString();
      assertNotNull("Resulting fragment cannot be null", was);
      assertTrue("Resulting fragment cannot be empty", was.length() > 0);
View Full Code Here

      QName xmlType = new QName(TARGET_NAMESPACE, "Base", "ns1");

      XSModel model = getSchemaModel(xmlType, Base.class);

      StringWriter strwr;
      JBossXBMarshallerImpl marshaller = new JBossXBMarshallerImpl();
      marshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
      marshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
      marshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
      marshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

      strwr = new StringWriter();
      marshaller.marshal(obj, strwr);

      String exp =
         "<ns1:Base_1 xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
         " <a>100</a>" +
         " <b>200</b>" +
View Full Code Here

      QName xmlType = new QName(TARGET_NAMESPACE, "Derived", "ns1");

      XSModel model = getSchemaModel(xmlType, Derived.class);

      StringWriter strwr;
      JBossXBMarshallerImpl marshaller = new JBossXBMarshallerImpl();
      marshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
      marshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
      marshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
      marshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, getJavaWSDLMapping());

      strwr = new StringWriter();
      marshaller.marshal(obj, strwr);

      String exp =
         "<ns1:Derived_1 xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
         " <a>100</a>" +
         " <b>200</b>" +
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl

Copyright © 2018 www.massapicom. 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.