Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP SOAP Header construction
    primarykey
    data
    text
    <p>So basically I want the SOAP header to be like this:</p> <pre><code>&lt;soapenv:Header&gt; &lt;v1:loginDetails&gt; &lt;v11:Id&gt;0&lt;/v11:Id&gt; &lt;v11:username&gt;MEMBERS&lt;/v11:username&gt; $ &lt;v11:password&gt;0x909711E5,0xE301F82A,0x0E2783CC,0xAF6BC3DB,0x57727CFB&lt;/v11:password&gt; &lt;/v1:loginDetails&gt; &lt;/soapenv:Header&gt; &lt;soapenv:Body&gt; &lt;v11:GetNextAvailableMemberNumberRequest&gt; &lt;v11:Id&gt;1&lt;/v11:Id&gt; &lt;v11:memberId&gt;1&lt;/v11:memberId&gt; &lt;/v11:GetNextAvailableNumberRequest&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; </code></pre> <p>But instead, now I have this:</p> <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www..com/membership/types/v1_0"&gt; &lt;SOAP-ENV:Header&gt; &lt;ns1:loginDetails&gt; &lt;item&gt;&lt;key&gt;siteId&lt;/key&gt;&lt;value&gt;0&lt;/value&gt;&lt;/item&gt; &lt;item&gt;&lt;key&gt;Username&lt;/key&gt;&lt;value&gt;MEMBERSHIP&lt;/value&gt;&lt;/item&gt; &lt;item&gt;&lt;key&gt;Password&lt;/key&gt;&lt;value&gt;P@ssw0rd&lt;/value&gt;&lt;/item&gt; &lt;/ns1:loginDetails&gt; &lt;/SOAP-ENV:Header&gt; &lt;SOAP-ENV:Body&gt; &lt;ns1:GetNextAvailableMemberNumberRequest/&gt; &lt;param1&gt;1&lt;/param1&gt; &lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre> <p>And this is the php code that I'm currently using:</p> <pre><code>$client = new SOAPClient('http://192.168.180.128:8010//membershipService?wsdl',array('trace' =&gt; true)); $client-&gt;__setSoapHeaders(null); $headerbody = array ('siteId' =&gt; '0','Username' =&gt; 'MEMBERSHIP', 'Password' =&gt; 'P@ssw0rd'); $header = new SOAPHeader('http://www.com/club/services/membership/types/v1_0','loginDetails',$headerbody); $client-&gt;__setSoapHeaders($header); </code></pre> <p>Where have I gone wrong? I seems unable to construct the header properly.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload