|
Posted by lvpaul on 07/06/06 08:11
Hello !
I am calling a .NET Webservice and getting back a ADO.NET Datatset.
How can I convert this to an PHP-Array ?
$ergebnis = $m_service->call( $function, $data );
print_r($ergebnis)
RESTULT:
Array ( [GetVertreterDataResult] => Array ( [schema] => Array (
[element] => Array ( [complexType] => Array ( [choice] => Array (
[element] => Array ( [complexType] => Array ( [sequence] => Array (
[element] => Array ( [0] => Array ( [!name] => Feld [!minOccurs] => 0 )
[1] => Array ( [!name] => Wert [!minOccurs] => 0 ) ) ) ) [!name] =>
Grunddaten ) [!maxOccurs] => unbounded ) ) [!name] => NewDataSet
[!msdata:IsDataSet] => true [!msdata:Locale] => de-DE ) [!id] =>
NewDataSet ) [diffgram] => Array ( [NewDataSet] => Array ( [Grunddaten]
=> Array ( [0] => Array ( [Feld] => Vertreternummer [Wert] => 444
[!diffgr:id] => Grunddaten1 [!msdata:rowOrder] => 0
[!diffgr:hasChanges] => inserted ) [1] => Array ( [Feld] =>
Vertretername [Wert] => geht noch nicht [!diffgr:id] => Grunddaten2
[!msdata:rowOrder] => 1 [!diffgr:hasChanges] => inserted ) ) ) ) ) )
print nl2br(htmlspecialchars($m_service->response));
RESULT:
Response:HTTP/1.0 200 OK
Date: Wed, 05 Jul 2006 13:36:09 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=iso-8859-1
Content-Length: 2200
X-Cache: MISS from proxy.intern.lv.de
X-Cache-Lookup: MISS from proxy.intern.lv.de:3128
Proxy-Connection: close
<?xml version="1.0" encoding="iso-8859-1"?><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"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soap:Header><wsa:Action>http://tempuri.org/MediaData/Service1/GetVertreterDataResponse</wsa:Action><wsa:MessageID>uuid:105673fb-f912-4dbc-ac5d-4dace4ce9f2d</wsa:MessageID><wsa:RelatesTo>uuid:dca8fd82-df85-4812-ad84-e61e17b14439</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp
wsu:Id="Timestamp-33baee55-4ee9-4418-9bd0-5e3030b9dbce"><wsu:Created>2006-07-05T13:36:09Z</wsu:Created><wsu:Expires>2006-07-05T13:41:09Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><GetVertreterDataResponse
xmlns="http://tempuri.org/MediaData/Service1"><GetVertreterDataResult><xs:schema
id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><xs:element
name="NewDataSet" msdata:IsDataSet="true"
msdata:Locale="de-DE"><xs:complexType><xs:choice
maxOccurs="unbounded"><xs:element
name="Grunddaten"><xs:complexType><xs:sequence><xs:element name="Feld"
type="xs:string" minOccurs="0" /><xs:element name="Wert"
type="xs:string" minOccurs="0"
/></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema><diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><NewDataSet
xmlns=""><Grunddaten diffgr:id="Grunddaten1" msdata:rowOrder="0"
diffgr:hasChanges="inserted"><Feld>Vertreternummer</Feld><Wert>444</Wert></Grunddaten><Grunddaten
diffgr:id="Grunddaten2" msdata:rowOrder="1"
diffgr:hasChanges="inserted"><Feld>Vertretername</Feld><Wert>geht noch
nicht</Wert></Grunddaten></NewDataSet></diffgr:diffgram></GetVertreterDataResult></GetVertreterDataResponse></soap:Body></soap:Envelope>
I tried to use php.xml from keithdevens, without success.
Any ideas ?
Thanks
aaapaul
Navigation:
[Reply to this message]
|