0

I am trying to send request by using php soapclient.

xml part:

<Location>
    <a:Destination i:type="a:Country">
        <a:Id>277</a:Id>
    </a:Destination>
</Location>

My php request which is not working:

$params = array('Location' => array(
                  'type' => 'Country',
                  'Destination' => array(   
                      'Id' => '277'
                   )                        
              )
);

I couldn't find how to send i:type="a:Country" part within request. Will appreciate for your helps.

kazata
  • 71
  • 2
  • 2
  • 10
  • 1
    No really clear. Please, follow this suggestions on how to formulate a question: https://stackoverflow.com/help/mcve – LMC Jan 23 '18 at 23:39
  • Not much clear, but If you want to parse the xml response to array , you can use this method xml_parse_into_struct(). Or can check this link, https://stackoverflow.com/questions/6578832/how-to-convert-xml-into-array-in-php – saurabh Jan 25 '18 at 14:25
  • Actually i am trying to find a way to send namespace which is "type". I tried methods here http://www.php.net/manual/en/soapvar.soapvar.php but not succesfull. – kazata Jan 29 '18 at 12:02

0 Answers0