You may be working in PHP a little less than a compatible WSDL2 implementation. You can try the following and cross your fingers;
Headerbody should be implemented at the same depth as in xml, since I do not have access to the navigation documentation here is a sample code:
$headerbody = array('Token' => $someToken, 'Version' => $someVersion, 'UserCredentials'=>array('UserID'=>$UserID, 'Password'=>$Pwd));
// If you need multiple headers, create a header $ headers [] = $ and add to the headers after.
$options = array( 'uri'=>'http://schemas.xmlsoap.org/soap/envelope/', 'style'=>SOAP_RPC, 'use'=>SOAP_ENCODED, 'soap_version'=>SOAP_1_1, 'cache_wsdl'=>WSDL_CACHE_NONE, 'connection_timeout'=>15, 'trace'=>true, 'encoding'=>'UTF-8', 'exceptions'=>true, ); try { $soap = new SoapClient($wsdl, $options); $soap->__setSoapHeaders($header); $data = $soap->SubmitAnsiSingle(array($submitrequest)); } catch(Exception $e) { die($e->getMessage()); }
Hope this is helpful - if WSDL2 is really used, you can make it work with nusoap , which can be found on sourceforge. Although this has not been updated for quite some time.
source share