Jump to content

soap & php5


sKunKbad

Recommended Posts

I have some code that works in php4, and uses nusoap.php. If I remove the include to nusoap for php5, I get errors. Do I need to do something other than removing the include? Here's the code:

 

<?php

  /* display SOAP errors */
  function showErrors( $soapclient, $results ) {
    echo 'Request: <xmp>'.$soapclient->request.'</xmp>';
    echo 'Response: <xmp>'.$soapclient->response.'</xmp>';
    echo 'Debug log: <pre>'.$soapclient->debug_str.'</pre>';
    echo $results['faultstring'];
  }

  //require_once('./nusoap/nusoap.php'); //php5 is supposed to have its own soap, so I shouldn't need this.
  $soapclient = new soapclient('http://www.biblegateway.com/usage/votd/');
  $parameters= array('preferences'=>array('version_id'=>'31',
         'utc_offset'=>'-5'),
     'options'=>array('include-copyright'=>'both')
    )
  );
  $results = $soapclient->call('doGetVotd',$parameters);
  if($err = $soapclient->getError()){
    showErrors($soapclient, $results);
  } else {
    print $results;
  }
?>

Link to comment
https://forums.phpfreaks.com/topic/53659-soap-php5/
Share on other sites

Since I posted the question, I learned a little about php5's soap, and it appears this needs to be a non-WSDL request, but after playing a little, I'm getting nowhere. I don't know exactly what the location and uri are supposed to be for the non-WSDL request, and how to get the results of the request to print. I'm not opposed to learning, but I haven't found a whole lot of info on what I'm trying to do here. Anyone have some tips?

Link to comment
https://forums.phpfreaks.com/topic/53659-soap-php5/#findComment-265306
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.