Jump to content

mohib_ayubi

New Members
  • Posts

    4
  • Joined

  • Last visited

Community Answers

  1. mohib_ayubi's post in XML not parse with soap-env having custom tags in PHP was marked as the answer   
    Ok finally after spent hours, i got that! I had to modify according to tag names as below, in the most parent i had to used soap-env instead of SOAP.
    $dom = new DOMDocument; $dom->preserveWhiteSpace = false; $dom->loadXML($response->Data); $dom->formatOutput = true; $XMLContent = $dom->saveXML(); $xml = simplexml_load_String($XMLContent, null, null, 'soap-env', true); if(!$xml) trigger_error("Encoding Error!", E_USER_ERROR); $Results = $xml->children('soap-env',true); foreach($Results->children('soap-env',true) as $fault){ if(strcmp($fault->getName(),'Fault') == 0){ trigger_error("Error occurred request/response processing!", E_USER_ERROR); } } foreach($Results->children('wsse',true) as $nodes){ if(strcmp($nodes->getName(),'Security') == 0){ foreach($nodes->children('wsse',true) as $securityNodes){ if(strcmp($securityNodes->getName(),'BinarySecurityToken') == 0){ $tokenParsed = (string)$securityNodes; } } } }  
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.