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 8512443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:16:56+00:00 2026-06-11T04:16:56+00:00

I am new to Zend_Soap_Client . I have the following code as an example,

  • 0

I am new to Zend_Soap_Client. I have the following code as an example, and I try to understand what is behind it. Do I understand correctly that it connects to remote server and reads specified data? Finally, as far as I understand, it is supposed to save these data in test.txt.

I tried to run this code (I have the necessary certificate). The problem is that no data is saved to test.txt. So, could someone please explain me this technology or give me a link to a good tutorial on similar topic? In particular, I’m very interested in how to save necessary data to local XML file or array.

P.S. I apologize if I used some incorrect definitions, because as I mentioned at the beginning I’m new to Zend_Soap_Client and the related technology.

$wsdl = 'tttest.wsdl';

$options = array(
    'local_cert' => 'certificate.pem',
    'soap_version' => SOAP_1_1
);

$client = new Zend_Soap_Client($wsdl, $options);

$p = array(
    'endUserId' => 'demo',
    'sendTime' => array('value' => date("Y-m-d H:i:s")),
    'eaupId' => array('chainDate' => array('value' => $chaindate), 'sequenceNumber' => 1)
);
$webServices = $client->retrieveEAUPCDRs($p);

$line = $client->getLastResponse();
$line = substr($line, 110);
$line = substr($line, 0, -22);
$xml = simplexml_load_string($line);

$result = $xml->xpath('//@ns3:title | //ns2:beginPosition | //ns2:endPosition | //ns4:upperLimit | //ns4:lowerLimit | //ns8:conditionalRouteType');

$filename = 'test.txt';
if ($fh = fopen($filename, "r")) {
    while (!feof($fh)) {
        $line = fgets($fh);
        if (strlen($line) != 0) {
            $chars = explode(";", $line, 5);
            $np[$chars[0]] = "$chars[3],$chars[2]";
        }
    }
    fclose($fh);
};
  • 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-11T04:16:58+00:00Added an answer on June 11, 2026 at 4:16 am

    This code does NOT do what you think it is doing.

    The first two-thirds (up to and including the call to xpath()) do connect to a server and grab some information, which is ultimately placed in the $result variable. However, the last 11 lines do not utilize any of the data from the previous code ($line is being re-used in the last bit).

    Furthermore, fopen() is being called with the “r” option, which means read-only.

    I would recommend spending some time on http://php.net researching the various PHP functions and language constructs that are being used in this code and then visiting the Zend Framework Manual for additional info on Zend_Soap_Client: http://framework.zend.com/manual/1.12/en/manual.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: $writer = new Zend_Log_Writer_Stream($path./../../../../data/logs/Log.log); $logger = new Zend_Log($writer); $logger->info(print_r($xm1,true));
I have something like that: $client = new Zend_Http_Client('http://www.site.com'); $client->setParameterGet(array( 'platform' => $platform, 'clientId'
I have the following element in my form: $attachment = new Zend_Form_Element_File('attachment'); $attachment->setLabel('Attach File
I am new to zend framework. I have write this code to set cookie
so I have this code: $sql = new Zend_Db_Select($db); $sql->from(j); $sql->join(k,k.id = j.id,array()); echo
I have just created a new zend framework application to try out unit testing.
I have the next code: $currFile = new Zend_File_Transfer_Adapter_Http(); $currFile->addValidator('Extension', false, 'jpg'); It works
I have tried as following in magento 1.7 $pdf = new Zend_Pdf(); .... ....
Here I have a password field: /*********************PASSWORD**********************/ $password = new Zend_Form_Element_Password('password'); $alnumValidator = new
i'm new to zend and i almost understand how it works with the mvc,

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.