PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
After days of googling and not getting any answers I turn to this forum hoping for some help. I need to comsume a webservice wich requires special headers in the soap msg with logininformation. My question is, how do I add headers to the msg? I would like to do this with the extension in php5...but if anyone here have better knowledge in nusoap or anything else this would work aswell. Getting desperate here!
SoapHeader is a special low-level class for passing or returning SOAP headers. It's just a data holder and it does not have any special methods except its constructor. It can be used in the SoapClient->__soapCall() method to pass a SOAP header or in a SOAP header handler to return the header in a SOAP response.
Thank you Jcart for the reply
I've trying to work with that function shortly but didn't get it to work. The structure in my call is rather complexed and I cant get it to work without wdsl wich cant be used in SoapClient->__soapCall()
I've been experimenting with setSoapHeaders...doing like this:
$userId = new SoapHeader('', 'userId', 'xxx'); //not sure if the first parameter here is important?
$userPassword = new SoapHeader('', 'userPassword', 'xxx');
$client->__setSoapHeaders(array(1 => $userId, 2 => $userPassword));