Jump to content


Photo

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


Best Answer BigB, 03 December 2017 - 07:02 PM

@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
Go to the full post


  • Please log in to reply
5 replies to this topic

#1 dardime

dardime
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 01 December 2017 - 06:38 AM

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...ervice.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");
		}


#2 dardime

dardime
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 01 December 2017 - 10:17 AM

is it the cause of the wsdl link is empty or cannot access.

#3 BigB

BigB
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 03 December 2017 - 07:02 PM   Best Answer

@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


#4 dardime

dardime
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 04 December 2017 - 09:23 AM

Thank you so much BigB for your reply and help. i appreciate it a lot. Thanks

#5 dardime

dardime
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 06 December 2017 - 09:07 PM

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



#6 BigB

BigB
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 07 December 2017 - 07:31 PM

Any time, happy coding mate :-)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users