NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Error while trying to pass literal parameters


Joined: 11 Dec 2006
Posts: 1
Reply with quote
Hi,

I am trying to access a SOAP service which can be found on the following url: http://myserver/. The WSDL for this service can be found at http://myserver/Xtract.asmx?WSDL.

When i try to do access the operation GetPrice I get a Access Denied error which means that username and/or password is incorrect, but I know 100% sure it is correct. So I think my PHP code is wrong.

Code:

<?php
    # Include needed files
    require_once("NuSOAP.php");
    require_once("Messages.php");

    $client = new nusoapclient("http://xtract.bascomputers.nl:4040/Xtract.asmx?WSDL", true);

    $params = array(
        "customerID" => myid,
        "password" => "mypass",
        "productID" => "1492",
    );

    $result = $client->call("GetPrice", $params, "http://www.bascomputers.nl/", "http://www.bascomputers.nl/GetPrice");

    # Display the SOAP request and response
    $outgoing = $client->request;
    $incoming = $client->response;
    echo $custom . 'Outgoing SOAP Message:' . $customend . $outgoing . $end;
    echo $custom . 'Incoming SOAP Message:' . $customend . $incoming . $end;

 
    echo "<p style=\"border: 1px dotted #CCCCCC; background: #EBEBEB; font-family: Courier New; font-size: 8pt; padding: 5px;\"><xmp>";
    print_r($result);
    print_r($client->debug_str);
    echo "</xmp></p>";
?>


I already tried params as a string too. But it gives me the same error.

The error i got is as follows
Code:

Array
  (
    [GetPriceResult] => Array
      (
        [Products] => Array
          (
            [Error] => Array
              (
                [!ID] => 2
                [!Message] => Access denied
              )
          )
      )
  )


Thanks.
View user's profileFind all posts by dirkjanvenemannSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7893
Reply with quote
your may want to contact maintainers behind http://myserver/Xtract.asmx?WSDL and ask them what does "Access denied" error mean.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Error while trying to pass literal parameters
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic