Well_dat_blows
New Member
I've built a webservice that's acting as a dictionary. The webservice in general works great, all the responses are correct, etc.However, I now want to display the results the server returns in a HTML Table. The problem is I got no clue how to do this and google research didn't really help much. The only proper information I could aquire seems to be that I should use a soapclient to solve this problem. Unfortunantly there weren't any examples and all I tried resulted in error messages.So here's my code (I shortened it for display here):client: \[code\]function getTranslation($searchValue, $direction, $source){global $client; $resultGetTranslation=$client->call('getTranslation', array('searchValue' => $searchValue, 'direction' => $direction, 'source' => $source)); convertResult($resultGetTranslation); return $resultGetTranslation;}\[/code\]The function covertResult() is the one I want to get implemented and that should return the HTML Table.server:\[code\]$server->wsdl->addComplexType('ArrayList'); $server->register ( 'getTranslation', array('searchValue' => 'xsd:string', 'direction' => 'xsd:int', 'source' => 'xsd:int'), array('translationValue' => 'tns:ArrayList'), 'urn:server', 'urn:server#getTranslation', 'rpc', 'encoded', 'Translation' );\[/code\]The actual method shouldn't matter, as it's working fine and is too long to post here. However, the return value is a single array: \[code\]return $returnArray;\[/code\]So yeah, what I'd need to know is how to get the information contained in the server reponse ($resultGetTranslation) into an HTML table, with each block of transDE, transEN, id and status forming a new row in the table.The response is in XML and looks as follows:\[code\] <translationValue xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType=":[4]"> <item xsi:type="xsd:"> <id xsi:type="xsd:string">1</id> <status xsi:type="xsd:string">1</status> <transDE xsi:type="xsd:string">Gewinn</transDE> <transEN xsi:type="xsd:string">profit, prize</transEN> </item> <item xsi:type="xsd:"> <id xsi:type="xsd:string">9</id> <status xsi:type="xsd:string">1</status> <transDE xsi:type="xsd:string">Reingewinn</transDE> <transEN xsi:type="xsd:string">net gain, net profit</transEN> </item> <item xsi:type="xsd:"> <id xsi:type="xsd:string">13</id> <status xsi:type="xsd:string">1</status> <transDE xsi:type="xsd:string">Gewinn je Aktie</transDE> <transEN xsi:type="xsd:string">profit per share</transEN> </item> <item xsi:type="xsd:"> <id xsi:type="xsd:string">18</id> <status xsi:type="xsd:string">0</status> <transDE xsi:type="xsd:string">Gewinn pro Test</transDE> <transEN xsi:type="xsd:string">profit per test</transEN> </item> </translationValue>\[/code\]I would apprecitate any help best regards