Package org.infoglue.deliver.util.webservices

Examples of org.infoglue.deliver.util.webservices.DynamicWebservice


        {
          InfoGluePrincipal principal = this.getInfoGluePrincipal();
          if(userName != null && !userName.equals(""))
            principal = new InfoGluePrincipal(userName, userName, userName, userName, "", null, null, null, false, null);
           
            final DynamicWebservice ws = new DynamicWebservice(principal);

            ws.setTargetEndpointAddress(endpointAddress);
            ws.setOperationName(operationName);
            //ws.setReturnType(ContentVersionVO.class, new QName(nameSpace, ws.getClassName(ContentVersionVO.class)));
            for(int i=0; i<returnType.length; i++)
              ws.setReturnType(returnType[i], new QName(nameSpace, ws.getClassName(returnType[i])));
           
            if(argument != null)
            {
              if(argument instanceof Map || argument instanceof HashMap)
                  ws.addArgument(name, (Map)argument, extraClassInfo);
              else if(argument instanceof List || argument instanceof ArrayList)
                  ws.addArgument(name, (List)argument, extraClassInfo);
              else
                  ws.addArgument(name, argument);
            }
           
            ws.callService();
            result = ws.getResult();
        }
        catch (Exception e)
        {
            e.printStackTrace();
            throw new JspTagException(e.getMessage());
View Full Code Here


        {
          InfoGluePrincipal principal = this.getInfoGluePrincipal();
          if(userName != null && !userName.equals(""))
            principal = new InfoGluePrincipal(userName, userName, userName, userName, "", null, null, null, false, null);
           
          final DynamicWebservice ws = new DynamicWebservice(principal);

            ws.setTargetEndpointAddress(endpointAddress);
            ws.setOperationName(operationName);
            //ws.setReturnType(ContentVersionVO.class, new QName(nameSpace, ws.getClassName(ContentVersionVO.class)));
            for(int i=0; i<returnType.length; i++)
              ws.setReturnType(returnType[i], new QName(nameSpace, ws.getClassName(returnType[i])));
           
            if(argument != null)
            {
              if(argument instanceof Map || argument instanceof HashMap)
                  ws.addArgument(name, (Map)argument, extraClassInfo);
              else if(argument instanceof List || argument instanceof ArrayList)
                  ws.addArgument(name, (List)argument, extraClassInfo);
              else
                  ws.addArgument(name, argument);
            }
           
            ws.callService();
            result = ws.getResult();
        }
        catch (Exception e)
        {
            e.printStackTrace();
            throw new JspTagException(e.getMessage());
View Full Code Here

          String cmsUserName = (String)getController().getHttpServletRequest().getSession().getAttribute("cmsUserName");
          if(cmsUserName != null)
            this.principal = getController().getPrincipal(cmsUserName);
         }
            
       final DynamicWebservice ws = new DynamicWebservice(this.principal);
     
       ws.setTargetEndpointAddress(targetEndpointAddress);
       ws.setOperationName(operationName);
       ws.setReturnType(StatusBean.class, new QName("infoglue", "StatusBean"));
       ws.setReturnType(CreatedEntityBean.class, new QName("infoglue", "CreatedEntityBean"));
       //ws.setReturnType(Boolean.class);
      
       ws.addArgument("contents", contents);
       ws.callService();
       setResultAttribute(ws.getResult());
     }  
     catch(Exception e)
     {
       e.printStackTrace();
       throw new JspTagException(e.getMessage());
View Full Code Here

     try
     {
         if(this.principal == null)
             this.principal = this.getController().getPrincipal();
        
       final DynamicWebservice ws = new DynamicWebservice(principal);
     
       ws.setTargetEndpointAddress(targetEndpointAddress);
       ws.setOperationName(operationName);
       ws.setReturnType(StatusBean.class, new QName("infoglue", "StatusBean"));
       ws.setReturnType(CreatedEntityBean.class, new QName("infoglue", "CreatedEntityBean"));
               
       Map userMap = new HashMap();
       if(this.systemUserVO.getFirstName() != null)
         userMap.put("firstName", this.systemUserVO.getFirstName());
       if(this.systemUserVO.getLastName() != null)
         userMap.put("lastName", this.systemUserVO.getLastName());
       if(this.systemUserVO.getEmail() != null)
         userMap.put("email", this.systemUserVO.getEmail());

       if(this.systemUserVO.getUserName() != null)
         userMap.put("userName", this.systemUserVO.getUserName());
       else
         userMap.put("userName", getController().getPrincipal().getName());
          
       if(this.systemUserVO.getPassword() != null)
         userMap.put("password", this.systemUserVO.getPassword());
       if(oldPassword != null)
         userMap.put("oldPassword", this.oldPassword);
      
       userMap.put("isPasswordChangeOperation", isPasswordChangeOperation);
       userMap.put("isPasswordResetOperation", isPasswordResetOperation);
      
       List users = new ArrayList();
       users.add(userMap);
        
       ws.addArgument("users", users);

       ws.addNonSerializedArgument("roleNames", new ArrayList(Arrays.asList(this.roleNames)));
       ws.addNonSerializedArgument("groupNames", new ArrayList(Arrays.asList(this.groupNames)));
      
       ws.callService();
       setResultAttribute(ws.getResult());
     }  
     catch(Exception e)
     {
       e.printStackTrace();
       throw new JspTagException(e.getMessage());
View Full Code Here

        try
        {
            if (this.principal == null)
                this.principal = this.getController().getPrincipal();

            final DynamicWebservice ws = new DynamicWebservice(principal);

            ws.setTargetEndpointAddress(targetEndpointAddress);
            ws.setOperationName(getOperationName());
            ws.setReturnType(Boolean.class);

            if(argument instanceof Map || argument instanceof HashMap)
                ws.addArgument(name, (Map)argument);
            else if(argument instanceof List || argument instanceof ArrayList)
                ws.addArgument(name, (List)argument);
            else
                ws.addArgument(name, argument);
           
            ws.callService();
            setResultAttribute(ws.getResult());
        }
        catch (Exception e)
        {
            e.printStackTrace();
            throw new JspTagException(e.getMessage());
View Full Code Here

        try
        {
            if (this.principal == null)
                this.principal = this.getController().getPrincipal();

            final DynamicWebservice ws = new DynamicWebservice(principal);

            ws.setTargetEndpointAddress(targetEndpointAddress);
            ws.setOperationName(getOperationName());
            ws.setReturnType(returnType, new QName(nameSpace, ws.getClassName(returnType)));

            if(argument instanceof Map || argument instanceof HashMap)
                ws.addArgument(name, (Map)argument);
            else if(argument instanceof List || argument instanceof ArrayList)
                ws.addArgument(name, (List)argument);
            else
                ws.addArgument(name, argument);
           
            ws.callService();
            setResultAttribute(ws.getResult());
        }
        catch (Exception e)
        {
            e.printStackTrace();
            throw new JspTagException(e.getMessage());
View Full Code Here

   {
     try
     {
       final InfoGluePrincipal principal = UserControllerProxy.getController().getUser(principalName);
      
       final DynamicWebservice ws = new DynamicWebservice(principal);
     
       ws.setTargetEndpointAddress(targetEndpointAddress);
       ws.setOperationName(operationName);
       ws.setReturnType(Boolean.class);
      
       ws.addArgument(LANGUAGE_ID_PARAMETER, languageId);
       ws.addArgument(WORKFLOW_ID_PARAMETER, workflowId);
       ws.addArgument(ACTION_ID_PARAMETER, actionId);
       ws.addArgument(INPUTS_PARAMETER, inputs);
      
       ws.callService();
       setResultAttribute(ws.getResult());
     }  
     catch(Exception e)
     {
       e.printStackTrace();
       throw new JspTagException(e.getMessage());
View Full Code Here

   {
     try
     {
       final InfoGluePrincipal principal = UserControllerProxy.getController().getUser(principalName);
      
       final DynamicWebservice ws = new DynamicWebservice(principal);
     
       ws.setTargetEndpointAddress(targetEndpointAddress);
       ws.setOperationName(operationName);
       ws.setReturnType(Boolean.class);
      
       ws.addArgument(LANGUAGE_ID_PARAMETER,   languageId);
       ws.addArgument(WORKFLOW_NAME_PARAMETER, workflowName);
       ws.addArgument(INPUTS_PARAMETER,        inputs);
      
       ws.callService();
       setResultAttribute(ws.getResult());
     }  
     catch(Exception e)
     {
       e.printStackTrace();
       throw new JspTagException(e.getMessage());
View Full Code Here

     try
     {
         if(this.principal == null)
             this.principal = this.getController().getPrincipal();
        
       final DynamicWebservice ws = new DynamicWebservice(principal);
     
       ws.setTargetEndpointAddress(targetEndpointAddress);
       ws.setOperationName(operationName);
       ws.setReturnType(Boolean.class);
               
       ConstraintExceptionBuffer ceb = this.systemUserVO.validate();
       ceb.throwIfNotEmpty();
      
       ws.addArgument("firstName", this.systemUserVO.getFirstName());
       ws.addArgument("lastName", this.systemUserVO.getLastName());
       ws.addArgument("email", this.systemUserVO.getEmail());
       ws.addArgument("userName", this.systemUserVO.getUserName());
       ws.addArgument("password", this.systemUserVO.getPassword());
      
       ws.addNonSerializedArgument("roleNames", new ArrayList(Arrays.asList(this.roleNames)));
       ws.addNonSerializedArgument("groupNames", new ArrayList(Arrays.asList(this.groupNames)));
      
       ws.callService();
       setResultAttribute(ws.getResult());
     }  
     catch(Exception e)
     {
       e.printStackTrace();
       throw new JspTagException(e.getMessage());
View Full Code Here

     try
     {
         if(this.principal == null)
             this.principal = this.getController().getPrincipal();
        
       final DynamicWebservice ws = new DynamicWebservice(principal);
     
       ws.setTargetEndpointAddress(targetEndpointAddress);
       ws.setOperationName(operationName);
       ws.setReturnType(Boolean.class);
               
       ws.addArgument("userName", userName);
      
       ws.callService();
       setResultAttribute(ws.getResult());
     }  
     catch(Exception e)
     {
       e.printStackTrace();
       throw new JspTagException(e.getMessage());
View Full Code Here

TOP

Related Classes of org.infoglue.deliver.util.webservices.DynamicWebservice

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.