Package edu.indiana.dde.mylead.agent

Examples of edu.indiana.dde.mylead.agent.AgentPortType


    resultConfig.setHierarchyFilter(edu.indiana.dde.metadata.catalog.types.HierarchyFilterType.TARGET);
    resultConfig.setCount(limit);
    resultConfig.setOffset(0);
    req.setQueryTarget(QueryTargetDocument.Factory.parse(quryTargetXml).getQueryTarget());
     
    AgentPortType agentStub = stub.createStub(user);
   
    QueryResponseDocument response = agentStub.queryWithContext(reqDoc);
        logger.finest("resultElement: "
                + response.toString());
    }
View Full Code Here


        System.err.println("invoking operation MyLEADClient using WSDL from "
                + wsdlLoc);

        WSIFClient wcl = XmlBeansWSIFRuntime.newClient(wsdlLoc);
        AgentPortType stub = (AgentPortType) wcl
                .generateDynamicStub(AgentPortType.class);

        // This doesn't return anything, but prints out an error message to
        // stdout.
        //TODO Fix this and uncomment
View Full Code Here

   * @throws MyLeadException
   */
  public boolean doesUserHaveMyLeadAccount(String uid) throws MyLeadException {
    logger.entering(new Object[] { uid });
    try {
      AgentPortType stub = this.createStub(uid);
      AccountExistenceRequestDocument reqDoc = AccountExistenceRequestDocument.Factory
          .newInstance();
      VoidRequestType req = reqDoc.addNewAccountExistenceRequest();
      BooleanResponseDocument responce = stub.doesAccountExist(reqDoc);
      if (null == responce || null == responce.getBooleanResponse()) {
        throw new MyLeadException("Invalid responce returned");
      }

      boolean result = responce.getBooleanResponse().getValue();
View Full Code Here

  public String addNewUser(String adminDN, String userDN)
      throws MyLeadException {

    try {

      AgentPortType stub = this.createStub(adminDN);
      AddUsersRequestDocument reqDoc = AddUsersRequestDocument.Factory
          .newInstance();
      AddUsersRequestType req = reqDoc.addNewAddUsersRequest();
      UserType params = req.addNewCatalogUser();
      params.setUserId(adminDN);
      params.setUserName(userDN);

      OperationResponseDocument responce = stub.addUsers(reqDoc);
      if (null == responce || null == responce.getOperationResponse()) {
        throw new MyLeadException("Invalid responce");
      }
      OperationResponseType outputType = responce.getOperationResponse();
      Enum status = outputType.getStatus();
View Full Code Here

    try {
      CreateProjectsRequestDocument inputMsg = CreateProjectsRequestDocument.Factory
          .newInstance();
      CreateTopLevelObjectsRequestType params = inputMsg
          .addNewCreateProjectsRequest();
      AgentPortType stub = this.createStub(uid);
      TopLevelObjectType topLevelObjectType = params.addNewObjectInfo();
      topLevelObjectType.setAssignNewResourceID(assignNewResourceID);
      LEADresourceDocument leadResourceDoc = LEADresourceDocument.Factory
          .parse(leadResource);
      LEADResourceType leadResourceType = leadResourceDoc
          .getLEADresource();
      topLevelObjectType.setLEADresource(leadResourceType);
      OperationResponseDocument outputMsg = stub.createProjects(inputMsg);
      OperationResponseType outputType = outputMsg.getOperationResponse();
      StatusEnumType.Enum statusType = outputType.getStatus();
      String[] resourceIDs = outputType.getResourceIDArray();
      if (!statusType.equals(StatusEnumType.SUCCESS)) {
        if (outputType.isSetMessage()) {
View Full Code Here

   * @return
   */
  private static OperationResponseDocument createExperiment(
      String instanceID, String templateID, String userDN,
      String wsdlLoc, String experimentName, String experimentDescription) {
    AgentPortType stub = new ODEClient().createStub(userDN, wsdlLoc);
    CreateExperimentsRequestDocument experimentDoc = CreateExperimentsRequestDocument.Factory
        .newInstance();
    CreateCollectionsRequestType createCollectionReq = CreateCollectionsRequestType.Factory
        .newInstance();
    CollectionType collectionInfo = createCollectionReq
        .addNewCollectionInfo();

    MinimalLEADMetadata minimalLEADMetadata = new MinimalLEADMetadata(
        userDN, experimentName, experimentDescription);

    LEADResourceType leadResource = minimalLEADMetadata
        .getLeadResourceDoc().getLEADresource();
    ThemeType theme = leadResource.addNewData().addNewIdinfo()
        .addNewKeywords().addNewTheme();

    theme.addNewThemekey().setStringValue(instanceID);
    theme.setThemekt("ROOT_WORKFLOW_ID");

    theme = leadResource.addNewData().addNewIdinfo().addNewKeywords()
        .addNewTheme();

    theme.addNewThemekey().setStringValue(templateID);
    theme.setThemekt("ROOT_WORKFLOW_INSTANCE_ID");

    collectionInfo.setLEADresource(leadResource);

    collectionInfo.setAssignNewResourceID(true);

    experimentDoc.setCreateExperimentsRequest(createCollectionReq);

    OperationResponseDocument res = stub.createExperiments(experimentDoc);
    return res;
  }
View Full Code Here

      CreateCollectionsRequestDocument inputMsg = CreateCollectionsRequestDocument.Factory
          .newInstance();
      CreateCollectionsRequestType params = inputMsg
          .addNewCreateCollectionsRequest();

      AgentPortType stub = this.createStub(uid);
      CollectionType collectionType = params.addNewCollectionInfo();

      collectionType.setAssignNewResourceID(assignNewResourceID);
      collectionType.setParentID(parentResourceID);

      collectionType.setLEADresource(leadResourceType);

      OperationResponseDocument outputMsg = stub
          .createCollections(inputMsg);
      OperationResponseType outputType = outputMsg.getOperationResponse();

      StatusEnumType.Enum statusType = outputType.getStatus();
View Full Code Here

        "use-lead-header", leadContextHeader);

    WSIFClient wcl = XmlBeansWSIFRuntime.newClient(wsdlLoc);
    wcl.addHandler(soapHeaderHandler);

    AgentPortType stub = (AgentPortType) wcl
        .generateDynamicStub(AgentPortType.class);

    return stub;

  }
View Full Code Here

      // QueryByIDsRequestDocument inputMsg =
      // QueryByIDsRequestDocument.Factory.newInstance();
      // QueryByIDsRequestType params =
      // inputMsg.addNewQueryByIDsRequest();
      AgentPortType stub = this.createStub(uid);
      // params.addResourceID(resourceID);
      // QueryResultConfigurationType queryResultConfigurationType =
      // params.addNewQueryResultConfiguration();
      // queryResultConfigurationType.setContentFilter(MyLEADUtil.getCFilter(cFilter));
      // queryResultConfigurationType.setHierarchyFilter(MyLEADUtil.getHFilter(hFilter));
      QueryResponseDocument outputMsg = stub.queryByIDs(inputMsg);
      QueryResponseType outputType = outputMsg.getQueryResponse();
      QueryResponseSetType returnDoc = outputType.getQueryResponseSet();
      StatusEnumType.Enum statusType = outputType.getStatus();
      if (statusType.equals(StatusEnumType.SUCCESS)) {
        logger.finest("resultElement: " + returnDoc.toString());
View Full Code Here

    WSIFClient wcl = XmlBeansWSIFRuntime.getDefault().newClientFor(service,
        null);
    wcl.addHandler(soapHeaderHandler);

    AgentPortType stub = (AgentPortType) wcl
        .generateDynamicStub(AgentPortType.class);

    return stub;

  }
View Full Code Here

TOP

Related Classes of edu.indiana.dde.mylead.agent.AgentPortType

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.