Examples of GetUserInfoResult


Examples of com.sforce.soap.partner.GetUserInfoResult

        // This will use ForceServiceConnector assigned to the ThreadLocal.
        ForceServiceConnector f = new ForceServiceConnector();
        PartnerConnection conn = f.getConnection();


        GetUserInfoResult userInfoResult = conn.getUserInfo();

        StringBuffer value = new StringBuffer();
        value.append("[");
        value.append("{" + userInfoResult.getUserName() + "},");
        value.append("]");
        mav.addObject("userinfo", userInfoResult.getUserName());
        mav.addObject("moreinfo", value.toString());

        return mav;
    }
View Full Code Here

Examples of com.sforce.soap.partner.GetUserInfoResult

   
    @Test
    public void testCustomSecurityContext() throws ConnectionException {
        TestSecurityContext tsc = new TestSecurityContext();
        tsc.setForceSecurityContext(new ForceSecurityContext());
        GetUserInfoResult userInfo = new GetUserInfoResult();
        userInfo.setOrganizationId(ORG_ID);
        userInfo.setUserId(USER_ID);
        userInfo.setUserName(USERNAME);
        userInfo.setUserLanguage(USER_LANGUAGE);
        userInfo.setUserLocale(USER_LOCALE);
        userInfo.setUserTimeZone(USER_TIMEZONE);
        tsc.init(userInfo);
       
        Assert.assertEquals(tsc.getOrgId(), ORG_ID);
        Assert.assertEquals(tsc.getUserId(), USER_ID);
        Assert.assertEquals(tsc.getUserName(), USERNAME);
View Full Code Here

Examples of com.sforce.soap.partner.GetUserInfoResult

       
        return sb.toString();
    }
   
    protected void verifyConnection(PartnerConnection conn) throws ConnectionException {
        GetUserInfoResult userInfoResult = conn.getUserInfo();
        assertNotNull(userInfoResult);
       
        assertEquals(userInfoResult.getOrganizationId(), userInfo.getOrgId());
        assertEquals(userInfoResult.getUserId(), userInfo.getUserId());
        assertEquals(userInfoResult.getUserName(), userInfo.getUserName());
    }
View Full Code Here

Examples of com.sforce.soap.partner.GetUserInfoResult

           
            allOrgObjects.addAll(Arrays.<DescribeSObjectResult>asList(dsrs));
        }
       
        // Get the user information
        GetUserInfoResult userInfo = conn.getUserInfo();
       
        ObjectFilter objectFilter = getObjectFilter();
        assert objectFilter != null;
       
        FieldFilter fieldFilter = getFieldFilter();
View Full Code Here

Examples of com.sforce.soap.partner.wsc.GetUserInfoResult

                    String serverUrl = changeServer(loginResult.getServerUrl(), forceProject.getEndpointServer());
                    setToolingServerUrl(getToolingServiceEndpoint(serverUrl));
                }
            } else {
                // With a sessionId, use the getUserInfo to obtain the relevant information, then construct the other endpoints
                GetUserInfoResult userInfoResult = getPartnerConnection().getUserInfo();
                setProfileId(userInfoResult.getProfileId());
                setOrgId(userInfoResult.getOrganizationId());
                setMetadataServerUrl(getMetadataServiceEndpoint(getPartnerConnection().getConfig().getServiceEndpoint()));
                setToolingServerUrl(getToolingServiceEndpoint(getPartnerConnection().getConfig().getServiceEndpoint()));
            }

            // set for re-login to handle expired connections
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.