Jump to content

SOAP Request with PHP


tutorialstuff

Recommended Posts

I am currently trying to work with a 3rd party vendor(acxiom) that requires the use of SOAP requests.

 

Link to vendor dev center

https://aissreports.acxiom.com/devzone

login: devzone1

password: acxiom

 

Once inside, click the link on the left that says "XML Background Checks"

 

I have several diferent versions of code that I've tried using. I've gone with the built in PHP SOAP class and tried nusoap as well and have had no luck.

 

Here's my attemtp with built in PHP SOAP Class

<?php

$client = new SoapClient('https://aissreports.acxiom.com/xmlbackgroundtests/xmlresults.asmx?wsdl');
$header = new SoapHeader('https://aissreports.acxiom.com/XMLBackgroundTests/SubmitRequest', 
                            'echoMeStringRequest',
                            'hello world');

$client->__setSoapHeaders($header);

$params = array("fileasstring" =>$requestString);
$requestString = file_get_contents('https://aissreports.acxiom.com/devzone/src/1-Integrations/1-XML_Background_Checks/Xml_Request_Examples/Sample_Requests/Sample_A_la_Carte_Product_Request.xml');

$client->__soapCall("SubmitRequest", $params, null);
?>

 

This gives me the error

Fatal error: Uncaught SoapFault exception: [Client] Function ("SubmitRequest") is not a valid method for this service in /home/tinymike/public_html/ldshelp4hire.com/test/soap_net.php:13 Stack trace: #0 /home/tinymike/public_html/ldshelp4hire.com/test/soap_net.php(13): SoapClient->__soapCall('SubmitRequest', Array, NULL) #1 {main} thrown in /test/soap_net.php on line 13

 

Here's my attempt with nusoap

<?php
// Pull in the NuSOAP code
require_once('../nusoap/lib/nusoap.php');
// Create the client instance
$client = new soapclient('https://aissreports.acxiom.com/XMLBackgroundTests/Request.asmx?wsdl');
// Call the SOAP method
$result = $client->call('PersonName', array('GivenName' => 'Mischa'));
// Display the result
print_r($result);
?>

 

which gives me the error

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'https://aissreports.acxiom.com/devzone/src/1-Integrations/1-XML_Background_Checks/Xml_Request_Examples/Sample_Requests/Sample_A_la_Carte_Product_Request.xml' in /home/tinymike/public_html/ldshelp4hire.com/test/nusoap_1.php:5 Stack trace: #0 /home/tinymike/public_html/ldshelp4hire.com/test/nusoap_1.php(5): SoapClient->SoapClient('https://aissrep...') #1 {main} thrown in /test/nusoap_1.php on line 5

 

Any and all help is greatly appreciated. I've been stumped on this for many days now and am about to lose my mind.  :'(

Link to comment
https://forums.phpfreaks.com/topic/169968-soap-request-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.