Request Parameter Attributes

Help
2014-03-17
2014-03-17
  • So I am using new soap to call a webserivce. One of the parameters is an array of complex object. This complex object is an abstract class so one has to specify what kind of class you want to initialize. This is done with the following XML

    <mes:GetCampaignsRequest>      
        <mes:CampaignsFilter>
        <dat:CampaignServiceFilter i:type="dat:CampaignIDFilter">
            <dat:CampaignID>60790</dat:CampaignID>
            </dat:CampaignServiceFilter>
        </mes:CampaignsFilter>
        <mes:Paging>
            <mes:PageIndex>0</mes:PageIndex>
        <mes:PageSize>10</mes:PageSize>
        </mes:Paging>
        <mes:ShowCampaignExtendedInfo>0</mes:ShowCampaignExtendedInfo>
    </mes:GetCampaignsRequest>
    

    Mainly the problem is how using nusoap do I generate the part i:type="dat:CampaignIDFilter"

    So far I have done the following:

    $client = $this->_getClientObject($this->_getWSDL('CampaignService'));
    
    if (!empty($options['campaign_id'])) {
        $filters['CampaignServiceFilter'] = array(
            'CampaignID' => $options['campaign_id']
        );
    }
    
    $params = array(
        'CampaignsFilter' => $filters,
        'Paging' => array(
            'PageIndex' => $options['pageIndex'],
            'PageSize' => $options['pageSize'],
        ),
        'ShowCampaignExtendedInfo' => ($options['showExtendedInfo']) ? 'true' : 'false'
    );
    
    $result = $client->call('GetCampaigns', $params);
    

    If you want to review the WSDL file of this service you can have a look here:
    https://sandbox.mediamind.com/Eyeblaster.MediaMind.API/CampaignService.svc?wsdl

     
    • mango
      mango
      2014-03-17

      <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=gb2312"> </HEAD>

      <BODY>

      官方阿迪达斯新店开张大促销了,三折呀,还有情侣款,我卖了两双,去验过是正品,很满意~!http://st.zzaa.org


      This is an automatic reply, confirming that your e-mail was received.Thank you



      邮箱使用小提示


      想让对方更及时看到你的邮件,可以试试发到"对方手机号@163.com"。



      无需事先开通,还有短信提醒。了解网易手机邮箱详情


      </body>
      </html>