XML : Generate an XML SOAP request from an array in PHP

I'm doing a project to communicate through XML/SOAP over HTTPS interface with requests and reply as HTTPS POST and response. The request format is constructed as an array like this:

  Array(  'GetRpt' => Array(      'UsrInf' => Array(          'UsrId' => 'user id',          'ApiKey' => 'API key for web services',          'ApiSec' => 'API secret for web services'      ),      'ReqInf' => Array(          'ProCod' => 'Type of product',          'IDNo' => 'ID number of the product',          'Pri' => 'Product price'      )  )  );    

Any way to convert this into XML/SOAP in PHP? Thank you.

No comments:

Post a Comment