Hey Why are your result returned in XML ? A normal webservice are surposed to return the value as a native type, typical object or array. Also, just use simplexml for the parsing, it supports xpath. 2007/4/26, Jeppe Donslund <jd@webmasters.dk>:
Hi again, Claus, your suggestion was great. In a few lines I now got the response as an object i the variable $xmlStr. How do I parse this so that I get the values I need? This is the string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LogOnResponse xmlns="http://tempuri.org/ "><LogOnResult><strSessionID>53a19d2b-a467-4a51-84d5-66589c36dbe4</strSessionID><strLoginID>4179</strLoginID><strRoleType>Account User</strRoleType><arryRights><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int><int>0</int></arryRights><SessionID>53a19d2b-a467-4a51-84d5-66589c36dbe4</SessionID><LoginID>4179</LoginID><RoleType>Account User</RoleType></LogOnResult></LogOnResponse></soap:Body></soap:Envelope> Jeppe Donslund skrev: > Hi Claus, > > Could you show me an exampel or maybe a link to one? > I can't figure out how to do reading php.net. > > > Regards, > Jeppe > > > > Claus Jørgensen skrev: >> Hey >> >> If you work with PHP5, can you explain why not using the SOAP api, >> www.php.net/soap , then? >> That pratical will do what you tried to do in a few lines. >> >> 2007/4/25, Jeppe Donslund <jd@webmasters.dk>: >>> >>> Hi Rob, >>> >>> Thank you for your answer. It make sense to me. I'll try what you >>> suggest. >>> >>> I work with PHP5 so maybe there is an easier way to do the job. >>> >>> >>> >>> Regards / Med venlig hilsen >>> >>> Jeppe Donslund >>> Programmør >>> >>> Tlf. dir. 7633 8824 >>> >>> Webmasters >>> Agtrupvej 51 >>> 6000 Kolding >>> >>> Tlf. 7550 8877 >>> jd@webmasters.dk >>> www.webmasters.dk >>> >> >> >> -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Sincerely Claus Jørgensen, Denmark Mobil: +45 30 13 27 32 http://www.dragons-lair.org