On 17 December 2010 17:13, bkrqpzef <bjornulf.frode@gmail.com> wrote: > > Hoaw, that's a good idea, i will try if i can simplify my code that way. > About a thing ... I think i have done something which is absolutely wrong. > (It works though) > > I keep the xml in a variable and apply to it a xml parser into a struct. (To > find the information I need) > I'm sure that i can use some variables to access them. > I'm able to do this with mines that way "{OPTION->HERE->IS->DETAILS}". > But i try to access to the request the same way without any result. > > I kind of lost here. Should I work on the return of the __getLastResponse() > ? __getLastRequest() and __getLastResponse(). I demonstrate those in the catch() code I showed you a while ago ... catch(Exception $e) { echo 'Request Headers', PHP_EOL, '---------------', PHP_EOL, $service->__getLastRequestHeaders(), PHP_EOL; echo 'Request', PHP_EOL, '-------', PHP_EOL, $service->__getLastRequest(), PHP_EOL; echo 'Response Headers', PHP_EOL, '----------------', PHP_EOL, $service->__getLastResponseHeaders(), PHP_EOL; echo 'Response', PHP_EOL, '--------', PHP_EOL, $service->__getLastResponse(), PHP_EOL, PHP_EOL; echo 'Exception', PHP_EOL, '---------', PHP_EOL, $e->getMessage(), PHP_EOL; } You _CAN_ pass them to a parser, but the whole point is that you can use OOP rather than XML parsing. As the XML _CAN_ be laid out differently for different communication scenarios, you don't want to have to deal with all the variations that can come back. The OOP way is maybe a little awkward to start with, but I think is easier to expand upon. Remember that the classes that are created by wsdl2php are very basic. You can always extend them or amend them as you see fit. Only public properties of the non service classes are populated. You can still add your own methods making things easier to work with. Richard. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php