Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7956617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:02:57+00:00 2026-06-04T04:02:57+00:00

The process I am creating needs to send data to a soap service. I

  • 0

The process I am creating needs to send data to a soap service. I cannot proceed with my next action until I get a desirable response.

try {
    $return = $soapClient->__soapCall("BulkLoadContacts",array('parameter' => $params));

    foreach ($return as $r){
        $upload_id = $r;
    }

    $process_params = array(
        'ProcessID' => $upload_id,
    );
    $return = $soapClient->__soapCall("GetProcessStatus",array('parameter' => $process_params));
    var_dump($return);

}
catch(SoapFault $fault){
    $status = false;
}

In the above piece of code, I execute the BulkLoadContacts method. I then grab the ProcessID from the response. Once I have that ID, I then make another call to get the status of the my process. The last dumper tells me the response of GetProcessStatus. The dumper looks like:

object(stdClass)#18 (1) {
  ["WSProcessStatus"]=>
  object(stdClass)#19 (6) {
    ["ProcessID"]=>
    int(3313881)
    ["ListID"]=>
    int(268207)
    ["ProcessName"]=>
    string(20) "listrak_tempfile.txt"
    ["ProcessStartTime"]=>
    string(23) "2012-05-16T14:22:50.643"
    ["ProcessCompleteTime"]=>
    string(22) "2012-05-16T14:22:50.84"
    ["Status"]=>
    string(19) "ProcessingCompleted"
  }
}

The last item is Status. Only until the method returns with the value of “ProcessingCompleted” do I want to proceed. Any suggestions on how to accomplish this? Would a simple do-while be sufficient?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:02:58+00:00Added an answer on June 4, 2026 at 4:02 am

    A do/while should do the trick. But I’d recommend putting a delay in each loop, otherwise you’ll be hammering the Soap server.

    Also, you probably want to specify a max number of tries. You don’t want to have your program stuck in an infinite loop.

    try {
        $return = $soapClient->__soapCall("BulkLoadContacts",array('parameter' => $params));
    
        foreach ($return as $r){
            $upload_id = $r;
        }
    
        $attempts_remaining = 10;
        do {
            sleep(1);
            $process_params = array(
                'ProcessID' => $upload_id,
            );
            $return = $soapClient->__soapCall("GetProcessStatus",array('parameter' => $process_params));
    
            $attempts_remaining--;
        } while (($return->WSProcessStatus->Status != 'ProcessingCompleted') && ($attempts_remaining > 0));
    
        if($return->WSProcessStatus->Status == 'ProcessingCompleted') {
            //success
        }
        else {
            //timeout
        }
    
    
    }
    catch(SoapFault $fault){
        $status = false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of creating a gem which needs to add associations
I'm in the process of creating a SharePoint web part that needs to use
I'm creating a named mutex in a windows service that needs to be accessible
I'm in the process of creating a tool which needs to be able to
I'm currently creating a process for our business which takes some data from a
I am creating a program that needs to store the user's data in encrypted
Suppose that a process is creating a mutex in shared memory and locking it
I'm in the process of creating a double-linked list, and have overloaded the operator=
I'm in the process of creating an app. I'd like to have a pared
I am in the process of creating an input form on a record specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.