0

I try as code below ,still can't access to object m1:Response NextChallenge="916B3AFB"

<?php
$response='<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m0="http://schemas.compassplus.com/two/1.0/fimi_types.xsd"
xmlns:m1="http://schemas.compassplus.com/two/1.0/fimi.xsd">
    <env:Body>
        <m1:InitSessionRp >
            <m1:Response NextChallenge="916B3AFB" Response="1" Ver="16.25" Product="FIMI">
                <m0:Id>5172246</m0:Id>
                <m0:NeedCAPAuth>0</m0:NeedCAPAuth>
                <m0:PasswordVersion>1</m0:PasswordVersion>
            </m1:Response>
        </m1:InitSessionRp>
    </env:Body>
</env:Envelope>';

// Loads the XML
$xml = simplexml_load_string($response);

// Grabs the posts
$posts1 = $xml->children('env:Body', true)->m1->children('InitSessionRp', true)->Response->NextChallenge;

echo $posts1;

?>

Problem : can't access to object m1:Response NextChallenge="916B3AFB" .

0 Answers0