Soapclient PHP Basic Authentication

Asked

Viewed 161 times

0

I’m trying to connect to a web-service using Soapclient, all via it requires user and password for such connection. follows the way I am trying to connect:

$wsdl = "XXXXXXXXXXXXXX?WSDL";
$options = array(
"login" => $username,
"password" => $password,
"authentication" => SOAP_AUTHENTICATION_BASIC,
"location" => 'XXXXXXXXXXXXXX',
"trace" => true,
"exceptions" => 0,
"cache_wsdl" => WSDL_CACHE_NONE);

$soapClient = new SoapClient($wsdl, $options);
  • To make requests on Laravel, I recommend using the guzzle and not SoapClient()

  • @Erloncharles recommends some website or documentation!?

  • If the guzzle is not already installed in your Lockbox you can just import the package and use standard documentation, bundle => https://github.com/guzzle/guzzle documentation => http://guzzlephp.org/

  • @Erloncharles we tried with the guzzle, it apparently of success, however I cannot access the methods, apparently it lacks a file (.xsd) in the request

1 answer

0


  $client = new SoapClient(null, array('trace' => 1,
                'exceptions' => 0,
                'header' => xxxxxx,
                'use' => SOAP_LITERAL,
                'style' => SOAP_DOCUMENT,
                'uri' => XXXXX,
                'location' =>'XXXXXX',
                'login' =>'XXXX', 'password' =>'XXXXX'
        ));

Browser other questions tagged

You are not signed in. Login or sign up in order to post.