I'm quite new in developing nusoap applications, but now I need to add
an LocalBusinessAd.

These are the constants I use for the example:

$STATIC_BUSINESS_IMAGE_PATH = "/home/vis/Pictures/
61784_small_1211883307.jpg";
$STATIC_BUSINESS_KEY = "pdvQA/[EMAIL PROTECTED]@A
Business Corp.!d@(650) [EMAIL PROTECTED] Amphitheatre [EMAIL PROTECTED]
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@1219393672000!d@";
$STATIC_CUSTOM_ICON = "/home/vis/Pictures/imgad.gif";

The rest are input from a simple POST form.

And here's the part where I generate the request string that I will
send to the call() method after that:

<addAds>
                                <ads>
                                        
<adGroupId>'.$_POST['agid'].'</adGroupId>
                                        <adType>LocalBusinessAd</adType>
                                        <businessImage>
                                                
<data>'.base64_encode($STATIC_BUSINESS_IMAGE_PATH).'</data>
                                        </businessImage>
                                        
<businessKey>'.$STATIC_BUSINESS_KEY.'</businessKey>
                                        
<countryCode>'.$_POST['cc'].'</countryCode>
                                        <customIcon>
                                                
<data>'.base64_encode($STATIC_CUSTOM_ICON).'</data>
                                        </customIcon>
                                        
<description1>'.$_POST['desc1'].'</description1>
                                        
<description2>'.$_POST['desc2'].'</description2>
                                        
<destinationUrl>'.$_POST['url'].'</destinationUrl>
                                        
<displayUrl>'.$_POST['url'].'</displayUrl>
                                </ads>
</addAds>

When I var_dump the result from the call() method, I get that:

array
  'faultcode' => string 'soapenv:Server.userException' (length=28)
  'faultstring' => string 'One or more input elements failed
validation.' (length=45)
  'detail' =>
    array
      'fault' =>
        array
          'code' => string '122' (length=3)
          'message' => string 'One or more input elements failed
validation.' (length=45)
          'errors' =>
            array
              ...

Any ideas? If you need more info, I'll gladly provide it, as I said
I'm new in nusoap applications.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to