Re: SOAPHeader Help

From: Date: Fri, 23 Feb 2007 10:54:09 +0000
Subject: Re: SOAPHeader Help
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-2464@lists.php.net to get a copy of this message
It's actually quite simple. The bulk of the code is just creating the header portion: $client = new SoapClient('http://test.iodeme.com/iodeme.asmx?WSDL'); $auth = array('agentID'=>'MYLOGINID',
              'username'=>'MYUSERNAME',
              'authenticated'=>'true');
$authvar = new SoapVar($auth, SOAP_ENC_OBJECT); $header = new SoapHeader("http://iodeme.arenaopen.com/",
                          "AuthenticationInfo", $authvar, false);
$client->__setSoapHeaders(array($header)); $client->GetBankList(array('getAll'=>FALSE)); Rob A. Bahadýr UGE wrote:
Hi Everyone I have no idea to SOAP. I want improve about SOAP codding with php. I usually use CURL functions like tihs projects but this is very diffrent. I have problem about business partner SOAPHeader Communication They want SOAP message like this first <?xml version="1.0" encoding="utf-16"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Header>
    <AuthenticationInfo xmlns="http://iodeme.arenaopen.com/">
      <agentID>MYLOGINID</agentID>
      <username>MYUSERNAME<username />
      <authenticated>true</authenticated>
    </AuthenticationInfo>
</soap:Header> <soap:Body>
    <GetBankList xmlns="http://iodeme.arenaopen.com/">
      <getAll>false</getAll>
    </GetBankList>
</soap:Body> </soap:Envelope> SOAPAction : "http://iodeme.arenaopen.com/GetBankList"
Url       : "http://test.iodeme.com/iodeme.asmx"
How can i create php code for this SOAP XML Please help me. Thanks A. Bahadir UGE


« previous php.soap (#2464) next »