{"action":"closed","issue":{"number":42,"created_at":"2011-10-09T14:18:16Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Scope of Change\n====\nThe SOAPClient class will provide a method to set headers for the SOAP\nrequest.\n\n\nRationale\n====\nImplementation of clients for SOAP services that require request headers,\ne.g. EBay.\n\n\nFunctionality\n====\nA new interface named xml.soap.SOAPHeader will be created:\n\n\n```php\n<?php\n  class SOAPHeader extends Interface {\n\n    /**\n     * Retrieve XML representation of this header for use in a SOAP\n     * message.\n     *\n     * @access  public\n     * @param   array<string, string> ns list of namespaces\n     * @return  &xml.Node\n     */\n    function &getNode($ns) { }\n  }\n?>\n```\n\nCustom SOAP headers must implement this interface.\n\nExample:\n\n```php\n<?php\n\n  class EbayRequesterCredentialsHeader extends Object {\n    var\n      $token     = '',\n      $appid     = '',\n      $devid     = '',\n      $authcert  = '';\n\n    function __construct($token, $appid, $devid, $authcert) {\n      $this->token= $token;\n      $this->appid= $appid;\n      $this->devid= $devid;\n      $this->authcert= $authcert;\n    }\n\n    function &getNode($ns) {\n      $n= &new Node('RequesterCredentials', NULL, array(\n       'xmlns'        => 'urn:ebay:apis:eBLBaseComponents', \n       'xmlns:tns'    => 'urn:ebay:apis:eBLBaseComponents', \n       'xmlns:xsi'    => 'http://www.w3.org/2001/XMLSchema-instance', \n       'xsi:type'     => 'tns:CustomSecurityHeaderType',\n      ));\n      $n->addChild(new Node('eBayAuthToken', $this->token));\n      with ($credentials= &$n->addChild(new Node('Credentials'))); {\n        $credentials->addChild(new Node('AppId', $this->appid));\n        $credentials->addChild(new Node('DevId', $this->devid));\n        $credentials->addChild(new Node('AuthCert', $this->authcert));\n      }\n      return $n;\n    }\n  } implements (__FILE__, 'xml.soap.SOAPHeader');\n?>\n```\n\nSecurity considerations\n====\nNone.\n\n\nSpeed impact\n====\nNone.\n\n\nDependencies\n====\nSOAPHeader interface\n\n\nRelated documents\n====\n- Patch implementing this RFC\n  http://xp-framework.net/downloads/soap-headers.diff\n\n\nComments\n====\nn/a\n\n\n<EOF>\n","comments":0,"title":"RFC 0042: SOAP Headers API","updated_at":"2011-10-09T14:43:51Z","url":"https://api.github.com/repos/thekid/rfc/issues/42","id":1856247,"assignee":null,"milestone":null,"closed_at":"2011-10-09T14:43:51Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/26f07e3b262e9a80436f368cb11bd0c2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/thekid","id":696742,"login":"thekid"},"html_url":"https://github.com/thekid/rfc/issues/42","labels":[{"name":"implemented","url":"https://api.github.com/repos/thekid/rfc/labels/implemented","color":"e102d8"},{"name":"rfc","url":"https://api.github.com/repos/thekid/rfc/labels/rfc","color":"02e10c"}],"state":"closed"},"legacy":{"number":42,"action":"closed","issue":1856247}}