I have a question, I need to send this XML format to a SOAP service to get an answer, but I do not know how to add those headers
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.sunat.gob.pe" xmlns:wsse="http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soapenv:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>20100066603MODDATOS</wsse:Username>
<wsse:Password>moddatos</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ser:sendSummary>
<fileName>20100066603-RC-20110522-1.zip</fileName>
<contentFile>cid:20100066603-RC-20110522-1.zip</contentFile>
</ser:sendSummary>
</soapenv:Body>
</soapenv:Envelope>
I was looking for and I saw the function DomDocument of the PHP manual to generate XML but I can not send it . Also try SOAPClient but it is not clear to me how to add the headers.