0

I'm very new in PHP+SOAP, and now I need to pass some data to the given url using it, unfortunately I've receive this error

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost/bms/server.php?wsdl' : failed to load external entity "http://localhost/bms/server.php?wsdl" in C:\inetpub\wwwroot\bms\client.php:12 Stack trace: #0 C:\inetpub\wwwroot\bms\client.php(12): SoapClient->SoapClient('http://10.1.65....') #1 {main} thrown in C:\inetpub\wwwroot\bms\client.php on line 12.

according to my research on google, almost all of those solution is to enable Soap, xml (with libxml library installed), and openssl, and its all have been turn on and I'm unable to access/view the server code, due to some restriction.

what am I missing?

below are my client code

<?php

//client.php

$opt = array(
    'trace' => true
);
echo "1";
$client = new SOAPClient('http://localhost/bms/server.php?wsdl', $options);
echo "2";
//////////
$msg = "hello World";
$subj = "greating";
$recv  ="user@email.com";
$sentType = 2;
$sendDate = date("d/m/Y H:i:s");
$createdBy = "admin@email.com";
////////
$client->DoSendMessage(
    ['MsgContent' => $msg, 'Subject' => $subj,'Receiver' => $recv,
    'SendType' => $sentType,'SendDate' => $sendDate,
    'CreatedBy' => $createdBy]);
?>

work environment : IIS 10, PHP 7.3

thanks for your time.

s.young
  • 25
  • 2
  • 7

1 Answers1

-1

Seems like the wsdl url is blocked. Try contacting the vendor regarding this or maybe get an actual wsdl file from them. The first step before hitting a SOAP API would be to check if the wsdl file opens an external XML structre

cjd9
  • 59
  • 6