i trying call soap based webservice. following wsdl webservice
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:var="some_namespace"> <soapenv:header/> <soapenv:body> <var:someservicerequest name="xxx" school="yyy" format="pdf" sendername1="aaa" /> </soapenv:body> </soapenv:envelope>
now have tried possibilities call webservice using soapclient class in php. getting 'invalid xml' in response.
following way seems obvious dont understand why not working:
$soapclient = new soapclient($this->getwsdlurl(), array('trace' =>true, 'soap_version' => soap_1_2, )); $headerbody = array('usernametoken'=>array('username'=>'someusername', password'=>'somepassword')); $header = new soapheader('https://xxx/soapconnector','security',$headerbody); $soapclient->__setsoapheaders($header); $oresponse = $soapclient->someservice(array('name'=>'asd', 'school'=>'sdf','format'=>'asdf'));
Comments
Post a Comment