RE: [SOAP] PHP5 SOAP Extension - Request Header Elements with Attributes
| From: | Dmitry Stogov | Date: | Fri, 12 May 2006 15:00:24 +0000 |
| Subject: | RE: [SOAP] PHP5 SOAP Extension - Request Header Elements with Attributes | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2273@lists.php.net to get a copy of this message | ||
Hi Peter,
XML attributes works fine with ext/soap in WSDL mode.
You shouldn't care then put value into attribute or node, ext/soap does this
automatic according to WSDL.
Dmitry.
> -----Original Message-----
> From: Peter De Vries [mailto:pdevr99@yahoo.com]
> Sent: Friday, May 12, 2006 12:41 PM
> To: David; Dmitry Stogov
> Cc: 'Paul Osman'; soap@lists.php.net; 'Rob Richards'
> Subject: Re: [SOAP] PHP5 SOAP Extension - Request Header
> Elements with Attributes
>
>
> Hello all,
>
> I'm by no means an expert here, but think about this: the
> reason we're (re)loading into DOM objects is to add
> attributes. To me it looks like a straightforward thing to
> add support for just that to the SoapClient and/or the
> SoapHeader class. In the SoapHeader class you can set the
> value for 'mustUnderstand'...why not make that more generic?
> (Add attributes, link to namespaces, set values, etc.). The
> way PHP handles this at the moment is not very flexible and
> not completely consistent. (The PEAR SOAP extension for
> instance automatically adds the 'actor' attribute. I couldn't
> find a way to get rid of it, my SOAP server doesn't
> understand it and therefore I can't use the
> extension.)
>
> Hope this helps the discussion,
> Peter.
>
>
> --- David <me@contents.nl> wrote:
>
> > Hi Dmitry,
> >
> > Dmitry Stogov wrote:
> > > Which kind of DOM do you mean?
> > > Do you mean ext/simplexml or ext/dom?
> >
> > I prefer ext/dom, but ext/simplexml will do as well.
> >
> > > I don't like make ext/soap dependent on them.
> > >
> > > Btw you probably can simple make it in PHP itself with something
> > > like this.
> > >
> > > class DomSoapClient extends SoapClient {
> > > function __doDomRequest($dom) {
> > > return string2dom($this->__doRequest(dom2string($dom),
> > > ...));
> > > }
> > > }
> > >
> > > Isn't this enough for you?
> >
> > This would indeed work (only on the soap client), but re-loading it
> > into
> > a dom document while we already had a libxml xmlDoc is a
> waist of resources.
> >
> > Maybe Rob's sugestion is a better idea? We could save the latest
> > request/response xmlDoc and create a handler for
> php_libxml_import_node.
> >
> > Kind regards,
> >
> > David
> >
> >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>