here is my perl script. I am trying to create a new space in Confluence (the Atlassian program).
my $username = 'admin';
my $password = 'admin';
my $soap = SOAP::Lite->service("file:confluenceRemoteService.xml"); #
print "logging in...\n";
$auth = $soap->login($username, $password);
### everything above here is fine, included for completeness ###
"key" => SOAP::Data->type(string => 'BOXER'),
"name" => SOAP::Data->type(string => 'Battlecruiser opera
"description" => SOAP::Data->type(string => "This is a space")
) or die "didnt work again\n";
So when I run it, the program dies at the end there because the addSpace call failed. I've been in contact with someone from Atlassian and they were able to tell me that when they run the script, the hash becomes a null object inside of the program.
I've tried a lot of little things, just fiddling around with the script. I've tried enclosing the hash in Soap::Data->type(struct =>...), ive tried creating the hash before the call and passing it in as %hash. I've tried creating a hash reference and passing in $hash.
I've even tried to use a different function called getSpace to get a Space object, and then printed it using Data::Dumper. I then used the output to create a Space object such that when I printed my object using Data::Dumper, it would print out in the same format as the space that I get when I call getSpace. (a little convoluted) but that didnt work either.
So now I'm trying to either get some help on how I create remote objects (structs) and send them through SOAP or find a way to print out the exact xml that is being sent, or something to determine why my hash doesn't isnt being processed correctly
Here is the relevant part of the Atlassian documentation
Space addSpace(String token, Space space) - create a new space, passing in name, key and description.
Where Space is
|| the space key
|| the name of the space
|| the url to view this space online
|| the id of the space homepage
|| the HTML rendered space description
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||