Advertisement
Guest User

Untitled

a guest
May 4th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. $api_url = 'http://localhost:8733/Design_Time_Addresses/CRA_Service/Service1/'; // ex. http://www.example.com/index.php/soapserver
  5. $proxyhost = isset( $POST['proxyhost']) ? $POST['proxyhost'] : '';
  6. $proxyport = isset( $POST['proxyport']) ? $POST['proxyport'] : '';
  7. $proxyusername = isset( $POST['proxyusername']) ? $POST['proxyusername'] : '';
  8. $proxypassword = isset( $POST['proxypassword']) ? $POST['proxypassword'] : '';
  9.  
  10. $service = $this->input->post('service'); // from my POST <a href="http://www.dharamart.in/2013/soap-server-in-codeigniter-using-nusoap-library/" target="_blank">SOAP Server In CodeIgniter using NuSOAP PHP Toolkit</a>
  11.  
  12. if ( $service == NULL || ! file_exists(APPPATH.'helpers/requestParams/'.$service.'.php')) {
  13. // print_r($service);
  14. // Whoops, we don't have a page for that!
  15. show_404();
  16. }
  17.  
  18.  
  19. include_once(APPPATH.'helpers/requestParams/'.$service.'.php');
  20.  
  21. if ($api_url != '')
  22.  
  23. {
  24.  
  25. $result = $this->nusoap_lib->soaprequest($api_url, trim($service), array('parameters' => $params),$proxyhost, $proxyport, $proxyusername, $proxypassword);
  26. if (is_array($result) && count($result) > 0)
  27.  
  28. {
  29. print_r($result[$service . 'Result']);
  30.  
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement