Submit file php soap server -


i requesting issue have. trying submit file server using php soap when submit, have error:

fatal error: uncaught soapfault exception: [soap11env:client.schemavalidationerror] :2:0:error:schemasv:schemav_element_content: element '{http://mutalyzer.nl/2.0/services}submitbatchjob': missing child element(s). expected ( {http://mutalyzer.nl/2.0/services}data ). in c:\xampp\htdocs\ngs\submit4.php:31 stack trace: #0 c:\xampp\htdocs\ngs\submit4.php(31): soapclient->__call('submitbatchjob', array) #1 {main} thrown in c:\xampp\htdocs\ngs\submit4.php on line 31 

the wsdl description following:

submitbatchjob type submitbatchjob

data type base64binary process - optional, nillable; type string argument - optional, nillable; type string email - optional, nillable; type string 

submitbatchjobresponse type submitbatchjobresponse

submitbatchjobresult - optional, nillable; type string  <xs:complextype name="submitbatchjob"> <xs:sequence> <xs:element name="data" type="xs:base64binary" /> <xs:element name="process" type="xs:string" minoccurs="0" nillable="true" /> <xs:element name="argument" type="xs:string" minoccurs="0" nillable="true" /> <xs:element name="email" type="xs:string" minoccurs="0" nillable="true" /> </xs:sequence> </xs:complextype> 

here php script:

<?php $url = 'https://mutalyzer.nl/services/?wsdl'; ?><!doctype html> <html lang="en"> <head>   <meta charset="utf-8">   <title>mutalyzer soap client</title> </head> <body> <h1>mutalyzer soap client</h1> <?php if (isset($_get['data']) && $_get['data']) {      $variant = $_get['data'];       $_files['data']['name']=$_get['data'];     $filename = basename( $_files['data']['name']);     $file = fopen($filename, "r");     $handle = fread($file,filesize($filename));     $data = base64_encode($handle);       $namechecker=$_get['process'];     echo '<h2>result '.htmlentities($variant).'</h2>';     $options = array('features' => soap_single_element_arrays);      $client = new soapclient($url);      $result = $client->submitbatchjob($data, $namechecker)                   ->submitbatchjobresult;   print_r($result);  }  ?>  <h2>submit job data file mutalyzer</h2>  <form action="" method="get" enctype="multipart/form-data"> <p> input file: </p> <input name="data" type="file" id="data" /> <br/>   process : <input type="text" size="10" name="process" id="process" value="namechecker"/> <br/>   <input type="submit" name="upload" value="submit" /> </form>  </body> </html> 

does know doing wrong , how correct script ? many thanks.

first need catch exception, with:

 try {    # code here causes problem, hint: soap11env:client.schemavalidationerror     } catch (exception $e) {         echo $e->getmessage();     } 

second, it's telling error is:

element '{http://mutalyzer.nl/2.0/services}submitbatchjob': missing child element(s). expected ( {http://mutalyzer.nl/2.0/services}data ).  

and also:

in c:\xampp\htdocs\ngs\submit4.php:31 stack trace: #0 c:\xampp\htdocs\ngs\submit4.php(31): soapclient->__call('submitbatchjob', array) #1 {main} thrown in c:\xampp\htdocs\ngs\submit4.php on line 31 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -