I need some help
I have to connect a SOAP webservice, using PHP
I have the service, something like this: http://xxx/xxx/Servicios?wsdl (real url is hidden) I have an user and password for this
A method is implemented (by other team), SelectLectores, and request is something like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:impl="http://xxxxxxxxx">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>myuser</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">mypassword</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<impl:selectLectores>
<arg0>
<!--Mandatory:-->
<centro>51000286</centro>
<!--Optional:-->
<codigoLector>14103</codigoLector>
</arg0>
</impl:selectLectores>
</soapenv:Body>
</soapenv:Envelope>
Im using this code to connect in php:
$service="http://xxx/xxx/Servicios?wsdl";
$param=array();
$param['centro']=51000286;
$validation= array(
'Username' => 'myuser',
'Password' => 'mypassword'
);
$client = new SoapClient($service,$validation);
$result = $client->selectLectores($param);
But doesn´t work, shows this error: 500 | Internal Server Error | SoapFault java.lang.NullPointerException
Im doing something wrong?