Package org.apache.axis.message

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");
                  fileStream.addFile( relPath );
                }
              }
             
            }
View Full Code Here


    throws ManifoldCFException
  {
    try
    {
      GetListItemsViewFields rval = new GetListItemsViewFields();
      MessageElement viewFieldsNode = new MessageElement((String)null,"ViewFields");
      rval.set_any(new MessageElement[]{viewFieldsNode});
      for (Object x : fieldNames)
      {
        MessageElement child = new MessageElement((String)null,"FieldRef");
        viewFieldsNode.addChild(child);
        child.addAttribute(null,"Name",(String)x);
      }
      return rval;
    }
    catch (javax.xml.soap.SOAPException e)
    {
View Full Code Here

    throws ManifoldCFException
  {
    try
    {
      GetListItemsQuery rval = new GetListItemsQuery();
      MessageElement queryNode = new MessageElement((String)null,"Query");
      rval.set_any(new MessageElement[]{queryNode});
      MessageElement whereNode = new MessageElement((String)null,"Where");
      queryNode.addChild(whereNode);
      MessageElement eqNode = new MessageElement((String)null,"Eq");
      whereNode.addChild(eqNode);
      MessageElement fieldRefNode = new MessageElement((String)null,"FieldRef");
      eqNode.addChild(fieldRefNode);
      fieldRefNode.addAttribute(null,"Name",fieldName);
      MessageElement valueNode = new MessageElement((String)null,"Value");
      eqNode.addChild(valueNode);
      valueNode.addAttribute(null,"Type",type);
      valueNode.addTextNode(value);
      return rval;
    }
    catch (javax.xml.soap.SOAPException e)
    {
      throw new ManifoldCFException(e.getMessage(),e);
View Full Code Here

    throws ManifoldCFException
  {
    try
    {
      GetListItemsQuery rval = new GetListItemsQuery();
      MessageElement queryNode = new MessageElement((String)null,"Query");
      rval.set_any(new MessageElement[]{queryNode});
      MessageElement orderByNode = new MessageElement((String)null,"OrderBy");
      queryNode.addChild(orderByNode);
      orderByNode.addAttribute(null,"Override","TRUE");
      orderByNode.addAttribute(null,"UseIndexForOrderBy","TRUE");
      MessageElement fieldRefNode = new MessageElement((String)null,"FieldRef");
      orderByNode.addChild(fieldRefNode);
      fieldRefNode.addAttribute(null,"Ascending","TRUE");
      fieldRefNode.addAttribute(null,"Name",indexedColumn);
      return rval;
    }
    catch (javax.xml.soap.SOAPException e)
    {
      throw new ManifoldCFException(e.getMessage(),e);
View Full Code Here

    throws ManifoldCFException
  {
    try
    {
      GetListItemsQueryOptions rval = new GetListItemsQueryOptions();
      MessageElement queryOptionsNode = new MessageElement((String)null,"QueryOptions");
      rval.set_any(new MessageElement[]{queryOptionsNode});
      MessageElement pagingNode = new MessageElement((String)null,"Paging");
      queryOptionsNode.addChild(pagingNode);
      pagingNode.addAttribute(null,"ListItemCollectionPositionNext",pageNextString);
      MessageElement viewAttributesNode = new MessageElement((String)null,"ViewAttributes");
      queryOptionsNode.addChild(viewAttributesNode);
      viewAttributesNode.addAttribute(null,"Scope","Recursive");

      return rval;
    }
    catch (javax.xml.soap.SOAPException e)
    {
View Full Code Here

    throws ManifoldCFException
  {
    try
    {
      GetListItemsQueryOptions rval = new GetListItemsQueryOptions();
      MessageElement queryOptionsNode = new MessageElement((String)null,"QueryOptions");
      rval.set_any(new MessageElement[]{queryOptionsNode});
      MessageElement viewAttributesNode = new MessageElement((String)null,"ViewAttributes");
      queryOptionsNode.addChild(viewAttributesNode);
      viewAttributesNode.addAttribute(null,"Scope","Recursive");

      return rval;
    }
    catch (javax.xml.soap.SOAPException e)
    {
View Full Code Here

          }

          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

      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

    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();

    if (!activeDirectoryAuthority)
    {
      // We need not only the group itself, but its user children that are Claims-based entities
      rval.add("G"+groupName);
      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"))
            {
              String isDomainGroup = user.getAttribute("IsDomainGroup");
              if (isDomainGroup != null && isDomainGroup.equals("True"))
              {
                // Add a user token for the domain group
                rval.add("U"+user.getAttribute("LoginName"));
              }
            }
          }
        }
      }     
    }
    else
    {
      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

      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

Related Classes of org.apache.axis.message.MessageElement

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.