Examples of XMLDoc


Examples of org.apache.manifoldcf.core.common.XMLDoc

    throws ManifoldCFException, java.net.MalformedURLException, javax.xml.rpc.ServiceException, java.rmi.RemoteException
  {
    com.microsoft.schemas.sharepoint.soap.directory.GetUserCollectionFromGroupResponseGetUserCollectionFromGroupResult roleResp = userCall.getUserCollectionFromGroup(groupName);
    org.apache.axis.message.MessageElement[] roleList = roleResp.get_any();

    XMLDoc doc = new XMLDoc(roleList[0].toString());
    ArrayList nodeList = new ArrayList();

    doc.processPath(nodeList, "*", null);
    if (nodeList.size() != 1)
    {
      throw new ManifoldCFException("Bad xml - missing outer 'ns1:GetUserCollectionFromGroup' node - there are "
      + Integer.toString(nodeList.size()) + " nodes");
    }
    Object parent = nodeList.get(0);
    if (!doc.getNodeName(parent).equals("ns1:GetUserCollectionFromGroup"))
      throw new ManifoldCFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromGroup'");

    nodeList.clear();
    doc.processPath(nodeList, "*", parent); // <ns1:Users>

    if (nodeList.size() != 1)
    {
      throw new ManifoldCFException(" No Users collection found.");
    }
    parent = nodeList.get(0);
    nodeList.clear();
    doc.processPath(nodeList, "*", parent); // <ns1:User>

    ArrayList sidsList = new ArrayList();
    String[] sids = new String[0];
    int i = 0;
    while (i < nodeList.size())
    {
      Object o = nodeList.get(i++);
      sidsList.add(doc.getValue(o, "Sid"));
    }
    sids = (String[]) sidsList.toArray((Object[]) sids);
    return sids;
  }
View Full Code Here

Examples of org.apache.manifoldcf.core.common.XMLDoc

  {

    com.microsoft.schemas.sharepoint.soap.directory.GetUserCollectionFromRoleResponseGetUserCollectionFromRoleResult roleResp = userCall.getUserCollectionFromRole( roleName );
    org.apache.axis.message.MessageElement[] roleList = roleResp.get_any();

    XMLDoc doc = new XMLDoc( roleList[0].toString() );
    ArrayList nodeList = new ArrayList();

    doc.processPath(nodeList, "*", null);
    if (nodeList.size() != 1)
    {
      throw new ManifoldCFException("Bad xml - missing outer 'ns1:GetUserCollectionFromRole' node - there are "+Integer.toString(nodeList.size())+" nodes");
    }
    Object parent = nodeList.get(0);
    if (!doc.getNodeName(parent).equals("ns1:GetUserCollectionFromRole"))
      throw new ManifoldCFException("Bad xml - outer node is not 'ns1:GetUserCollectionFromRole'");

    nodeList.clear();
    doc.processPath(nodeList, "*", parent)// <ns1:Users>

    if ( nodeList.size() != 1 )
    {
      throw new ManifoldCFException( " No Users collection found." );
    }
    parent = nodeList.get(0);
    nodeList.clear();
    doc.processPath( nodeList, "*", parent ); // <ns1:User>

    ArrayList sidsList = new ArrayList();
    String[] sids = new String[0];
    int i = 0;
    while (i < nodeList.size())
    {
      Object o = nodeList.get( i++ );
      sidsList.add( doc.getValue( o, "Sid" ) );
    }
    sids = (String[])sidsList.toArray( (Object[])sids );
    return sids;
  }
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.