I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-11-05 22:38:00.669906-07 by ianifera
child elements duplicated one level down and have wrong name
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
Direct Responses: 13046 | Write a response
Posted on 2010-11-06 19:33:48.114121-07 by ianifera in response to 13045
Re: child elements duplicated one level down and have wrong name
Ok, I got it... The 3 line hack from the bug report had to be inserted in two places: one for "qualified" and the other for "unqualified" types of child elements. In version 2.00.10 of SOAP::WSDL::XSD::Typelib::ComplexType that translates to lines 375 and 381 of + the original file.
Direct Responses: Write a response