I'm not really sure what the bug submitter is trying to do. My understanding is that he is trying to send a header in a soap request, but doesn't the example already show how to do that?

Example 1. Some examples
<?php
$client = new SoapClient(null, array('location' => "http://localhost/soap.php";,
'uri' => "http://test-uri/";));
$client->__call("echoVoid", null, null,
new SoapHeader('http://soapinterop.org/echoheader/',
'echoMeStringRequest',
'hello world'));
?>


http://de3.php.net/manual/en/function.soap-soapheader-construct.php

If I am understanding this correctly, perhaps another example showing the creation of a soap header similar to the code Leonardo provided:

$namespace = 'http://www.example.com';
$soap_headers = array(
    new SoapHeader($namespace, 'key', 5),
    new SoapHeader($namespace, 'lock', 'door'));

Perhaps someone with more experience of soap might like to take over this one? :)

Regards,

David Mytton
Managing Director - Olate Ltd
http://www.olate.co.uk



Leonardo Boshell wrote:
Hi David,



Ok. I'm not too familiar with SOAP (never needed to use it before) so I'll have to do some research into this before I do so. But does anyone have any examples for this function I could possibly use?


I was asked recently to develop a program that used Google's AdWords
API, which uses SOAP as the transport protocol.

I'm attaching a piece of the PHP code I used in that program. It only
shows how to send SOAP headers when acting as a client, but I guess it
should be similar when acting as a server.

Feel free to modify it to the needs of the manual.


Leonardo B.

Reply via email to