SOAP Parser Sample |
Site Admin
|
what was returned in $parser if you call $parser = new soap_parser($your_xml_data) ?
|
||||||||||||
|
soap_parser return |
|
Hi,
When I use $parser = new soap_parser($xml_data); $parser returns : "Object" I obtained $xml_data using: $xml_data = '<xmp>'.$soapclient->response.'</xmp>'; or $xml_data = $soapclient->response; Thanks |
||||||||||||
|
Site Admin
|
What does it mean "Object" ?
Have you seen it when you ran var_dump($parser); ? |
||||||||||||
|
Content var_dump |
|
Sorry, with var_dump I obtained this:
object(soap_parser)(33) { ["title"]=> string(6) "NuSOAP" ["version"]=> string(3) "0.6" ["error_str"]=> bool(false) ["charencoding"]=> bool(true) ["soap_defencoding"]=> string(5) "UTF-8" ["namespaces"]=> array(0) { } ["typemap"]=> array(4) { ["http://www.w3.org/2001/XMLSchema"]=> array(41) { ["string"]=> string(6) "string" ["boolean"]=> string(7) "boolean" ["float"]=> string(6) "double" ["double"]=> string(6) "double" ["decimal"]=> string(6) "double" ["duration"]=> string(0) "" ["dateTime"]=> string(6) "string" ["time"]=> string(6) "string" ["date"]=> string(6) "string" ["gYearMonth"]=> string(0) "" ["gYear"]=> string(0) "" ["gMonthDay"]=> string(0) "" ["gDay"]=> string(0) "" ["gMonth"]=> string(0) "" ["hexBinary"]=> string(6) "string" ["base64Binary"]=> string(6) "string" ["normalizedString"]=> string(6) "string" ["token"]=> string(6) "string" ["language"]=> string(0) "" ["NMTOKEN"]=> string(0) "" ["NMTOKENS"]=> string(0) "" ["Name"]=> string(0) "" ["NCName"]=> string(0) "" ["ID"]=> string(0) "" ["IDREF"]=> string(0) "" ["IDREFS"]=> string(0) "" ["ENTITY"]=> string(0) "" ["ENTITIES"]=> string(0) "" ["integer"]=> string(7) "integer" ["nonPositiveInteger"]=> string(7) "integer" ["negativeInteger"]=> string(7) "integer" ["long"]=> string(0) "" ["int"]=> string(7) "integer" ["short"]=> string(0) "" ["byte"]=> string(0) "" ["nonNegativeInteger"]=> string(7) "integer" ["unsignedLong"]=> string(0) "" ["unsignedInt"]=> string(0) "" ["unsignedShort"]=> string(0) "" ["unsignedByte"]=> string(0) "" ["positiveInteger"]=> string(0) "" } ["http://www.w3.org/1999/XMLSchema"]=> array(11) { ["i4"]=> string(0) "" ["int"]=> string(7) "integer" ["boolean"]=> string(7) "boolean" ["string"]=> string(6) "string" ["double"]=> string(6) "double" ["float"]=> string(6) "double" ["dateTime"]=> string(6) "string" ["timeInstant"]=> string(6) "string" ["base64Binary"]=> string(6) "string" ["base64"]=> string(6) "string" ["ur-type"]=> string(5) "array" } ["http://soapinterop.org/xsd"]=> array(1) { ["SOAPStruct"]=> string(6) "struct" } ["http://schemas.xmlsoap.org/soap/encoding/"]=> array(3) { ["base64"]=> string(6) "string" ["array"]=> string(5) "array" ["Array"]=> string(5) "array" } } ["xmlEntities"]=> array(5) { ["quot"]=> string(1) """ ["amp"]=> string(1) "&" ["lt"]=> string(1) "<" ["gt"]=> string(1) ">" ["apos"]=> string(1) "'" } ["xml"]=> string(2605) "HTTP/1.0 200 OK Document follows Server: SoapServer Content-type: text/xml Content-Length: 2503 0 16 0 649450144 0 0 0 0 0 0 0 0 false false ProxyListenerID=FFQMSXLPYB1064314636617 clientInterfaceName=soap clientInterfaceClass=eigroup.sms.clients.smssoap.SMSSoap Prueba desde PHP-SOAP 2 " ["xml_encoding"]=> string(5) "UTF-8" ["method"]=> string(0) "" ["root_struct"]=> string(0) "" ["root_struct_name"]=> string(0) "" ["root_header"]=> string(0) "" ["status"]=> string(0) "" ["position"]=> int(0) ["depth"]=> int(0) ["default_namespace"]=> string(0) "" ["message"]=> array(0) { } ["fault"]=> bool(false) ["fault_code"]=> string(0) "" ["fault_str"]=> string(0) "" ["fault_detail"]=> string(0) "" ["errstr"]=> string(52) "XML error on line 1: not well-formed (invalid token)" ["depth_array"]=> array(0) { } ["debug_flag"]=> bool(true) ["debug_str"]=> string(115) "soap_parser: Entering soap_parser() soap_parser: parse error: XML error on line 1: not well-formed (invalid token) " ["soapresponse"]=> NULL ["responseHeaders"]=> string(0) "" ["ids"]=> array(0) { } ["multirefs"]=> array(0) { } ["entities"]=> array(5) { ["&"]=> string(5) "&" ["<"]=> string(4) "<" [">"]=> string(4) ">" ["'"]=> string(6) "'" ["""]=> string(6) """ } ["parser"]=> resource(4) of type (Unknown) } |
||||||||||||
|
Site Admin
|
so you actually got all you need
the content was parsed and you can traverse the object properties to see all the parsed results. |
||||||||||||
|
Thanks |
|
Thank you, but.... I'm yet a bit ...
Could you give me a concret sample please? i.e., I want to see the content of the tag destAddr... how can I do this? Thanks a lot of for you quickly help... Bye2 |
||||||||||||
|
SOAP Parser Sample |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by