Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8948911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:07:00+00:00 2026-06-15T13:07:00+00:00

I have to create PHP, SOAP API. I need to authenticate SOAP client from

  • 0

I have to create PHP, SOAP API. I need to authenticate SOAP client from SOAP Server.
This is the code of SOAP Client.

 $client = new SoapClient("cust.wsdl",array(
"trace"      => 1,
"exceptions" => 0,
"user" => 'username',
"pass" => 'password'));

$result = $client->getDetails($value1);

I need to capture and validate these username and password from server (SOAP SERVER) side.
This is my SOAP Server Code

class getDb {
//return DATA 
}

$server = new SoapServer("cust.wsdl");
$server->setClass("getDb");
$server->handle();

I need to Validate Client’s Username and Password from SOAP Server.

Anyone know how to capture SOAP Username and Password (“user” => ‘username’,
“pass” => ‘password’) from SOAPSERVER please provide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:07:01+00:00Added an answer on June 15, 2026 at 1:07 pm

    I have used below method and got success SOAP PHP authentication response from HTTP Auth method.

    My SOAP client statement as look like

    $client = new SoapClient("name.wsdl",array(
    "trace"      => 1,
    "exceptions" => 0,
    "login" => 'xxx',
    "password" => 'xxx'));
    

    I used this PHP statement for Authenticate PHP Auth header

        if(($_SERVER['PHP_AUTH_PW']!= $pass
     || $_SERVER['PHP_AUTH_USER'] != $login)
     || !$_SERVER['PHP_AUTH_USER'])
        {
            header('WWW-Authenticate: Basic realm="Test auth"');
            header('HTTP/1.0 401 Unauthorized');
            // OR ANY THING
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im rewriting application from .NET to PHP. I need to create class like this:
I have to create a PHP SOAP client that sends leads, but I have
i have create a form (so it's PHP and HTML hybrid-code). it has ability
I have to create a PNG / JPEG image from PHP script .. Briefly
I have a Create new account page. The form is in page named Register.php
I have a PHP script where I create a new process using proc_open().It executes
I want to create a php webservice server to be used from a C#
I created a SOAP client like so: $client = new SoapClient(file.wsdl); And then when
I need to create a SOAP request which looks like this: <soapenv:Body> <getItemsForProject> <token>
Help me to create an XML format like this : http://telkomvision.com/soap/timetable/monday.xml The code that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.