SOAP PHP返回数据

can any Coding Gurus lend a helping hand,

I make the following soap call:

    $acc = 192838;

$vec1 = array(
        'USERNAME'=>'test',
        'PASSWORD'=>'test',
        'BRANCHID'=>231,
    'Customer_AccountNo'=>$acc
  );

    $soap_client = new SoapClient('https://test.com/externalintegration.asmx?WSDL');
    $info = $soap_client->Get_CustomerInfo($vec1);

var_dump($info);

Which returns the following data:

object(stdClass)#2 (1) { ["Get_CustomerInfoResult"]=> object(stdClass)#3 (2) { ["schema"]=> string(4205) "" ["any"]=> string(2419) "192838ADELW7210250821972-10-03T00:00:00+02:00ENGLISHFEMALESINGLE6 CARWELL STREET, HIGHS RIVERCAPE TOWN3REET, HIGBURY PKUILS RIRCAPE a@s.com076478680707647868070219804897YES2015-06-04T12:55:02.49+02:00DISPUTED216LIT9AMSRAMSGAT90039 314 9090CAPITEC BANK470010AD Wentzel116056ARDINE LPSON SA1ST FLOOR, BUILDING 3, FUSON QUTER,s s s s AFRICA744102155113140215511314ilay@jlto.comSHANTAL PILLAY1Employeyed2518970.00003000.0000CLATOS " } }

The data is being returned in one string, but I need to access the individual information.

Firstnames

Surname

IdentityNo

Email

etc..

Thanks in advance for your help!

WSDL:

<s:element name="Get_CustomerInfo">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="USERNAME" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="PASSWORD" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="BRANCHID" type="s:long"/>
<s:element minOccurs="1" maxOccurs="1" name="Customer_AccountNo" type="s:long"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Get_CustomerInfoResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Get_CustomerInfoResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema"/>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>

Maybe you should try a WSDL to PHP generator in order to have a real PHP object in return and not a stdClass. Maybe the returned string will be converted to another PHP object that will be more convenient. Try with the PackageGenerator so you'll have a PHP SDK using the native PHP SoapClient class and a tutorial file as a starting guide.

In addition, maybe you have to pass an additional parameter in your request that specify the format of the data you want. The generated PHP SDK will show you this sort of thing maybe.