And the support of the site i'm connetcing to dosent know PHP.
What i'm trying to do is to login to there webservice, and then run getSalesPartCatalog() call to get there inventory.
This is what i have now.
Code: Select all
$apiUrl = 'https://secure.brightpoint.eu/ws/external/partCatalog/external.asmx?WSDL'; //Address to API
$client = new SoapClient($apiUrl,array("trace" => 1, "exceptions" => 1)); //Create Soap client
$harray = array(
"sCustomerNo" => "**",
"sInstance" => "**",
"sSite" => "**",
"sPassword" => "**"
);
$headurl = "https://secure.brightpoint.eu/ws/external/partCatalog";
$header = new SOAPHeader($headurl, 'AuthHeaderUser', $harray); // Send header
$client->__setSoapHeaders($header);
$result = $client->getSalesPartCatalog(); // Line 57
echo($result);
Fatal error: Uncaught SoapFault exception: [soap:Server] Server was unable to process request. ---> Login failed in /home/telldsse/public_html_new/CSVSystem/Brightpoint.php:57
They provieded me with the xml I need to send
Code: Select all
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:par="https://secure.brightpoint.eu/ws/external/partCatalog">
<soapenv:Header>
<par:AuthHeaderUser>
<par:sCustomerNo>**</par:sCustomerNo>
<par:sInstance>**</par:sInstance>
<par:sSite>**</par:sSite>
<par:sPassword>**</par:sPassword>
</par:AuthHeaderUser>
</soapenv:Header>
<soapenv:Body>
<par:getSalesPartCatalog/>
</soapenv:Body>
</soapenv:Envelope>