Soap connection problem

Discussion in 'PHP' started by goodmast3r, Jul 12, 2009.

  1. #1
    I'm having a problem using SOAP. It is accessing http://uat.webservice.apm.com.au/fee...tial.asmx?WSDL

    My code is :
    PHP Code:


    $client = new SoapClient("http://uat.webservice.apm.com.au/feed/residential.asmx?WSDL");
    
    
        $params = array('login' =>'theusername',
    
                        'password' =>'thepassword',
    
                        'trace' => 1,
    
                        'postcode' =>'2112',
    
                        'state' => 'nsw'
    
                        );
    
    
    
        $result = $client->GetResidentialResultsByPostcodeState($params); 
    PHP:

    The error is "System.Web.Services.Protocols.SoapHeaderException: Invalid Username/Password at Residential.GetResidentialResultsByPostcodeState(String postcode, String state". I've checked the username and password, it's correct. But I have doubt on my code. Anything wrong with it? Thanks.
     
    goodmast3r, Jul 12, 2009 IP
  2. HivelocityDD

    HivelocityDD Peon

    Messages:
    179
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The best way to use Soap with PHP is using nusoap library instead of using php's default soap option.
     
    HivelocityDD, Jul 13, 2009 IP