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>
In reply to SOAP::Lite:Java vs Perl by mrguy123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |