I need to create a Soap request using PHP's Soap extension. I have searched and read both SO questions and the PHP.net manual, however, I have not been able to find a plain English explanation regarding how to implement a custom header with multiple namespaces, a special type, etc. Basically, I just find all the current documentation very difficult to understand, and need someone to offer a more down-to-earth explanation of how to accomplish the request below:
<OAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.some-url1.com" xmlns:ns2="http://www.some-url2.com" xmlns:ns3="http://www.some-url3.com">
<OAP-ENV:Header>
<s2:Security SOAP-ENV:mustUnderstand="1">
<s2:UsernameToken>
<s2:Username>someusername</ns2:Username>
<s2:Password Type="http://www.some-url4.com">somepassword</ns2:Password></ns2:UsernameToken></ns2:Security></SOAP-ENV:Header>
<OAP-ENV:Body>
<s1:invokeSomeService>
<s3:someRequest ns3:someReferenceNumber="912" ns3:locale="en_US" ns3:someAliasName="SOME_NAME" ns3:someTrackingID="THE-ID-123">
<s3:inputCriteria>
<s3:name>
<s3:firstName>John</ns3:firstName>
<s3:lastName>BBITTERSWEET</ns3:lastName></ns3:name>
<s3:address ns3:someExtraInfo="EXTRA_INFO_HERE">
<s3:addressLine1>1 Main St</ns3:addressLine1>
<s3:city>Anywhere</ns3:city>
<s3:stateCode>NY</ns3:stateCode>
<s3:postalCode>12345</ns3:postalCode>
<s3:countryCode>US</ns3:countryCode></ns3:address></ns3:inputCriteria></ns3:someRequest></ns1:invokeSomeService></SOAP-ENV:Body></SOAP-ENV:Envelope>