SOAP extensions in PHP has a very funky method: SetClass() that assigns a defined class as a class exposed by a webservice (or multiple classes, need wsdl file though).

Any way, the question: Does this functionality allow for maintaining state.

For example when I call method 'foo' it will set some class variables and then return something. After that I want to access method 'bar' and retrieve those class variables that were set in 'foo'.

As far as I know it could not maintain state (yes, I tried). But would be interested to know if there is a way of doing this. I noticed some PHP SOAP cache variables , but dont think thats it.

Also, does anyone know of a small app/webb app (for Linux) that will build a WSDL file given a class or a set of methods, etc.

Serg

    20 days later
    2 months later

    The SoapServer->setPersistence() method may help you out.

      Write a Reply...