Jump to content
Sign in to follow this  
dardime

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR

Recommended Posts

Hi

 

I encountered issue when running billing of of our sugar crm application. Pleae help me Thanks

 

Here is the error message.:

 

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://portal.layer2.co.nz/voip/api/voipwebservice.php?WSDL' : Premature end of data in tag html line 2 in C:\xampp\htdocs\omnicrm\outbox\class.vibe.php:9 Stack trace: #0 C:\xampp\htdocs\omnicrm\outbox\class.vibe.php(9): SoapClient->SoapClient('http://portal.l...') #1 C:\xampp\htdocs\omnicrm\outbox\class.vibe.php(42): Vibe->vibe_api_voipwebservice() #2 C:\xampp\htdocs\omnicrm\outbox\callingdata.php(88): Vibe->getNumList('2017/11/01', '2017/11/30', 'nca', '', 'yes') #3 C:\xampp\htdocs\omnicrm\outbox\index.php(20): include('C:\xampp\htdocs...') #4 {main} thrown in  C:\xampp\htdocs\omnicrm\outbox\class.vibe.php on line 9

 

 

My Code

<?php
include("config.php");
class Vibe
{

	function vibe_api_voipwebservice()
	{
 		ini_set('soap.wsdl_cache_enabled',0);   // Disable caching in PHP
		$client = new SoapClient("http://portal.layer2.co.nz/voip/api/voipwebservice.php?WSDL");
		return $client;
	}
	function vibe_radius_api()
	{
		ini_set('soap.wsdl_cache_enabled',0);   // Disable caching in PHP
		$client = new SoapClient("http://portal.layer2.co.nz/api/radiuswebservice.php?WSDL");
		return $client;
	}
	function vibe_information()
	{
		ini_set('soap.wsdl_cache_enabled',0);   // Disable caching in PHP
		$client = new SoapClient("http://portal.layer2.co.nz/api/informationwebservice.php?WSDL");
		return $client;
	}
	function db_conn()
	{
		$db_conn=mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
		// Check connection
		if (mysqli_connect_errno())
		 {
		  echo "Failed to connect to MySQL: " . mysqli_connect_error();
		 }
		 return $db_conn;
	}
	function directURL($url)
	{
		echo '<script> window.location="'.$url.'"; </script> ';
	}
	
	function getNumList($start,$end,$numType,$savecsv,$savedb)
	{
   
		$conn=$this->vibe_api_voipwebservice();
    //echo "REQUEST:\n" . $conn ->__getLastRequest() . "\n" ;
		$search = array();
		$type='detail';
		if(isset($type))
		{
			if($numType=="nca")
			{
				$getNumList = $conn->GetNCANumbersList(USERNAME, PASSWORD, $type, $search);
			}
			if($numType=="voip")
			{
				$getNumList = $conn->GetNumbersList(USERNAME, PASSWORD, $type, $search);
			}
		}
		if($savecsv=="yes")
		{
			$fp = fopen('csv/'.date("Ymdhis").'_a.csv', 'w')or die("can't open file");
		}

Share this post


Link to post
Share on other sites

@Dardime, I personally cannot see whats wrong here, I am not too familiar with sugar crm setup, to me the code above looks clean, however, I am a novice programmer, though my thoughts are as follows...

 

  • This could also be a server side issue,
  • a setting in php.ini or
  • maybe we need to look into the other files to see whats going on there to see whats getting crunched and passed,

 

If you could post the code from the files below or any other code you think may be relevant to this issue, and maybe the top gun programmers on this forum might be able to shoot you in the right direction: (Remember to dummy up any security risk code before posting)

 

Related files:

  • ...callingdata.php(88)
  • ...index.php(20)
  • .../305811-fatal-error-uncaught-soapfault-exception-wsdl-soap-error/SoapClient- ???
  • ...voipwebservice.php?WSDL

Share this post


Link to post
Share on other sites

This is already resolved. The reason is there is an issue with server side. Thanks BigD for helping me sort this out.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

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.