Getting information about a specific workgroup

Use getPublisherDetails to get detailed information about a workgroup.

java
//add your client certificate
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
System.setProperty("javax.net.ssl.keyStore", "C:\\\\Program Files\\\\Java\\\\jdk1.8.0_25\\\\bin\\\\sas_keystore.p12");
System.setProperty("javax.net.ssl.keyStorePassword", "yourPassword");

//Need Provider account
AuthToken authToken = new AuthToken();
authToken.setPartnerCode("partner code");
authToken.setUserName("user name");
authToken.setPassword("password");

PublisherStatusRequestType publisherDetails = 
  new PublisherStatusRequestType();
publisherDetails.setAuthToken(authToken);
publisherDetails.setPublisherID(4551181);
//publisherDetails.setReturnAuthenticationComments(true);


PublisherStatusResponseType response;
try {
    SigningProxy request = new SigningProxy();
    response = request.getPublisherDetails(publisherDetails);
    
    //get the result code
    System.out.println("Result code: \\t" + response.getResult().getResultCode());
    
    //if the request is successful with or without warnings
    if (response.getResult().getResultCode() >= 0) {
        try {
            //list errors, if present
            Error[] error = response.getResult().getErrors();
            for (Error err : error) {
                if (!err.getErrorMessage().isEmpty()) {
                    System.err.println("Warning: " + err.getErrorMessage() + " Field: " + err.getErrorField());
                }
            }
        }
        catch (Exception e) {}
        
        //Print success message, other workgroup details
        System.out.println("Success!");
        System.out.println("Status: " +  
          response.getPublisher().getActiveInd());
        System.out.println("Expiration date: " + response.getPublisher().getExpirationDate());
        System.out.println("Signup order ID: " + response.getPublisher().getSignupOrderID());
        System.out.println("Signup order status: " + response.getPublisher().getSignupStatus());
        System.out.println("Organization name: " + response.getPublisher().getOrganizationInfo().getOrganizationName());
        System.out.println("Admin contact: " + response.getPublisher().getAdminContactInfo().getContactInfo().getFirstName() + " " + response.getPublisher().getAdminContactInfo().getContactInfo().getLastName());
        System.out.println("Corporate approval contact: " + response.getPublisher().getCorporateApproverContactInfo().getFirstName() + " " + response.getPublisher().getCorporateApproverContactInfo().getLastName());
        
    } else {
        //if the request failed, list any errors
        try {
            //list errors, if present
            Error[] error = response.getResult().getErrors();
            for (Error err : error) {
                if (!err.getErrorMessage().isEmpty()) {
                    System.err.println("Warning: " + err.getErrorMessage() + " Field: " + err.getErrorField());
                }
            }
        }
        catch (Exception e) {
            System.out.println("Error while reading request details");
        }
    }
}
catch (Exception e) {}
C#
//create the service object
SigningService signingService = new SigningService();

//add client cert for two-factor-authentication
string clientCertPath = "C:\\\\Users\\\\Administrator\\\\Desktop\\\\sas_pfx.pfx";
string clientCertPassword = "yourPassword";
X509Certificate2 clientCert = new X509Certificate2(clientCertPath, clientCertPassword);
signingService.ClientCertificates.Add(clientCert);

//add your username, password, and partnercode
AuthToken authToken = new AuthToken();
authToken.partnerCode = "partner code";
authToken.userName = "username";
authToken.password = "password";
PublisherStatusRequestType publisherDetails = 
  new PublisherStatusRequestType();
publisherDetails.authToken = authToken;
publisherDetails.publisherID = 4551181;
//publisherDetails.returnAuthenticationComments = true;

PublisherStatusResponseType response;

try
{
    response = signingService.getPublisherDetails(publisherDetails);

    Console.WriteLine("Result code: " + response.result.resultCode);

    if (response.result.resultCode >= 0)
    {
        try
        {
            Error[] errors = response.result.errors;
            foreach (Error error in errors)
            {
                if (error.errorMessage.Length > 0)
                {
                    Console.WriteLine("Warning: " + error.errorMessage + " Field: " + error.errorField);
                }
            }
        }
        catch (Exception e) { }

        //Print success message, other workgroup details
        Console.WriteLine("Success!");
        Console.WriteLine("Status: " + response.publisher.activeInd);
        Console.WriteLine("Expiration date: " + response.publisher.expirationDate);
        Console.WriteLine("Signup order ID: " + response.publisher.signupOrderID);
        Console.WriteLine("Signup order status: " + response.publisher.signupStatus);
        Console.WriteLine("Organization name: " + response.publisher.organizationInfo.organizationName);
        Console.WriteLine("Admin contact: " + response.publisher.adminContactInfo.contactInfo.firstName + " " + response.publisher.adminContactInfo.contactInfo.lastName);
        Console.WriteLine("Corporate approval contact: " + response.publisher.corporateApproverContactInfo.firstName + " " + response.publisher.corporateApproverContactInfo.lastName);
    }
    else
    {
        try
        {
            //list errors, if present
            Error[] errors = response.result.errors;
            foreach (Error error in errors)
            {
                if (error.errorMessage.Length > 0)
                {
                    Console.WriteLine("Warning: " + error.errorMessage + " Field: " + error.errorField);
                }
            }
        }
        catch (Exception e)
        {
            Console.WriteLine("Error while reading request details: " + e.InnerException.Message);
        }
    }
}
catch (Exception e) { }

We use cookies to ensure that we give you the best experience on our website. By using this site, you agree to the Terms of Service.