I am trying to use SOAP::WSDL 2.00.10 to call out from my (internal) application to another (intern
+al) application. (Both are only available on our intranet, sorry)
I ran wsdl2perl.pl on their WSDL and it generated a set of .pms
The builtin comments indicate that I should be able to use the service like this:
use MyInterfaces::ServiceName::PortName;
my $interface = MyInterfaces::ServiceName::PortName->new();
my $some_value = '123';
my $status = 'resolved';
my $resolution = 'fixed';
my $some_time = '2010-11-05T12:00:00.000';
my $data = {
Bug => {
ID => $some_value,
BugDetails => {
BugNumber => $some_value,
BugStatus => $status,
BugResolution => $resolution,
Description => $some_value,
IsDuplicate => $some_value,
UpdatedBy => $some_value,
LastUpdated => $some_time,
},
},
};
my $response = $interface->update($data);
However, instead of generating something that looks like this:
<as1:UpdateBugRequest xmlns:as1="URL1">
<bug:Bug xmlns:bug="URL2">
<bug:BugDetails>
<bug:BugNumber>123</bug:BugNumber>
<bug:BugStatus>Open</bug:BugStatus>
<bug:BugResolution>Open</bug:BugResolution>
<bug:Description>123</bug:Description>
<bug:LastUpdated>2008-09-28</bug:LastUpdated>
</bug:BugDetails>
</bug:Bug>
</as1:UpdateBugRequest>
It generates an outbound message that looks like this:
<UpdateBugRequest xmlns="URL1">
<Bug xmlns="URL2">
<Bug xmlns="">
<Bug xmlns="">123</Bug>
</Bug>
<BugDetails>
<BugDetails xmlns="">
<BugDetails xmlns="">123</BugDetails>
</BugDetails>
<BugDetails xmlns="">
<BugDetails xmlns="">resolved</BugDetails>
</BugDetails>
<BugDetails xmlns="">
<BugDetails xmlns="">fixed</BugDetails>
</BugDetails>
<BugDetails xmlns="">
<BugDetails xmlns="">123</BugDetails>
</BugDetails>
<BugDetails xmlns="">
<BugDetails xmlns="">123</BugDetails>
</BugDetails>
<BugDetails xmlns="">
<BugDetails xmlns="">123</BugDetails>
</BugDetails>
<BugDetails xmlns="">
<BugDetails xmlns="">2010-11-05T12:00:00.000</BugDetails>
</BugDetails>
</BugDetails>
</Bug>
</UpdateBugRequest>
Someone pointed out that perhaps I should be explicitly calling the constructors for things like th
+e BugDetails object, then passing those objects into the data structure, but doing that yields bas
+ically the same result.
I found this, which looks like it might be my issue:
https://rt.cpan.org/Public/Bug/Display.html?id=61949
But, the 3-line fix did not work for me (added it at line 375 of my version)
I've been wrestling with this for two days now, any insight or help would be greatly appreciated.
Yani