mrguy123 has asked for the wisdom of the Perl Monks concerning the following question:
I haven't used Java for a while, but it seems that you need to connect the the WSDL page, create a "session" object, and then send it as input to a one of the SOAP functions. I tried doing the same in Perl, using a hash instead of an object:##Connecting to the WSDL file Public myService As DialogSearch.SearchService = New _ DialogSearch.Se +archService ##Creating a session object Public mySession As DialogSearch.SessionStruct = New _ DialogSearch.S +essionStruct ##Updating the object parameters mySession.Account = “123456” mySession.Password = “xyzabc” mySession.Cost = 0 mySession.State=”START_SESSION” mySession.Atomic = True mySession.Interupt = False ##Sending the object as input to the Version function Dim myResult As DialogSearch.StringResult = _ MyService.Version(mySession)
When I run this program, I get this XML message:use strict; use warnings; use SOAP::Lite+trace=> 'debug'; { ##Connecting to the SOAP API my $request = SOAP::Lite->service('http://searchapi2.dialog.com/ax +is/DialogSearch.wsdl'); ##The session object with parameters my $session = {}; $session->{Account} = 'account'; $session->{Password} = 'pass'; $session->{State} = 'START_SESSION'; $session->{Cost} = 0; $session->{Atomic} = 'True'; $session->{Interupt} = 'False'; $session->{ProcessID} = ''; ##Calling the version function my $result = $request->Version($session); }
I'm not sure exactly what this means,but my guess is that the Server tries to use the XML to create an object and fails. I tried using a Perl Module instead of a hash as the "session" object but with the same results.<faultcode>soapenv:Server.userException</faultcode> <faultstring>org.xml.sax.SAXException: Deserializing parameter &apo +s;Session': could not find deserializer for type SessionStruct< +/faultstring>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite:Java vs Perl
by Your Mother (Archbishop) on May 26, 2008 at 20:45 UTC | |
by Anonymous Monk on May 27, 2008 at 09:57 UTC | |
by Your Mother (Archbishop) on May 27, 2008 at 17:22 UTC | |
by Anonymous Monk on May 28, 2008 at 01:38 UTC | |
|
Re: SOAP::Lite:Java vs Perl
by Anonymous Monk on May 26, 2008 at 14:20 UTC | |
by mrguy123 (Hermit) on May 26, 2008 at 14:39 UTC | |
|
Re: SOAP::Lite:Java vs Perl
by Herkum (Parson) on May 27, 2008 at 17:34 UTC | |
by mrguy123 (Hermit) on May 28, 2008 at 06:03 UTC | |
|
Re: SOAP::Lite:Java vs Perl
by rahed (Scribe) on May 31, 2008 at 15:00 UTC |