marxjohnson
marxjohnson

Reputation: 840

Setting SOAP header XML tag attribute in PHP

I'm trying to send a SOAP request via PHP with the following header:

<soap:Header>
    <SecureSoapHeader SecureHeader="boolean" xmlns="http://www.capitafhe.co.uk/UNIT-e/">
      <settings>
        <Database>string</Database>
        <UserName>string</UserName>
        <Password>string</Password>
      </settings>
      <Database>string</Database>
      <UserName>string</UserName>
      <Password>string</Password>
    </SecureSoapHeader>
</soap:Header>

Using the PHP SOAP functions, I've managed to create a header equivalent to above (using tag prefixes in place of the xmlns attribute) except for the SecureHeader="boolean" bit. Is this possible using PHP's functions?

Upvotes: 6

Views: 5115

Answers (1)

Andr&#233;
Andr&#233;

Reputation: 12737

You can try to create the headers the raw way.

Here is an example: http://www.php.net/manual/en/soapheader.soapheader.php#83026

Upvotes: 1

Related Questions