Requesting complex types - Newbie

Help
2009-11-30
2013-06-06
  • Hi.  I am completely new to both SOAP and nuSOAP.  So please forgive me if this seems simple.  I am trying to update a database via a soap API.  The wsdl is at: "http://api.dc-storm.com/saleupdateservice/v1/saleupdate.asmx?wsdl"

    I did a getProxyClassCode and got the following:

    > class nusoap_proxy_335619627 extends
    > nusoap_client { //
    > http://api.dc-storm.com/broker/engage/:RequestSaleUpdate^
    > $parameters function
    > RequestSaleUpdate($parameters) {
    > $params = array('parameters' =>
    > $parameters); return
    > $this->call('RequestSaleUpdate',
    > $params, 'http://testuri.com',
    > 'http://api.dc-storm.com/broker/engage/RequestSaleUpdate');
    > } }

    But I can't get my head around the code to pull this off.  Here is what I have so far:


        > require_once('lib/nusoap.php');
        > $wsdlurl =
        > 'http://api.dc-storm.com/saleupdateservice/v1/saleupdate.asmx?wsdl';
        > $client = new
        > soapclient($wsdlurl,true);
        >
        > // Check for an error $err =
        > $client->getError(); if ($err) { //
        > Display the error echo
        > '<p><b>Constructor error: ' . $err .
        > '</b></p>'; // At this point, you
        > know the call that follows will fail
        > }else{ echo 'ok: '.$wsdlurl.'<br /><br
        > />'; }
        >
        >
        > // Call the SOAP method
        >
        > $params = array('parameters' => array(
        >  'username' => 'MyUserName',
        >  'password' => 'MyPassword',
        >  'description' => 'test',  'siteId' =>
        > '1506',  'salesToUpdate' => array(
        > 'maxUpdates' => '1', 'SaleId' =>
        > '4000017336454', 'NewMetric1' =>
        > 'testAPI' ) ), array( 'Key' =>
        > 'xxxxxx-xxxxxx-xxx-xxx-xxxxxxxx',
        > 'UserName' => 'APIUserName',
        > 'Password' => 'APIPassword' ) );
        >
        > $result =
        > $soapclient->call('RequestSaleUpdate',$params);
        > print_r($result);


    I get bupkis.  And guidance would be greatly appreciated.

    Thanks,
    Danny.