[Phpwm] SOAP/XMLRPC/ Web services question
David Goodwin
david at codepoets.co.uk
Mon Apr 7 19:07:09 BST 2008
Tim Williams wrote:
> On Tue, 1 Apr 2008, David Goodwin wrote:
>
>> So... I've made the assumption that cookies/sessions "work as normal"
>> when making xmlrpc/soap calls? Is the same also true for SDO stuff?
>
> I've been writing some PHP code recently that communicates with a remote
> SOAP server. The mechanism used by this server was as follows :
>
> 1) Call a SOAP login function. This functions returns a session key in
> it's XML response.
> 2) Call the soap functions you actually need with the session key as
> part of the SOAP header.
> 3) Call a SOAP logout function.
>
> Not exactly sure what would happen if the remote server was trying to
> use cookies, I would assume that the client code would have to be able
> to cope with this, making it more complicated to write, so the session
> keys are easier to work with.
>
> Tim W
>
Hi,
Yes; I'm tempted to provide a proxy 'service' on the xmlrpc code so
clients which can't do cookies have to provide (effectively) a
PHPSESSIONID as the first parameter. Method calls then get passed
through to the 'normal' code.
It seems not straight forward to create e.g. a Java XMLRPC client which
supports cookies (and likewise for Python).
I'm reading a Packt book which covers SOAP/XMLRPC, and it's briefly
mentioned using headers, but not in _any_ detail (there was about 20
words on it)... so, are headers part of the SOAP protocol, and
effectively what I'm trying to achieve with cookies? (i.e. are using
them the real solution to my problem?)
The thing that puts me off SOAP is the WSDL file definition/creation.
David.
--
David Goodwin
[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk ]
More information about the Phpwm
mailing list