php - Request Soap WSDL -


i've started new project soap request, follow tutorials , doesn't work should.

i use part of code request :

$client = new soapclient("wsdl");   $param = array(   "requestdate" => $date,   "accountuid" => $id,   "userid" => $id,   "locale" => $local,   "authenticationinfo" => array("password" => $pass),   "image" => array(                 "type" => $type,                 "light" => $light,                 "source" => $source,                                 //the image has in base64binary                 "image" => base64_encode((fread(fopen("file", "r"), filesize("file"))))             )                   );   try{    //checkimage --> function on server side    $answer = $client->checkimage($param); } catch(soapfault $e){    echo $e; } 

and give me error :

soapfault exception: [http] unsupported media type stack trace:

> #0 [internal function]: soapclient->__dorequest('<?xml version="...', 'https://smartey...', '', 1, 0) > #1 soapclient->__call('checkimage', array) > #2 soapclient->checkimage(array) 

the type of parameters okay according documentation i've got. , php part seems okay me , tutorials i've found.

i'm wondering if header problem or that.

the wsdl [here](https://smarteye.ariadnext.com/ariadnext/ws/smarteyews_v1r0?wsdl
)

if has idea or clue problem, i'm starting drive crazy !

thanks .

the error message "unsupported media type" means peer http server not support content-type used encode request message. message exchange regarded having completed unsuccessfully.

you should contact web-service provider concerning content-type/encoding expect.

a possible solution if using soap_1_2is change soap_1_1 since alter requests made.

this can accomplished with:

'soap_version' => soap_1_1; 

this duplicate of post: soapfault exception: [http] unsupported media type when accessing java web-service php


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -