PHP call to WCF - soap header issue -


i making php application , want use wcf service, working good. need make soap call, , set header this:

<s:header> <a:action s:mustunderstand="1">getpage</a:action> <a:messageid>1</a:messageid> <a:replyto>   <a:address>http://www.w3.org/2005/08/addressing/anonymous</a:address> </a:replyto> <a:to s:mustunderstand="1">http://someurl.com</a:to> 

in php file want make call have:

$ns = 'http://www.w3.org/2005/08/addressing'; //namespace of ws. //body of soap header. $headerbody = array('messageid' => '1',                     'action' => 'getpage',                     'to' => 'http://someurl.com');    //create soap header. $header = new soapheader($ns, $headerbody);  //set headers of soap client. $soapclient->__setsoapheaders($header); $getpageresponse = $soapclient->getpage($getpagerequest); 

when go logs of service, see message came in looks like:

<soap-env:envelope xmlns:soap- env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:flow/2012/10"> <soap-env:header>  <to soap-env:mustunderstand="1"      xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://someurl.com</to> <action soap-env:mustunderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">urn:flow/2012/10/getpage</action> </soap-env:header> </soap-env:envelope> 

$getpagerequest irrelevant. so, in header there no messageid. missing here? did set wrong? also, how correctly set part 'replyto'?

not sure why messageid not getting through in output yet, adding replyto->address simple adding sub-array header array.

$headerbody = array('messageid' => '1',                 'action' => 'getpage',                 'to' => 'http://someurl.com',                 'replyto' => array (                       'address' => 'http://www.w3.org/2005/08/addressing/anonymous'                       )                  );  

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -