Jump to content

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


dardime
Go to solution Solved by BigB,

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");
		}
Link to comment
Share on other sites

  • Solution

@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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.