[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: [Spacewalk-list] Creating perl script to use Spacewalk API butgetting error Could not find method create



That worked perfectly to get me past that error.  I had to escape the arrays
as well (its been a while since I stuck my foot into perl).

I'm now seeing another error

	unhandled internal exception: redstone.xmlrpc.XmlRpcArray cannot be
cast to java.util.Map

http://pastie.org/618662

Any ideas?

-----Original Message-----
From: spacewalk-list-bounces redhat com
[mailto:spacewalk-list-bounces redhat com] On Behalf Of Jesus M. Rodriguez
Sent: Tuesday, September 15, 2009 10:12 PM
To: spacewalk-list redhat com
Subject: Re: [Spacewalk-list] Creating perl script to use Spacewalk API
butgetting error Could not find method create

Evan,

You need to put a \ in front of the %Errata_info. That should take care of
it.

$SWclient->call('errata.create',$SWsession,
\%Errata_Info,@RHNBugs,@RHNKeywords ,@Packages,$SWPublish,@Channels);

or use python :)

jesus


On Tue, Sep 15, 2009 at 9:59 PM, Jesus M. Rodriguez <jmrodri gmail com>
wrote:
> On Tue, Sep 15, 2009 at 1:14 PM, Frey, Evan <evan frey us mizuho-sc com>
wrote:
>> Link to paste bin
>> http://pastie.org/617651
>
> Ok I think I see the problem. For some reason the perl script is not 
> creating a struct element for the hash/dictionary/map (whatever it's 
> called in perl). It is creating a bunch of string params.
>
> <param><value><string>advisory_name</string></value></param>
> <param><value><string>RHSA-2009:1238</string></value></param>
> <param><value><string>description</string></value></param>
>
> What this means is that the API handlers will try to find an 
> errata.create method that takes in a bunch of Strings as parameters, 
> which it will never find.
>
> I created  a similar python client and here is the output. I 
> highlighted the struct element in the pastebin.
>
> http://pastie.org/618297
>
> This is the script (it does not contain all of the required 
> information), so there isn't anything special i.e. I just created a 
> dictionary and it worked.
>
> http://pastie.org/618298
>
> I'll take another look at a perl script.
>
> jesus
>

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list redhat com
https://www.redhat.com/mailman/listinfo/spacewalk-list
CONFIDENTIAL: This e-mail, including its contents and attachments,
if any, are confidential. It is neither an offer to buy or sell,
nor a solicitation of an offer to buy or sell, any securities or
any related financial instruments mentioned in it. If you are not
the named recipient please notify the sender and immediately delete
it. You may not disseminate, distribute, or forward this e-mail
message or disclose its contents to anybody else. Unless otherwise
indicated, copyright and any other intellectual property rights in
its contents are the sole property of Mizuho Securities USA Inc.
     E-mail transmission cannot be guaranteed to be secure or
error-free. The sender therefore does not accept liability for any
errors or omissions in the contents of this message which arise as
a result of e-mail transmission.  If verification is required
please request a hard-copy version.
     Although we routinely screen for viruses, addressees should
check this e-mail and any attachments for viruses. We make no
representation or warranty as to the absence of viruses in this
e-mail or any attachments. Please note that to ensure regulatory
compliance and for the protection of our customers and business, we
may monitor and read e-mails sent to and from our server(s).
#####################################################################################


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]