Welcome Guest, Not a member yet? Register   Sign In
how to add soap in CodeIgniter 4?
#1

hi , in download soap from this link:
https://github.com/f00b4r/nusoap
But I do not know how to add it to the project and use it , please help me . thanks
Reply
#2

it mentions : composer require econea/nusoap

so if you started with CI4 app starter i.e composer create-project codeigniter4/appstarter project-root

then you can either cd into root and use command : require econea/nusoap

or edit composer.json and then compose install

thats the firs step ; then you need to see if classes have name spaces or not
Reply
#3

(11-04-2021, 12:03 PM)captain-sensible Wrote: it mentions : composer require econea/nusoap

so if you started with CI4 app starter i.e  composer create-project codeigniter4/appstarter project-root

then you can either cd into root and use command : require econea/nusoap

or edit composer.json and then compose install

thats the firs step ; then you need to see if classes have name spaces or not

thanks , do you have sample code? i am Beginner
Reply
#4

(11-04-2021, 12:49 PM)ali254 Wrote: thanks , do you have sample code? i am Beginner
example how to use
Reply
#5

require_once(APPPATH.'Controllers\Payment\lib\nusoap.php');
$soapclient = new soapclient('https://acquirer.samanepay.com/payments/referencepayment.asmx?WSDL', 'wsdl');


i use this code in project but I receive error soapclient not found
Reply
#6

(11-04-2021, 12:03 PM)captain-sensible Wrote: it mentions : composer require econea/nusoap

so if you started with CI4 app starter i.e  composer create-project codeigniter4/appstarter project-root

then you can either cd into root and use command : require econea/nusoap

or edit composer.json and then compose install

thats the firs step ; then you need to see if classes have name spaces or not

i need to sample code for this description
Reply
#7

Here is the link to how they setup a Soap Server for CodeIgniter 3, You would need to convert it to CodeIgniter 4.

Soap Server CodeIgniter 3

Pay attention to the folder structure etc;
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#8

thanks
Reply
#9

Using SoapClient is no different in CodeIgniter than it is using plain old PHP.
e.g. using SoapClient to load orders from Magento:

Code:
$client = new SoapClient($magento_server . "/index.php/api/v2_soap?wsdl=1");
$session = $client->login($magento_api_user, $magento_api_key);

$filters = array(
  'created_at' => array( '>' => $from_date),
  'created_at' => array( '<' => $to_date)
);

$orders = $client->salesOrderList($session, $filters);
Reply
#10

Does anyone know of a PHP SOAP Client/Class that can handle MTOM files? SoapClient is woefully limited, and I'm having no luck so far figuring out how to install the abandoned WSF-PHP tools.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB