I'm using NuSOAP to send stuff from a vb.net application to a PHP script, I'm sending a heap of data as you can see here but am wondering if there is a way I can send just one variable and it have all my info inside it.

$server->register('hello',                // method name
    array('ClubName' => 'xsd:string', 'Established' => 'xsd:string', 'Region' => 'xsd:string', 'LogoURL' => 'xsd:string', 'AgeGroups' => 'xsd:string', 'HomeGround' => 'xsd:string', 'Lon' => 'xsd:string', 'Lat' => 'xsd:string', 'SecondaryHomeGrounds' => 'xsd:string', 'Kiwis' => 'xsd:string', 'Phone' => 'xsd:string'),

function hello($ClubName, $Established, $Region, $LogoURL, $AgeGroups, $HomeGround, $Lon, $Lat, $SecondaryHomeGrounds, $Kiwis, $Phone){ 

// Do stuff here....

}


    Can I send an array inside an array???

      The magic of SOAP is that it supports all your types and you can send your multidimensional arrays directly, without any need to serialize. You can also use PHP SOAP extension available via PHP 5.0 which is simpler and faster than NuSOAP but less flexible.

      By any means if you have problems with that data transfer, You should apply some sort of serialization on both ends, e.g you can XML-encode your data on VB and then XML-decode what you've received on PHP.

      There's an open source PHP framework I've been developing lately, Namely jFramework. You can get the old source code from www.jframework.sbce.ir . It supports wrappers and serialization for 7 different protocols and also supports a wide range of web services (adding up daily).

      I hope that would help

        Write a Reply...