Package org.apache.commons.lang

Examples of org.apache.commons.lang.SerializationException


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


        {
            return XmlBeanUtils.toSOAPElementArray( (XmlObject[]) m_propElems.toArray( new XmlObject[0] ) );
        }
        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

      {
         return AnyHelper.toString( messageElement );
      }
      catch ( Exception e )
      {
         throw new SerializationException( "genericSerializationError", e );
      }
   }
View Full Code Here

                                 Class javaClass )
   throws SerializationException
   {
      if ( ( type == null ) && ( javaClass == null ) )
      {
         throw new SerializationException( "typeOrClassRequired" );
      }

      if ( type != null )
      {
         // Use the xmlType to get the deserializer.
View Full Code Here

      setDeserializer( type, javaClass );

      if ( topDeserializer == null )
      {
         String arg = ( type == null ) ? javaClass.getName(  ) : type.toString(  );
         throw new SerializationException( "noDeserializer" + arg );
      }

      pushElementHandler( new EnvelopeHandler( (SOAPHandler) this.topDeserializer ) );
   }
View Full Code Here

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

      return deserializer.getValue(  );
   }
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.