Package org.apache.commons.lang

Examples of org.apache.commons.lang.SerializationException


      {
         deserializer.parse(  );
      }
      catch ( Exception e )
      {
         throw new SerializationException( "genericDeserializationError", e );
      }

      return deserializer.getValue(  );
   }
View Full Code Here


                                  Class       javaClass )
   throws SerializationException
   {
      if ( !( element instanceof MessageElement ) )
      {
         throw new SerializationException( "unsupportedType" );
      }

      MessageElement elem = (MessageElement) element;
      if ( ( elem.getDeserializationContext(  ) != null ) && !elem.isDirty(  ) )
      {
         try
         {
            return elem.getValueAsType( elem.getType(  ),
                                        javaClass );
         }
         catch ( Exception e )
         {
            throw new SerializationException( "genericDeserializationError", e );
         }
      }
      else
      {
         ObjectDeserializationContext deserializer = new ObjectDeserializationContext( elem, javaClass );
         try
         {
            deserializer.parse(  );
         }
         catch ( Exception e )
         {
            throw new SerializationException( "genericDeserializationError", e );
         }

         return deserializer.getValue(  );
      }
   }
View Full Code Here

      {
         return XmlBeanUtils.toSOAPElement( (XmlObject) getValue(  ) );
      }
      catch ( Exception e )
      {
         throw new SerializationException( e );
      }
   }
View Full Code Here

      {
         return XmlBeanUtils.toXmlObject( headerElem );
      }
      catch ( Exception e )
      {
         throw new SerializationException( e );
      }
   }
View Full Code Here

      {
         return XmlBeanUtils.toSOAPElement( (XmlObject) getValue(  ) );
      }
      catch ( Exception e )
      {
         throw new SerializationException( e );
      }
   }
View Full Code Here

      {
         return XmlBeanUtils.toXmlObject( headerElem );
      }
      catch ( Exception e )
      {
         throw new SerializationException( e );
      }
   }
View Full Code Here

         XmlObject headerXBean = XmlBeanUtils.toXmlObject( headerElem );
         return XmlBeanUtils.getValue( headerXBean );
      }
      catch ( Exception e )
      {
         throw new SerializationException( e );
      }
   }
View Full Code Here

      {
         AnyHelper.write( writer, (MessageElement) soapElement );
      }
      catch ( Exception e )
      {
         throw new SerializationException( "genericSerializationError", e );
      }
   }
View Full Code Here

            {
               element = AnyHelper.toElement( messageElement );
            }
            catch ( Exception e )
            {
               throw new SerializationException( "genericSerializationError", e );
            }

            return element;
         }
         else
         {
            throw new SerializationException( "notImplemented" );
         }
      }
      else if ( obj instanceof Element )
      {
         Element element = (Element) obj;
         if ( ( name == null )
              || ( name.getLocalPart(  ).equals( element.getLocalName(  ) )
              && name.getNamespaceURI(  ).equals( element.getNamespaceURI(  ) ) ) )
         {
            return element;
         }
         else
         {
            throw new SerializationException( "notImplemented" );
         }
      }

      MessageElement messageElement = (MessageElement) toSOAPElement( obj, name, nillable );
      try
      {
         return AnyHelper.toElement( messageElement );
      }
      catch ( Exception e )
      {
         throw new SerializationException( "genericSerializationError", e );
      }
   }
View Full Code Here

         {
            return element;
         }
         else
         {
            throw new SerializationException( "notImplemented" );
         }
      }
      else if ( obj instanceof Element )
      {
         Element element = (Element) obj;
         if ( ( name == null )
              || ( name.getLocalPart(  ).equals( element.getLocalName(  ) )
              && name.getNamespaceURI(  ).equals( element.getNamespaceURI(  ) ) ) )
         {
            return new MessageElement( (Element) obj );
         }
         else
         {
            throw new SerializationException( "notImplemented" );
         }
      }

      if ( name == null )
      {
         throw new IllegalArgumentException( "nullArgument:name" );
      }

      MessageElement messageElement = new MessageElement(  );
      messageElement.setQName( name );
      try
      {
         messageElement.setObjectValue( obj );
      }
      catch ( Exception e )
      {
         throw new SerializationException( "genericSerializationError", e );
      }

      if ( ( obj == null ) && nillable )
      {
         try
         {
            messageElement.addAttribute( Constants.NS_PREFIX_SCHEMA_XSI, Constants.URI_DEFAULT_SCHEMA_XSI, "nil",
                                         "true" );
         }
         catch ( Exception e )
         {
            throw new SerializationException( "genericSerializationError", e );
         }
      }

      return messageElement;
   }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.SerializationException

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.