Q:

PHP and wfc services

I have a wfc service that I need to get some values from it.  I call my wfc service like so:
$client = new SoapClient($url);     
$response = $client->GetInfoByNumeroContrato(array('schema'=>$schema, 'numContrato'=>$numContract ));

GetInfoByNumeroContrato is metodo that recives 2 parameters.  My cliente look like so:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
  <GetInfoByNumeroContratoResponse xmlns="http://tempuri.org/">
     <GetInfoByNumeroContratoResult>
        <xs:schema id="InfoByNumContrato" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
           <xs:element name="InfoByNumContrato" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
              <xs:complexType>
                 <xs:choice minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="InfoByNumContrato">
                       <xs:complexType>
                          <xs:sequence>
                             <xs:element name="NumContrato" type="xs:string" minOccurs="0"/>
                             <xs:element name="Titular" type="xs:boolean" minOccurs="0"/>
                             <xs:element name="CDU_TipoEntidade" type="xs:string" minOccurs="0"/>
                             <xs:element name="Nome" type="xs:string" minOccurs="0"/>
                             <xs:element name="Telefone" type="xs:string" minOccurs="0"/>
                             <xs:element name="telemovel" type="xs:string" minOccurs="0"/>
                             <xs:element name="email" type="xs:string" minOccurs="0"/>
                             <xs:element name="Morada" type="xs:string" minOccurs="0"/>
                             <xs:element name="contacto" type="xs:string" minOccurs="0"/>                                 
                          </xs:sequence>
                       </xs:complexType>
                    </xs:element>
                 </xs:choice>
              </xs:complexType>
           </xs:element>
        </xs:schema>

My question is how can I get the elemente value of NumContrato.  using the wfc service and calling the metodo that get 2 parameters how can I get the value for  an element.  

A:

I have found out a way to resolve this issue.  I need to get the value of "NumContrato" so I had to parse to xml my object and did it the as so:
$sxe= new SimpleXMLElement($response->GetInfoByNumContratoResult->any)

Then to get the value:
$NumContrato=(string)$sxe->InfoByNumContrato->InfoByNumContrato[0]->NumContrato

and got the value I needed. 