SOAP Fault: org.xml.sax.SAXException: operation description is missing
parameter
description! for input "" (Error Code )...
Property already verschidene variant of display URL and destinationUrl
tries. None strikes.
Here those is code:
use SOAP::Lite;
use strict;
use warnings;
use URI::Escape;
my $email = "...\@....de";
my $password = "...";
my $useragent = "Adwords API";
my $token = "...";
my $namespace = "https://adwords.google.com/api/adwords/v2";
my @headers =
(SOAP::Header->name("email")->value($email)->uri($namespace)->prefix("impl"),
SOAP::Header->name("password")->value($password)->uri($namespace)->prefix("impl"),
SOAP::Header->name("useragent")->value($useragent)->uri($namespace)->prefix("impl"),
SOAP::Header->name("token")->value($token)->uri($namespace)->prefix("impl"));
my $url =
"https://adwords.google.com/api/adwords/v2/CreativeService?WSDL";
my $service = SOAP::Lite->service($url);
$service->autotype(0);
$service->on_fault(\&faulthandler);
my $adgrid=XXXXXXXX;
my $creative1 = {
'headline' => 'Creative Headline',
'description1' => 'Line 1',
'description2' => 'Line 2',
'displayUrl' => 'www.example.com',
'destinationUrl' => 'http://www.example.com'
#'displayUrl' => 'www\.example\.com',
#'destinationUrl' => 'http://www\.example\.com'
#'displayUrl' => 'www\.example\.com',
#'destinationUrl' => uri_escape('http://www.example.com')
#'displayUrl' => SOAP::Data->name(displayUrl
=>'http://example\.com/'),
#'destinationUrl' => SOAP::Data->name(destinationUrl
=>'http://www\.example\.com')
#SOAP::Data->name('displayUrl')->value('http://example\.com/')->type('xsd:string'),
#SOAP::Data->name('destinationUrl')->value('http://www\.example\.com')->type('xsd:string')
#SOAP::Data->name('displayUrl')->value('http://example\.com/'),
#SOAP::Data->name('destinationUrl')->value('http://www\.example\.com')
};
my @args = [ $creative1 ];
my @creatives = $service->addCreativeList($adgrid, @args, @headers);
foreach my $c (@creatives) {
print "Creative " . $c->{"id"} . " has headline '" .
$c->{"headline"} . "'\n";
}
### Helper functions
sub faulthandler {
my ($soap, $res) = @_;
die("SOAP Fault: " . $res->faultstring . " for input \"" .
$res->faultdetail->{"trigger"} .
"\" (Error Code " . $res->faultdetail->{"code"} . ")");
}
It must be nevertheless relatively simple to solve. Does someone have
reference? Thanks.
'headline' => 'Creative Headline',
'description1' => 'Line 1',
'description2' => 'Line 2',
'displayUrl' => 'www.example.com',
'destinationUrl' => 'http://www.example.com '
#'displayUrl' => 'www\.example\.com',
#'destinationUrl' => 'http://www\.example\.com'
#'displayUrl' => 'www\.example\.com',
#'destinationUrl' => uri_escape(' http://www.example.com')
#'displayUrl' => SOAP::Data->name(displayUrl
=>'http://example\.com/'),
#'destinationUrl' => SOAP::Data->name(destinationUrl
=>'http://www\.example\.com')
#SOAP::Data->name('displayUrl')->value('http://example\.com/')->type('xsd:string'),
#SOAP::Data->name('destinationUrl')->value('http://www\.example\.com')->type('xsd:string')
#SOAP::Data->name('displayUrl')->value(' http://example\.com/'),
#SOAP::Data->name('destinationUrl')->value('http://www\.example\.com')
};
my @args = [ $creative1 ];
my @creatives = $service->addCreativeList($adgrid, @args, @headers);
foreach my $c (@creatives) {
print "Creative " . $c->{"id"} . " has headline '" .
$c->{"headline"} . "'\n";
}
### Helper functions
sub faulthandler {
my ($soap, $res) = @_;
die("SOAP Fault: " . $res->faultstring . " for input \"" .
$res->faultdetail->{"trigger"} .
"\" (Error Code " . $res->faultdetail->{"code"} . ")");
}
It must be nevertheless relatively simple to solve. Does someone have
reference? Thanks.