php - Posting xml to SOAP service -


i'm new soap , php , i'm having troubles, hope here on stack overflow can me with.

i'm trying use code post xml file (retursvar.xml).

i'm using code post file:

<?php $url = "https://someserver/somefunction";  $options = array(                 'login' => 'someusername',                 'password' => 'somepassword',                 'trace' => 1 );  $client = new soapclient($url.'?wsdl', $options);  $document = file_get_contents('retursvar.xml');  $params = array('submitdocument' => $document); $response = $client->__soapcall('submitdocument', $params); 

but error in apache error log:

php fatal error:  uncaught soapfault exception: [bpws:forcedtermination] business exception in /var/www/html/soaptest.php:15\nstack trace:\n#0 /var/www/html/soaptest.php(15): soapclient->__soapcall('submitdocument', array)\n#1 {main}\n  thrown in /var/www/html/soaptest.php on line 15 

if call:

var_dump($client->__getfunctions()); 

immediately after:

$client = new soapclient($url.'?wsdl', $options); 

i output:

array(1) { [0]=> string(62) "submitdocumentresponse submitdocument(submitdocument $payload)" }  

what doing wrong?

it says haven't caught exception. try wrapping code inside try catch block.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -