Examples of MessageElement


Examples of org.apache.axis.message.MessageElement

                                            boolean nillable )
   throws SerializationException
   {
      if ( obj instanceof MessageElement )
      {
         MessageElement element = (MessageElement) obj;
         if ( ( name == null ) || name.equals( element.getQName(  ) ) )
         {
            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 );
View Full Code Here

Examples of org.apache.axis.message.MessageElement

   public static String toString( Object  obj,
                                  QName   name,
                                  boolean nillable )
   throws SerializationException
   {
      MessageElement messageElement = (MessageElement) toSOAPElement( obj, name, nillable );
      try
      {
         return AnyHelper.toString( messageElement );
      }
      catch ( Exception e )
View Full Code Here

Examples of org.apache.axis.message.MessageElement

    *
    * @return DOCUMENT_ME
    */
   public QName getQName(  )
   {
      MessageElement element = getMessageElement(  );
      return ( element == null ) ? null : element.getQName(  );
   }
View Full Code Here

Examples of org.apache.axis.message.MessageElement

      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 );
View Full Code Here

Examples of org.apache.axis.message.MessageElement

     * @return
     */
    public static MessageElement[] generateMessgaeElemArray(Element[] elem){
    MessageElement[] meArr=new MessageElement[elem.length];
    for (int i=0;i<elem.length;i++){
      meArr[i]=new MessageElement(elem[i]);
    }
    return meArr;
    }
View Full Code Here

Examples of org.apache.axis.message.MessageElement

     *
     * @param elem
     * @return
     */
    public static MessageElement generateMessgaeElement(Element elem){
    MessageElement me=new MessageElement(elem)
    return me;
    }
View Full Code Here

Examples of org.apache.axis.message.MessageElement

          }

          if (itemsList.length != 1)
            throw new ManifoldCFException("Bad response - expecting one outer 'GetListItems' node, saw "+Integer.toString(itemsList.length));
         
          MessageElement items = itemsList[0];
          if (!items.getElementName().getLocalName().equals("GetListItems"))
            throw new ManifoldCFException("Bad response - outer node should have been 'GetListItems' node");
         
          int resultCount = 0;
          Iterator iter = items.getChildElements();
          while (iter.hasNext())
          {
            MessageElement child = (MessageElement)iter.next();
            if (child.getElementName().getLocalName().equals("GetListItemsResponse"))
            {
              Iterator resultIter = child.getChildElements();
              while (resultIter.hasNext())
              {
                MessageElement result = (MessageElement)resultIter.next();
                if (result.getElementName().getLocalName().equals("GetListItemsResult"))
                {
                  resultCount++;
                  String relPath = result.getAttribute("FileRef");
                  String displayURL = result.getAttribute("ListItemURL");
                  fileStream.addFile( relPath, displayURL );
                }
              }
             
            }
View Full Code Here

Examples of org.apache.axis.message.MessageElement

      org.apache.axis.message.MessageElement[] userList = userResp.get_any();

      if (userList.length != 1)
        throw new ManifoldCFException("Bad response - expecting one outer 'GetUserInfo' node, saw "+Integer.toString(userList.length));
     
      MessageElement users = userList[0];
      if (!users.getElementName().getLocalName().equals("GetUserInfo"))
        throw new ManifoldCFException("Bad response - outer node should have been 'GetUserInfo' node");
         
      String userID = null;
     
      Iterator userIter = users.getChildElements();
      while (userIter.hasNext())
      {
        MessageElement child = (MessageElement)userIter.next();
        if (child.getElementName().getLocalName().equals("User"))
        {
          userID = child.getAttribute("Sid");
        }
      }
     
      if (userID == null)
        throw new ManifoldCFException("Could not find user login '"+userLogin+"' so could not get SID");
View Full Code Here

Examples of org.apache.axis.message.MessageElement

      org.apache.axis.message.MessageElement[] roleList = roleResp.get_any();

      if (roleList.length != 1)
        throw new ManifoldCFException("Bad response - expecting one outer 'GetUserCollectionFromGroup' node, saw "+Integer.toString(roleList.length));

      MessageElement roles = roleList[0];
      if (!roles.getElementName().getLocalName().equals("GetUserCollectionFromGroup"))
        throw new ManifoldCFException("Bad response - outer node should have been 'GetUserCollectionFromGroup' node");

      Iterator rolesIter = roles.getChildElements();
      while (rolesIter.hasNext())
      {
        MessageElement child = (MessageElement)rolesIter.next();
        if (child.getElementName().getLocalName().equals("Users"))
        {
          Iterator usersIterator = child.getChildElements();
          while (usersIterator.hasNext())
          {
            MessageElement user = (MessageElement)usersIterator.next();
            if (user.getElementName().getLocalName().equals("User"))
            {
              rval.add(user.getAttribute("Sid"));
            }
          }
        }
      }     
    }
View Full Code Here

Examples of org.apache.axis.message.MessageElement

      org.apache.axis.message.MessageElement[] roleList = roleResp.get_any();

      if (roleList.length != 1)
        throw new ManifoldCFException("Bad response - expecting one outer 'GetUserCollectionFromRole' node, saw "+Integer.toString(roleList.length));

      MessageElement roles = roleList[0];
      if (!roles.getElementName().getLocalName().equals("GetUserCollectionFromRole"))
        throw new ManifoldCFException("Bad response - outer node should have been 'GetUserCollectionFromRole' node");

      Iterator rolesIter = roles.getChildElements();
      while (rolesIter.hasNext())
      {
        MessageElement child = (MessageElement)rolesIter.next();
        if (child.getElementName().getLocalName().equals("Users"))
        {
          Iterator usersIterator = child.getChildElements();
          while (usersIterator.hasNext())
          {
            MessageElement user = (MessageElement)usersIterator.next();
            if (user.getElementName().getLocalName().equals("User"))
            {
              rval.add(user.getAttribute("Sid"));
            }
          }
        }
      }     
    }
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.