Announcement

Collapse
No announcement yet.

nusoap ->register problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • nusoap ->register problem

    Hallo zusammen,

    ich versuche per nusoap einen webservice zu erzeugen.



    nun benötige ich eine Funktion,die eine ArrayList übergeben bekommt.

    PHP Code:

    require_once 'nusoap.php';

    $soap = new soap_server();

    $soap->configureWSDL('TEST''http://www.test-server.de/');

    $soap->wsdl->schemaTargetNamespace 'http://soapinterop.org/xsd/';

    $soap->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA '');

     

    function 
    strtest($farray)

    {

        ... 
    Verarbeitung

        
    return $ergarray;




    Der Aufruf würde dann so aussehen:

    PHP Code:

    $funkarray
    [0] = array("parm1"="1","parm2"="Auto","parm3"="gruen");

    $funkarray[1] = array("parm1"="2","parm2"="Fahrrad","parm3"="rot");

    $funkarray[2] = array("parm1"="3","parm2"="Motorrad","parm3"="blau");

     

    $soap = new soapclient('http://..?wsdl'true);

    $proxy $soap->getProxy();

     

    $erglist$proxy->strtest($funkarray); 
    d.h. ich möchte eine ArrayList übergeben, und eine ArrayList zurückbekommen.

    wie muss ich so eine Funktion mit $soap->register(????) registrieren, damit das WSDL korrekt erzeugt wird ?

    -> bezüglich Datentypen und so ??

    das muss doch irgendwie so gehen:
    PHP Code:
    $soap->register(
        
    'strtest',
        array(
            
    'farray' => 'xsd?????????????????????????'
        
    ),
        array(
            
    'ergarray' => 'xsd??????????????'
        
    ),
        
    'http://soapinterop.org/'
    );
    Nur wie geht das bei arrays ?? 
    Gruß jogi
Working...
X